configure: Restore saved CFLAGS
authorSimon Wilkinson <sxw@your-file-system.com>
Mon, 4 Oct 2010 11:33:24 +0000 (12:33 +0100)
committerDerrick Brashear <shadow@dementia.org>
Mon, 4 Oct 2010 16:07:55 +0000 (09:07 -0700)
When we test for whether the C compiler can take the
-fno-strength-reduce flag, we add the flag to CFLAGS to do so.
However, we were not restoring the old value of this flag when we
completed the test, and so we were always setting -fno-strength-reduce
in the userspace compile.

Previously, this was harmless, as we always overwrote CFLAGS, but if
we're moving to a world where we honour the user's setting of CFLAGS,
we need to not leak changes in this way.

Change-Id: I029c9fe91132ced34867445afe673761a597ccbe
Reviewed-on: http://gerrit.openafs.org/2894
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

src/cf/linux-test5.m4

index 0b86d2e..90c312c 100644 (file)
@@ -40,6 +40,7 @@ AC_DEFUN([OPENAFS_GCC_NEEDS_NO_STRENGTH_REDUCE], [
                    [int x;],
                    [openafs_cv_gcc_needs_no_strength_reduce=yes],
                    [openafs_cv_gcc_needs_no_strength_reduce=no])
+     CFLAGS="$save_CFLAGS"
   ])
   AS_IF([test x$openafs_cv_gcc_needs_no_strength_reduce = xyes],
         [LINUX_GCC_KOPTS="$LINUX_GCC_KOPTS -fno-strength-reduce"])