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

--- Comment #5 from Iain Sandoe <iains at gcc dot gnu.org> ---
Created attachment 55523
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55523&action=edit
Patch for testing

I tested this (by bootstrapping GCC with it) on x86_64 darwin21 with Xcode
14.3.

FWIW; The reason I had not done this sooner, is that I do not have a sensible
way to look up the SDK version at the moment (the second parameter), but AFAIK
0.0 is allowed as a "don't know", so we can improve on this at a later time

Here, I will test on some earlier Darwin versions - but would welcome
confirmation that it fixes the XC15 issue.

-----

```
COLLECT_GCC_OPTIONS='-B' 'gcc' '-o' 'hc' '-v' '-save-temps'
'-mmacosx-version-min=12.0.0'  '-nodefaultexport' '-mtune=core2' '-dumpdir'
'hc.'
 gcc/collect2 -syslibroot
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/ -dynamic -arch x86_64
-platform_version macos 12.0.0 0.0 -o hc -Lgcc hc-hello.o -v -lemutls_w -lgcc
-lSystem -no_compact_unwind
collect2 version 14.0.0 20230707 (experimental) [remotes/home/master revision
r14-2384-gbb3b9c1c3ba8]
gcc/collect-ld -syslibroot
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/ -dynamic -arch x86_64
-platform_version macos 12.0.0 0.0 -o hc -Lgcc hc-hello.o -v -lemutls_w -lgcc
-lSystem -no_compact_unwind
@(#)PROGRAM:ld  PROJECT:ld64-857.1

```

Reply via email to