diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2024-12-12 19:13:52 +0800 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2024-12-12 19:51:24 +0800 |
commit | 3ac826b0200e6972de81fe0469c1f8868c0e52ce (patch) | |
tree | c52598be293a1cfb830453cf5621e7158bdde59c /configure | |
parent | 6bc301672bfbde618d4ec02e51e6e2cbadd4ac1e (diff) | |
download | glibc-3ac826b0200e6972de81fe0469c1f8868c0e52ce.zip glibc-3ac826b0200e6972de81fe0469c1f8868c0e52ce.tar.gz glibc-3ac826b0200e6972de81fe0469c1f8868c0e52ce.tar.bz2 |
Clear CXX and TEST_CXX if C++ link test fails
Since the C++ compiler is used only for testing, use TEST_CXX as the C++
compiler if available. If C++ link test fails, clear both CXX and
TEST_CXX so that the C++ compiler isn't used for glibc build nor test.
Tested for m68k-linux-gnu-coldfire build and native build on x86-64.
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 7 |
1 files changed, 1 insertions, 6 deletions
@@ -4301,10 +4301,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -z "$TEST_CXX"; then - saved_CXX= TEST_CXX="$CXX" else - saved_CXX="$CXX" CXX="$TEST_CXX" fi # It's useless to us if it can't link programs (e.g. missing -lstdc++). @@ -4382,10 +4380,7 @@ fi printf "%s\n" "$libc_cv_cxx_link_ok" >&6; } if test $libc_cv_cxx_link_ok != yes then : - CXX= -fi -if test -n "$saved_CXX"; then - CXX="$saved_CXX" + CXX=; TEST_CXX= fi if test "`cd $srcdir; pwd -P`" = "`pwd -P`"; then |