public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug testsuite/109951] New: [14 Regression] libgomp, testsuite: non-native multilib c++ tests fail on Darwin.
@ 2023-05-24  7:23 iains at gcc dot gnu.org
  2023-05-24  7:25 ` [Bug testsuite/109951] " iains at gcc dot gnu.org
                   ` (15 more replies)
  0 siblings, 16 replies; 17+ messages in thread
From: iains at gcc dot gnu.org @ 2023-05-24  7:23 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109951

            Bug ID: 109951
           Summary: [14 Regression] libgomp, testsuite: non-native
                    multilib c++ tests fail on Darwin.
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: testsuite
          Assignee: unassigned at gcc dot gnu.org
          Reporter: iains at gcc dot gnu.org
  Target Milestone: ---

Tests that include C++ are now failing on Darwin platforms with a non-native
multilib  [both x86_64 and i686 hosts].  The tests pass for native and fail for
the non-native.

The fail is that the linker is rejecting the supplied libstdc++.dylib because
it is the wrong architecture.

From the debugging I have been able to do, the reason is that we are now using
"GXX_UNDER_TEST" which seems to hardwire all the flags and library paths for
the _native_ multi-lib.  Although we subsequently append paths for the
multilib-under-test, these are coming _after_ the native ones. 

e.g (trying to test x86_64 multilib on i686):

/scratch/10-5-leo/gcc-master/./gcc/xg++ 
-B/scratch/10-5-leo/gcc-master/./gcc/ 
-nostdinc++ 
-nostdinc++ 
-I/scratch/10-5-leo/gcc-master/i686-apple-darwin9/x86_64/libstdc++-v3/include/i686-apple-darwin9 
-I/scratch/10-5-leo/gcc-master/i686-apple-darwin9/x86_64/libstdc++-v3/include 
-I/src-local/gcc-master/libstdc++-v3/libsupc++
-I/src-local/gcc-master/libstdc++-v3/include/backward
-I/src-local/gcc-master/libstdc++-v3/testsuite/util
-L/scratch/10-5-leo/gcc-master/i686-apple-darwin9/libstdc++-v3/src
-L/scratch/10-5-leo/gcc-master/i686-apple-darwin9/libstdc++-v3/src/.libs
-L/scratch/10-5-leo/gcc-master/i686-apple-darwin9/libstdc++-v3/libsupc++/.libs

^^^^ native includes and libs (embedded in GCC_UNDER_TEST)

-B/opt/iains/i686-apple-darwin9/gcc-14-0-0p/i686-apple-darwin9/bin/
-B/opt/iains/i686-apple-darwin9/gcc-14-0-0p/i686-apple-darwin9/lib/
-isystem /opt/iains/i686-apple-darwin9/gcc-14-0-0p/i686-apple-darwin9/include
-isystem
/opt/iains/i686-apple-darwin9/gcc-14-0-0p/i686-apple-darwin9/sys-include
-fchecking=1 exceptions_enabled2364.cc
-m64
-B/scratch/10-5-leo/gcc-master/i686-apple-darwin9/x86_64/libgomp/
-B/scratch/10-5-leo/gcc-master/i686-apple-darwin9/x86_64/libgomp/.libs 
-I/scratch/10-5-leo/gcc-master/i686-apple-darwin9/x86_64/libgomp

^^^ correct multilib includes and libs (I think these are added by the libgomp
stuff)

-I/src-local/gcc-master/libgomp/testsuite/../../include
-I/src-local/gcc-master/libgomp/testsuite/..
-shared-libgcc 
-fmessage-length=0
-fno-diagnostics-show-caret
-fdiagnostics-color=never
-fopenmp -Wno-complain-wrong-lang -S -o exceptions_enabled2364.s

====

Presumably, this works on Linux because the BFD linker ignores the first
library because it is incompatible and then carries on to find the second. 
Darwin's linker is more picky and does not try to look in other paths once it
finds a correctly-named lib (it presumes pilot error and complains).

** NOTE: ISTM that all platforms are still presented with the wrong include
paths first .. not sure what effect that would have.

I am having some trouble pin-pointing the exact rev because Darwin bootstrap is
broken around the likely commits.

(my guess is r14-853-g982c869ec00c72, but cannot confirm).

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2023-10-26 16:05 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-24  7:23 [Bug testsuite/109951] New: [14 Regression] libgomp, testsuite: non-native multilib c++ tests fail on Darwin iains at gcc dot gnu.org
2023-05-24  7:25 ` [Bug testsuite/109951] " iains at gcc dot gnu.org
2023-05-24 10:39 ` iains at gcc dot gnu.org
2023-05-25  7:38 ` rguenth at gcc dot gnu.org
2023-05-25 22:04 ` tschwinge at gcc dot gnu.org
2023-05-25 23:12 ` iains at gcc dot gnu.org
2023-05-25 23:34 ` iains at gcc dot gnu.org
2023-06-01 16:02 ` tschwinge at gcc dot gnu.org
2023-06-02 10:00 ` tschwinge at gcc dot gnu.org
2023-06-02 10:08 ` tschwinge at gcc dot gnu.org
2023-06-02 14:31 ` iains at gcc dot gnu.org
2023-09-12  9:32 ` cvs-commit at gcc dot gnu.org
2023-09-12  9:32 ` cvs-commit at gcc dot gnu.org
2023-09-12 11:32 ` tschwinge at gcc dot gnu.org
2023-09-12 20:20 ` cvs-commit at gcc dot gnu.org
2023-10-26 16:05 ` cvs-commit at gcc dot gnu.org
2023-10-26 16:05 ` cvs-commit at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).