diff --git a/common/autoconf/generated-configure.sh b/common/autoconf/generated-configure.sh index f273159ba26bd0cb74029899564812fb574d380b..bc9d07da3f37f82f38f9e6f5757454f708c2d8ea 100644 --- a/common/autoconf/generated-configure.sh +++ b/common/autoconf/generated-configure.sh @@ -709,7 +709,6 @@ STATIC_LIBRARY SHARED_LIBRARY OBJ_SUFFIX COMPILER_NAME -TARGET_BITS_FLAG JT_HOME JTREGEXE LIPO @@ -3806,7 +3805,7 @@ fi #CUSTOM_AUTOCONF_INCLUDE # Do not change or remove the following line, it is needed for consistency checks: -DATE_WHEN_GENERATED=1379070243 +DATE_WHEN_GENERATED=1379077060 ############################################################################### # @@ -28398,35 +28397,41 @@ done if test "x$OPENJDK_TARGET_OS" = xsolaris; then # Always specify -m flags on Solaris - # keep track of c/cxx flags that we added outselves... - # to prevent emitting warning... - TARGET_BITS_FLAG="-m${OPENJDK_TARGET_CPU_BITS}" + # When we add flags to the "official" CFLAGS etc, we need to + # keep track of these additions in ADDED_CFLAGS etc. These + # will later be checked to make sure only controlled additions + # have been made to CFLAGS etc. + ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}" + ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}" + ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}" + CFLAGS="${CFLAGS}${ADDED_CFLAGS}" + CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}" + LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}" - CFLAGS="${CFLAGS} ${TARGET_BITS_FLAG}" - CXXFLAGS="${CXXFLAGS} ${TARGET_BITS_FLAG}" - LDFLAGS="${LDFLAGS} ${TARGET_BITS_FLAG}" - - CFLAGS_JDK="${CFLAGS_JDK} ${TARGET_BITS_FLAG}" - CXXFLAGS_JDK="${CXXFLAGS_JDK} ${TARGET_BITS_FLAG}" - LDFLAGS_JDK="${LDFLAGS_JDK} ${TARGET_BITS_FLAG}" + CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}" + CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}" + LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}" elif test "x$COMPILE_TYPE" = xreduced; then if test "x$OPENJDK_TARGET_OS" != xwindows; then # Specify -m if running reduced on other Posix platforms - # keep track of c/cxx flags that we added outselves... - # to prevent emitting warning... - TARGET_BITS_FLAG="-m${OPENJDK_TARGET_CPU_BITS}" - - - CFLAGS="${CFLAGS} ${TARGET_BITS_FLAG}" - CXXFLAGS="${CXXFLAGS} ${TARGET_BITS_FLAG}" - LDFLAGS="${LDFLAGS} ${TARGET_BITS_FLAG}" - - CFLAGS_JDK="${CFLAGS_JDK} ${TARGET_BITS_FLAG}" - CXXFLAGS_JDK="${CXXFLAGS_JDK} ${TARGET_BITS_FLAG}" - LDFLAGS_JDK="${LDFLAGS_JDK} ${TARGET_BITS_FLAG}" + # When we add flags to the "official" CFLAGS etc, we need to + # keep track of these additions in ADDED_CFLAGS etc. These + # will later be checked to make sure only controlled additions + # have been made to CFLAGS etc. + ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}" + ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}" + ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}" + + CFLAGS="${CFLAGS}${ADDED_CFLAGS}" + CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}" + LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}" + + CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}" + CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}" + LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}" fi fi diff --git a/common/autoconf/platform.m4 b/common/autoconf/platform.m4 index 71ae2ceab7bb082582435ff66916ac368c5f07d5..96c710d8a18211c3704172abc6e42b09911d524d 100644 --- a/common/autoconf/platform.m4 +++ b/common/autoconf/platform.m4 @@ -422,18 +422,21 @@ AC_SUBST(OS_VERSION_MICRO) # Add -mX to various FLAGS variables. AC_DEFUN([PLATFORM_SET_COMPILER_TARGET_BITS_FLAGS], [ - # keep track of c/cxx flags that we added outselves... - # to prevent emitting warning... - TARGET_BITS_FLAG="-m${OPENJDK_TARGET_CPU_BITS}" - AC_SUBST(TARGET_BITS_FLAG) - - CFLAGS="${CFLAGS} ${TARGET_BITS_FLAG}" - CXXFLAGS="${CXXFLAGS} ${TARGET_BITS_FLAG}" - LDFLAGS="${LDFLAGS} ${TARGET_BITS_FLAG}" - - CFLAGS_JDK="${CFLAGS_JDK} ${TARGET_BITS_FLAG}" - CXXFLAGS_JDK="${CXXFLAGS_JDK} ${TARGET_BITS_FLAG}" - LDFLAGS_JDK="${LDFLAGS_JDK} ${TARGET_BITS_FLAG}" + # When we add flags to the "official" CFLAGS etc, we need to + # keep track of these additions in ADDED_CFLAGS etc. These + # will later be checked to make sure only controlled additions + # have been made to CFLAGS etc. + ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}" + ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}" + ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}" + + CFLAGS="${CFLAGS}${ADDED_CFLAGS}" + CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}" + LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}" + + CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}" + CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}" + LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}" ]) AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_TARGET_BITS], diff --git a/common/autoconf/spec.gmk.in b/common/autoconf/spec.gmk.in index d44b3c8c9736ba1f34cbb7f554d1870ee354b70c..7e1866937005a97873ad2109cc4474d947cb1245 100644 --- a/common/autoconf/spec.gmk.in +++ b/common/autoconf/spec.gmk.in @@ -300,7 +300,6 @@ MACOSX_VERSION_MIN=@MACOSX_VERSION_MIN@ COMPILER_TYPE:=@COMPILER_TYPE@ COMPILER_NAME:=@COMPILER_NAME@ -TARGET_BITS_FLAG=@TARGET_BITS_FLAG@ COMPILER_SUPPORTS_TARGET_BITS_FLAG=@COMPILER_SUPPORTS_TARGET_BITS_FLAG@ CC_OUT_OPTION:=@CC_OUT_OPTION@