From 66f7a5b567c8834220e0d5cf43cba54ed52ad6ee Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Mon, 9 Mar 2015 17:15:35 +0100 Subject: [PATCH] Drop gcc-specific compiler flags when gcc used is just non-GNU gcc mask. --- build/compiler_flags | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/build/compiler_flags b/build/compiler_flags index 198da87..bc4ea28 100644 --- a/build/compiler_flags +++ b/build/compiler_flags @@ -2,4 +2,12 @@ # or any later version. For details on its copyright, license, and warranties, # see the file NOTICE in the root directory of the PlomRogue source package. -CFLAGS='-std=c11 -pedantic-errors -Wall -Werror -Wextra -Wformat-security -O3' +OFLAG='-O3' +CFLAGS="-std=c11 -pedantic-errors -Wall -Werror -Wextra -Wformat-security $OFLAG" + +# For non-GNU gcc masks, drop all gcc-specific debugginf flags. +test=`stat --version 2>&1 | grep 'Free Software Foundation' | wc -l` +if [ 1 -gt $test ] +then + CFLAGS=$OFLAG +fi -- 2.30.2