summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xautogen.sh4
-rw-r--r--configure.ac6
2 files changed, 6 insertions, 4 deletions
diff --git a/autogen.sh b/autogen.sh
index 33d8fcda23..86fe9b3785 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -54,7 +54,7 @@ args="$args \
fi
if [ "x$1" = "xc" ]; then
- ./configure CFLAGS='-g -O0 -Wp,-U_FORTIFY_SOURCE' $args
+ ./configure CFLAGS='-g -O0' $args
make clean
else
echo
@@ -62,6 +62,6 @@ else
echo "Initialized build system. For a common configuration please run:"
echo "----------------------------------------------------------------"
echo
- echo "./configure CFLAGS='-g -O0 -Wp,-U_FORTIFY_SOURCE' $args"
+ echo "./configure CFLAGS='-g -O0' $args"
echo
fi
diff --git a/configure.ac b/configure.ac
index 7a3cd87511..3566dac830 100644
--- a/configure.ac
+++ b/configure.ac
@@ -167,8 +167,10 @@ CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
--param=ssp-buffer-size=4])
AC_SUBST([OUR_CFLAGS], $with_cflags)
-CC_CHECK_FLAGS_APPEND([with_cppflags], [CPPFLAGS], [\
- -Wp,-D_FORTIFY_SOURCE=2])
+AS_CASE([$CFLAGS], [*-O[[12345\ ]]*], [
+ CC_CHECK_FLAGS_APPEND([with_cppflags], [CPPFLAGS], [\
+ -Wp,-D_FORTIFY_SOURCE=2])], [
+ AC_MSG_RESULT([skipping -D_FORTIFY_SOURCE, optimization not enabled])])
AC_SUBST([OUR_CPPFLAGS], $with_cppflags)
CC_CHECK_FLAGS_APPEND([with_ldflags], [LDFLAGS], [\