summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorAnoop C S <anoopcs@redhat.com>2015-11-23 12:20:09 +0530
committerJeff Darcy <jdarcy@redhat.com>2015-12-01 09:25:45 -0800
commit86701a0ececa5fdbbe08654516618baadc4555b7 (patch)
tree5ad1d65cbac5349256d7ea41b7688fbd8ad81b4d /configure.ac
parentb8b050c37004c942b8c565cc66a05e8fa999c1ba (diff)
build: Remove redundant options from GF_CFLAGS
While configuring, GF_CFLAGS is being populated with redudndant options as follows: Normal mode: GF_CFLAGS = -g -O2 -g -O2 -Wformat -Werror=format-security \ -g -O2 -g -O2 -Wformat -Werror=format-security \ -Werror=implicit-function-declaration Debug mode: GF_CFLAGS = -g -O2 -g -O0 -DDEBUG -Wformat -Werror=format-security \ -g -O2 -g -O0 -DDEBUG -Wformat -Werror=format-security \ -Werror=implicit-function-declaration This patch is to remove this redundancy of options. Change-Id: Idf6f2536c2a8ae24ba257681fbe9dfdb8bfa4f19 BUG: 1198849 Signed-off-by: Anoop C S <anoopcs@redhat.com> Reviewed-on: http://review.gluster.org/12714 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac5
1 files changed, 4 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index a345b88078b..e2cb20fe79c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -934,15 +934,18 @@ fi
dnl check for gcc -Werror=implicit-function-declaration
saved_CFLAGS=$CFLAGS
+saved_GF_CFLAGS=$GF_CFLAGS
CFLAGS="-Werror=implicit-function-declaration"
+GF_CFLAGS="-Werror=implicit-function-declaration"
AC_MSG_CHECKING([whether $CC accepts -Werror=implicit-function-declaration])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [cc_werror_implicit=yes], [cc_werror_implicit=no])
echo $cc_werror_implicit
if test "x$cc_werror_implicit" = "xno"; then
CFLAGS="$saved_CFLAGS"
+ GF_CFLAGS="$saved_GF_CFLAGS"
else
CFLAGS="$saved_CFLAGS $CFLAGS"
- GF_CFLAGS="$GF_CFLAGS $CFLAGS"
+ GF_CFLAGS="$saved_GF_CFLAGS $GF_CFLAGS"
fi
dnl clang is mostly GCC-compatible, but its version is much lower,