Bug 1261359 - Don't set HOST_{C,CXX,LD}FLAGS from {C,CXX,LD}FLAGS at all. r?nalexander draft
authorMike Hommey <mh+mozilla@glandium.org>
Fri, 01 Apr 2016 20:36:04 +0900
changeset 346749 5a26aa4fb113679ba7e7e20939719eb0bb68e3fa
parent 346748 3d02011d28d40e173bc258f86dd6538deb7a2bac
child 347115 5aed92c0b9b01c590504537a4924ff472797bbee
push id14427
push userbmo:mh+mozilla@glandium.org
push dateFri, 01 Apr 2016 14:29:21 +0000
reviewersnalexander
bugs1261359, 1260996
milestone48.0a1
Bug 1261359 - Don't set HOST_{C,CXX,LD}FLAGS from {C,CXX,LD}FLAGS at all. r?nalexander In bug 1260996, we straightened things up for the host flags on cross compile builds, where the situation was that they were effectively empty by default, and that hasn't changed. While working on bug 1260996, it has become clear that there is no much point in setting the host flags from the target flags on non cross compile builds, especially when the target flags come from the environment. That creates a discrepancy with cross compilation builds for no real reason, and there are effectively too few host things to build that it would matter anyways. The flags that do matter are the ones for C++11, C99, and optimisations, and they all are set independently of what is being removed here.
js/src/old-configure.in
old-configure.in
--- a/js/src/old-configure.in
+++ b/js/src/old-configure.in
@@ -141,28 +141,19 @@ else
     MOZ_PATH_PROGS(AS, $AS as, $CC)
     AC_CHECK_PROGS(AR, ar, :)
     AC_CHECK_PROGS(LD, ld, :)
     AC_CHECK_PROGS(STRIP, strip, :)
     AC_CHECK_PROGS(WINDRES, windres, :)
     if test -z "$HOST_CC"; then
         HOST_CC='$(CC)'
     fi
-    if test -z "$HOST_CFLAGS"; then
-        HOST_CFLAGS='$(CFLAGS)'
-    fi
     if test -z "$HOST_CXX"; then
         HOST_CXX='$(CXX)'
     fi
-    if test -z "$HOST_CXXFLAGS"; then
-        HOST_CXXFLAGS='$(CXXFLAGS)'
-    fi
-    if test -z "$HOST_LDFLAGS"; then
-        HOST_LDFLAGS='$(LDFLAGS)'
-    fi
     if test -z "$HOST_RANLIB"; then
         HOST_RANLIB='$(RANLIB)'
     fi
     if test -z "$HOST_AR"; then
         HOST_AR='$(AR)'
     fi
     if test -z "$HOST_AR_FLAGS"; then
         HOST_AR_FLAGS='$(AR_FLAGS)'
--- a/old-configure.in
+++ b/old-configure.in
@@ -252,28 +252,19 @@ else
     AC_CHECK_PROGS(AR, ar, :)
     AC_CHECK_PROGS(LD, ld, :)
     AC_CHECK_PROGS(STRIP, strip, :)
     AC_CHECK_PROGS(WINDRES, windres, :)
     AC_CHECK_PROGS(OTOOL, otool, :)
     if test -z "$HOST_CC"; then
         HOST_CC="$CC"
     fi
-    if test -z "$HOST_CFLAGS"; then
-        HOST_CFLAGS="$CFLAGS"
-    fi
     if test -z "$HOST_CXX"; then
         HOST_CXX="$CXX"
     fi
-    if test -z "$HOST_CXXFLAGS"; then
-        HOST_CXXFLAGS="$CXXFLAGS"
-    fi
-    if test -z "$HOST_LDFLAGS"; then
-        HOST_LDFLAGS="$LDFLAGS"
-    fi
     if test -z "$HOST_RANLIB"; then
         HOST_RANLIB="$RANLIB"
     fi
     if test -z "$HOST_AR"; then
         HOST_AR="$AR"
     fi
     if test -z "$HOST_AR_FLAGS"; then
         HOST_AR_FLAGS="$AR_FLAGS"