Bug 1635271 - Restore CFLAGS to avoid repeat -fPIC flag when running configure after clobber. r=froydnj
authorNick Alexander <nalexander@mozilla.com>
Mon, 04 May 2020 23:13:55 +0000
changeset 527999 7af7b4435997618c3ebcada2b41cd900f1b100e3
parent 527998 cf90e2bb52a7b86e451610fafc2bc44cf85e7c07
child 528000 786823305560b03316cb758207f76838388603af
push id37379
push userccoroiu@mozilla.com
push dateTue, 05 May 2020 03:49:49 +0000
treeherdermozilla-central@786823305560 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1635271
milestone78.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1635271 - Restore CFLAGS to avoid repeat -fPIC flag when running configure after clobber. r=froydnj If we don't restore CFLAGS, then after a clobber, there's no configure cache, and therefore the CFLAGS get tweaked. But running configure again, the cache steps in and the extra -fPIC isn't added. Locally this means fewer sccache hits (but in automation, all builds at this time are clobber builds, so there's no impact). Differential Revision: https://phabricator.services.mozilla.com/D73757
js/src/old-configure.in
old-configure.in
--- a/js/src/old-configure.in
+++ b/js/src/old-configure.in
@@ -945,16 +945,17 @@ dnl clock_gettime is available on OSX si
 dnl we should or not be able to use it. To detect if we can, we need to make the
 dnl availability attribute strict, so that compilation fails when the target is < 10.12.
                     AC_TRY_LINK([#define availability(os, ...) availability(os, strict, __VA_ARGS)
                                  #include <time.h>],
                                  [ struct timespec ts;
                                    clock_gettime(CLOCK_MONOTONIC, &ts); ],
                                  ac_cv_clock_monotonic=$libs
                                  LIBS="$_SAVE_LIBS"
+                                 CFLAGS="$_SAVE_CFLAGS"
                                  break,
                                  ac_cv_clock_monotonic=no)
                     LIBS="$_SAVE_LIBS"
                     CFLAGS="$_SAVE_CFLAGS"
                 done])
 if test "$ac_cv_clock_monotonic" != "no"; then
     HAVE_CLOCK_MONOTONIC=1
     REALTIME_LIBS=$ac_cv_clock_monotonic
--- a/old-configure.in
+++ b/old-configure.in
@@ -1201,16 +1201,17 @@ dnl clock_gettime is available on OSX si
 dnl we should or not be able to use it. To detect if we can, we need to make the
 dnl availability attribute strict, so that compilation fails when the target is < 10.12.
                     AC_TRY_LINK([#define availability(os, ...) availability(os, strict, __VA_ARGS)
                                  #include <time.h>],
                                  [ struct timespec ts;
                                    clock_gettime(CLOCK_MONOTONIC, &ts); ],
                                  ac_cv_clock_monotonic=$libs
                                  LIBS="$_SAVE_LIBS"
+                                 CFLAGS="$_SAVE_CFLAGS"
                                  break,
                                  ac_cv_clock_monotonic=no)
                     LIBS="$_SAVE_LIBS"
                     CFLAGS="$_SAVE_CFLAGS"
                 done])
 if test "$ac_cv_clock_monotonic" != "no"; then
     HAVE_CLOCK_MONOTONIC=1
     REALTIME_LIBS=$ac_cv_clock_monotonic