From a5d28a12246b32492c04d4ba551e70481d056363 Mon Sep 17 00:00:00 2001 From: Ralf Wildenhues <Ralf.Wildenhues@gmx.de> Date: Mon, 14 Dec 2009 21:44:48 +0000 Subject: [PATCH] Remove code to un-precious-ize CC, CXX in libjava and v3. libjava/: * configure.ac: Remove code to un-precious-ize CC, CXX, CXXFLAGS, CFLAGS, LDFLAGS. * configure: Regenerate. libstdc++-v3/: * configure.ac: Remove code to un-precious-ize CC, CXX, CXXFLAGS, CFLAGS, LDFLAGS. * configure: Regenerate. From-SVN: r155240 --- libjava/ChangeLog | 6 +++++ libjava/configure | 30 +++++++++------------- libjava/configure.ac | 15 +---------- libstdc++-v3/ChangeLog | 6 +++++ libstdc++-v3/configure | 53 +++++++++++++++------------------------ libstdc++-v3/configure.ac | 20 --------------- 6 files changed, 45 insertions(+), 85 deletions(-) diff --git a/libjava/ChangeLog b/libjava/ChangeLog index adef8782f74f..0701bd395a76 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,9 @@ +2009-12-14 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> + + * configure.ac: Remove code to un-precious-ize CC, CXX, + CXXFLAGS, CFLAGS, LDFLAGS. + * configure: Regenerate. + 2009-12-09 John David Anglin <dave.anglin@nrc-cnrc.gc.ca> * include/pa-signal.h: Do not include ucontext.h. diff --git a/libjava/configure b/libjava/configure index 1a7d625c96da..605225b19a0c 100755 --- a/libjava/configure +++ b/libjava/configure @@ -961,8 +961,15 @@ with_jvm_jar_dir ac_precious_vars='build_alias host_alias target_alias -CPP +CC +CFLAGS +LDFLAGS +LIBS CPPFLAGS +CXX +CXXFLAGS +CCC +CPP CXXCPP XMKMF' ac_subdirs_all='classpath libltdl' @@ -3339,18 +3346,9 @@ fi # It may not be safe to run linking tests in AC_PROG_CC/AC_PROG_CXX. -# (1) We use an abnormal CXX (without library references), so we -# must cache it under a different name. -# (2) CC, CFLAGS, CXX, CXXFLAGS, LDFLAGS must not be 'precious', or -# the non-multilib-adjusted value will be used in multilibs. -# (3) As a side effect, we must SUBST CXXFLAGS, CFLAGS, and LDFLAGS ourselves. -# (4) As another side effect, automake doesn't automatically include them -# in Makefile.in. -# (5) For libstdc++-v3, -fno-builtin must be present here so that a +# For libstdc++-v3, -fno-builtin must be present here so that a # non-conflicting form of std::exit can be guessed by AC_PROG_CXX, and # used in later tests. This may not be necessary in libjava; I don't know. - - save_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS -fno-builtin" ac_ext=c @@ -4406,10 +4404,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu CXXFLAGS="$save_CXXFLAGS" - - - - am__api_version='1.11' # Find a good install program. We prefer a C program (faster), @@ -13244,7 +13238,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 13247 "configure" +#line 13241 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -13350,7 +13344,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 13353 "configure" +#line 13347 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -19215,7 +19209,7 @@ if test "${enable_sjlj_exceptions+set}" = set; then : enableval=$enable_sjlj_exceptions; : else cat > conftest.$ac_ext << EOF -#line 19218 "configure" +#line 19212 "configure" struct S { ~S(); }; void bar(); void foo() diff --git a/libjava/configure.ac b/libjava/configure.ac index d8cb6103fea0..3721e1c34edc 100644 --- a/libjava/configure.ac +++ b/libjava/configure.ac @@ -142,27 +142,14 @@ AM_CONDITIONAL(JAVA_MAINTAINER_MODE, test "$enable_java_maintainer_mode" = yes) # It may not be safe to run linking tests in AC_PROG_CC/AC_PROG_CXX. GCC_NO_EXECUTABLES -# (1) We use an abnormal CXX (without library references), so we -# must cache it under a different name. -# (2) CC, CFLAGS, CXX, CXXFLAGS, LDFLAGS must not be 'precious', or -# the non-multilib-adjusted value will be used in multilibs. -# (3) As a side effect, we must SUBST CXXFLAGS, CFLAGS, and LDFLAGS ourselves. -# (4) As another side effect, automake doesn't automatically include them -# in Makefile.in. -# (5) For libstdc++-v3, -fno-builtin must be present here so that a +# For libstdc++-v3, -fno-builtin must be present here so that a # non-conflicting form of std::exit can be guessed by AC_PROG_CXX, and # used in later tests. This may not be necessary in libjava; I don't know. -m4_rename([_AC_ARG_VAR_PRECIOUS],[glibcxx_PRECIOUS]) -m4_define([_AC_ARG_VAR_PRECIOUS],[]) save_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS -fno-builtin" AC_PROG_CC AC_PROG_CXX CXXFLAGS="$save_CXXFLAGS" -m4_rename_force([glibcxx_PRECIOUS],[_AC_ARG_VAR_PRECIOUS]) -AC_SUBST(CFLAGS) -AC_SUBST(CXXFLAGS) -AC_SUBST(LDFLAGS) AM_INIT_AUTOMAKE([1.9.0]) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index c0d50db8821f..1b57aedc4e6a 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,9 @@ +2009-12-14 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> + + * configure.ac: Remove code to un-precious-ize CC, CXX, + CXXFLAGS, CFLAGS, LDFLAGS. + * configure: Regenerate. + 2009-12-14 Paolo Carlini <paolo.carlini@oracle.com> * testsuite/23_containers/queue/requirements/ diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure index 894ab7bbe7ac..6bd3c2273e5f 100755 --- a/libstdc++-v3/configure +++ b/libstdc++-v3/configure @@ -843,8 +843,15 @@ enable_version_specific_runtime_libs ac_precious_vars='build_alias host_alias target_alias -CPP +CC +CFLAGS +LDFLAGS +LIBS CPPFLAGS +CXX +CXXFLAGS +CCC +CPP CXXCPP' @@ -3485,26 +3492,9 @@ am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' -# We're almost certainly being configured before anything else which uses -# C++, so all of our AC_PROG_* discoveries will be cached. It's vital that -# we not cache the value of CXX that we "discover" here, because it's set -# to something unique for us and libjava. Other target libraries need to -# find CXX for themselves. We yank the rug out from under the normal AC_* -# process by sneakily renaming the cache variable. This also lets us debug -# the value of "our" CXX in postmortems. -# -# We must also force CXX to /not/ be a precious variable, otherwise the -# wrong (non-multilib-adjusted) value will be used in multilibs. This -# little trick also affects CPPFLAGS, CXXFLAGS, and LDFLAGS. And as a side -# effect, CXXFLAGS is no longer automagically subst'd, so we have to do -# that ourselves. Un-preciousing AC_PROG_CC also affects CC and CFLAGS. -# # -fno-builtin must be present here so that a non-conflicting form of # std::exit can be guessed by AC_PROG_CXX, and used in later tests. - - - save_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS -fno-builtin" ac_ext=c @@ -4317,11 +4307,11 @@ if test -z "$CXX"; then set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${glibcxx_cv_prog_CXX+set}" = set; then : +if test "${ac_cv_prog_CXX+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then - glibcxx_cv_prog_CXX="$CXX" # Let the user override the test. + ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -4330,7 +4320,7 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - glibcxx_cv_prog_CXX="$ac_tool_prefix$ac_prog" + ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -4340,7 +4330,7 @@ IFS=$as_save_IFS fi fi -CXX=$glibcxx_cv_prog_CXX +CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 $as_echo "$CXX" >&6; } @@ -4560,9 +4550,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu CXXFLAGS="$save_CXXFLAGS" - - - # Runs configure.host, and assorted other critical bits. Sets # up critical shell variables. @@ -11454,7 +11441,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11457 "configure" +#line 11444 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11560,7 +11547,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11563 "configure" +#line 11550 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -14897,7 +14884,7 @@ fi # # Fake what AC_TRY_COMPILE does. XXX Look at redoing this new-style. cat > conftest.$ac_ext << EOF -#line 14900 "configure" +#line 14887 "configure" struct S { ~S(); }; void bar(); void foo() @@ -15265,7 +15252,7 @@ $as_echo "$glibcxx_cv_atomic_long_long" >&6; } # Fake what AC_TRY_COMPILE does. cat > conftest.$ac_ext << EOF -#line 15268 "configure" +#line 15255 "configure" int main() { typedef bool atomic_type; @@ -15302,7 +15289,7 @@ $as_echo "$glibcxx_cv_atomic_bool" >&6; } rm -f conftest* cat > conftest.$ac_ext << EOF -#line 15305 "configure" +#line 15292 "configure" int main() { typedef short atomic_type; @@ -15339,7 +15326,7 @@ $as_echo "$glibcxx_cv_atomic_short" >&6; } rm -f conftest* cat > conftest.$ac_ext << EOF -#line 15342 "configure" +#line 15329 "configure" int main() { // NB: _Atomic_word not necessarily int. @@ -15377,7 +15364,7 @@ $as_echo "$glibcxx_cv_atomic_int" >&6; } rm -f conftest* cat > conftest.$ac_ext << EOF -#line 15380 "configure" +#line 15367 "configure" int main() { typedef long long atomic_type; @@ -15453,7 +15440,7 @@ $as_echo "$as_me: WARNING: Performance of certain classes will degrade as a resu # unnecessary for this test. cat > conftest.$ac_ext << EOF -#line 15456 "configure" +#line 15443 "configure" int main() { _Decimal32 d1; diff --git a/libstdc++-v3/configure.ac b/libstdc++-v3/configure.ac index 1fd8119b51d3..2ee2bdbce28d 100644 --- a/libstdc++-v3/configure.ac +++ b/libstdc++-v3/configure.ac @@ -78,34 +78,14 @@ AM_INIT_AUTOMAKE([1.9.3 no-define foreign no-dependencies -Wall -Wno-portability AH_TEMPLATE(PACKAGE, [Name of package]) AH_TEMPLATE(VERSION, [Version number of package]) -# We're almost certainly being configured before anything else which uses -# C++, so all of our AC_PROG_* discoveries will be cached. It's vital that -# we not cache the value of CXX that we "discover" here, because it's set -# to something unique for us and libjava. Other target libraries need to -# find CXX for themselves. We yank the rug out from under the normal AC_* -# process by sneakily renaming the cache variable. This also lets us debug -# the value of "our" CXX in postmortems. -# -# We must also force CXX to /not/ be a precious variable, otherwise the -# wrong (non-multilib-adjusted) value will be used in multilibs. This -# little trick also affects CPPFLAGS, CXXFLAGS, and LDFLAGS. And as a side -# effect, CXXFLAGS is no longer automagically subst'd, so we have to do -# that ourselves. Un-preciousing AC_PROG_CC also affects CC and CFLAGS. -# # -fno-builtin must be present here so that a non-conflicting form of # std::exit can be guessed by AC_PROG_CXX, and used in later tests. -m4_define([ac_cv_prog_CXX],[glibcxx_cv_prog_CXX]) -m4_rename([_AC_ARG_VAR_PRECIOUS],[glibcxx_PRECIOUS]) -m4_define([_AC_ARG_VAR_PRECIOUS],[]) save_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS -fno-builtin" AC_PROG_CC AC_PROG_CXX CXXFLAGS="$save_CXXFLAGS" -m4_rename_force([glibcxx_PRECIOUS],[_AC_ARG_VAR_PRECIOUS]) -AC_SUBST(CFLAGS) -AC_SUBST(CXXFLAGS) # Runs configure.host, and assorted other critical bits. Sets # up critical shell variables. -- GitLab