[PATCH] Clear CXX and TEST_CXX if TEST_CXX link test fails

H.J. Lu hjl.tools@gmail.com
Wed Dec 11 20:42:19 GMT 2024


On Thu, Dec 12, 2024 at 1:16 AM Joseph Myers <josmyers@redhat.com> wrote:
>
> This breaks the case where the $CXX compiler doesn't work.  This can be
> seen with the m68k-linux-gnu-coldfire regressions in
> <https://sourceware.org/pipermail/libc-testresults/2024q4/013238.html>,
> where the "whether $CXX can link programs" test fails because of libstdc++
> referencing hidden symbols in libgcc.a.
>
> In the case where CXX is set to empty because the link test failed
>
> AS_IF([test $libc_cv_cxx_link_ok != yes], [CXX=])
>
> much the same should apply to TEST_CXX if it was defaulted from CXX, so
> that Makefile conditionals ifeq (,$(CXX)) and ifneq (,$(CXX)) work
> correctly in such a case.
>

Here is the patch.  Tested for m68k-linux-gnu-coldfire build and native
build on x86-64.

Since the C++ compiler is only for testing, if TEST_CXX link test fails,
clear both CXX and TEST_CXX so that the C++ compiler isn't used for glibc
build nor test.

H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Clear-CXX-and-TEST_CXX-if-TEST_CXX-link-test-fails.patch
Type: application/x-patch
Size: 1589 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/libc-alpha/attachments/20241212/141a4090/attachment.bin>


More information about the Libc-alpha mailing list