From 2c3d867262047c90b70761d18cec3f496889cdfa Mon Sep 17 00:00:00 2001 From: lace <> Date: Sat, 21 Apr 2007 06:37:41 +0000 Subject: [PATCH 1/1] Fixed compatibility with old GCCs. --- bin/errs1 | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/bin/errs1 b/bin/errs1 index 1024d74..bace2b5 100755 --- a/bin/errs1 +++ b/bin/errs1 @@ -14,7 +14,20 @@ fi ( set -ex rm -f config.cache - flags="-ggdb2 -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4" + : >errs1.c + for flags in \ + "-ggdb2 -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4" \ + "-ggdb2 -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions" \ + "" \ + ;do + if [ -z "$flags" ];then + rm -f errs1.c + echo >&2 "flags error" + exit 1 + fi + gcc $flags -c errs1.c -o /dev/null && break + done + rm -f errs1.c export CFLAGS="$flags" export CXXFLAGS="$flags" export GCJFLAGS="$flags" -- 1.8.3.1