Use -g3 for the new small macros.
target=
targets=
configure="./configure"
-debug="-ggdb2"
+# >=4.7 has small macros section.
+if gcc --version|perl -ne 'exit(!(/(\d+)\.(\d+)/&&($1>4||($1==4&&$2>=7))));';then
+ debug="-g3"
+else
+ debug="-g2"
+fi
ldflags="-lmcheck"
fast=false
readline=""
echo >&2 "flags error"
exit 1
fi
- "$CC" $flags -c errs1.c -o /dev/null && break
+ # Use -Werror:
+ # cc1: warnings being treated as errors
+ # archive.c:1: error: -fstack-protector not supported for this target
+ "$CC" $flags -Werror -c errs1.c -o /dev/null && break
done
if test -n "$customm" && "$CC" $customm -c errs1.c -o /dev/null;then
flags="$customm $flags"