From: Christian Heller Date: Mon, 9 Mar 2015 16:15:35 +0000 (+0100) Subject: Drop gcc-specific compiler flags when gcc used is just non-GNU gcc mask. X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/static/%7B%7Byoutube_prefix%7D%7D%7B%7Bvideo_id%7D%7D?a=commitdiff_plain;h=66f7a5b567c8834220e0d5cf43cba54ed52ad6ee;p=plomrogue Drop gcc-specific compiler flags when gcc used is just non-GNU gcc mask. --- 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