# 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 debugging flags.
+test=`stat --version 2>&1 | grep 'Free Software Foundation' | wc -l`
+if [ 1 -gt $test ]
+then
+ CFLAGS=$OFLAG
+fi