]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
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>
Sun, 20 Feb 2011 13:53:02 +0000 (05:53 -0800)
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.

Reviewed-on: http://gerrit.openafs.org/2894
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 907521feb1b9c7a6c816866a672c7ab84dac6abd)

Change-Id: Ie8c2a80b204754f1c17d9fa5e06903a7cdf7e4d2
Reviewed-on: http://gerrit.openafs.org/4004
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
src/cf/linux-test5.m4

index 0b86d2e753e82367ea59ffbd70c16d1ba7fdb5af..90c312cba1cae564223dc5f3e563323d37ed199d 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"])