[Bug target/110624] Xcode 15 ld warns about -macosx_version_min
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110624 --- Comment #10 from GCC Commits --- The releases/gcc-12 branch has been updated by Iain D Sandoe : https://gcc.gnu.org/g:a17f5a03e93d2cc6fd40cef6ab3930ba019f804a commit r12-10310-ga17f5a03e93d2cc6fd40cef6ab3930ba019f804a Author: Iain Sandoe Date: Thu Jul 13 07:36:51 2023 +0100 Darwin: Use -platform_version when available [PR110624]. Later versions of the static linker support a more flexible flag to describe the OS, OS version and SDK used to build the code. This replaces the functionality of '-mmacosx_version_min' (which is now deprecated, leading to the diagnostic described in the PR). We now use the platform_version flag when available which avoids the diagnostic. Signed-off-by: Iain Sandoe PR target/110624 gcc/ChangeLog: * config/darwin.h (DARWIN_PLATFORM_ID): New. (LINK_COMMAND_A): Use DARWIN_PLATFORM_ID to pass OS, OS version and SDK data to the static linker. (cherry picked from commit 032b5da1fc781bd3c23d9caa72fb09439e7f6f3a)
[Bug target/110624] Xcode 15 ld warns about -macosx_version_min
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110624 --- Comment #9 from CVS Commits --- The releases/gcc-13 branch has been updated by Iain D Sandoe : https://gcc.gnu.org/g:4adf49a436429010ba928d4dc262625298e0d21a commit r13-7587-g4adf49a436429010ba928d4dc262625298e0d21a Author: Iain Sandoe Date: Thu Jul 13 07:36:51 2023 +0100 Darwin: Use -platform_version when available [PR110624]. Later versions of the static linker support a more flexible flag to describe the OS, OS version and SDK used to build the code. This replaces the functionality of '-mmacosx_version_min' (which is now deprecated, leading to the diagnostic described in the PR). We now use the platform_version flag when available which avoids the diagnostic. Signed-off-by: Iain Sandoe PR target/110624 gcc/ChangeLog: * config/darwin.h (DARWIN_PLATFORM_ID): New. (LINK_COMMAND_A): Use DARWIN_PLATFORM_ID to pass OS, OS version and SDK data to the static linker. (cherry picked from commit 032b5da1fc781bd3c23d9caa72fb09439e7f6f3a)
[Bug target/110624] Xcode 15 ld warns about -macosx_version_min
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110624 Iain Sandoe changed: What|Removed |Added Resolution|--- |FIXED Status|WAITING |RESOLVED --- Comment #8 from Iain Sandoe --- so fixed by using the platform_version change. If anyone runs into a problem because they have makefiles/etc that build stand-alone ld lines, I guess they will have to fix them anyway (nothing GCC can do about that).
[Bug target/110624] Xcode 15 ld warns about -macosx_version_min
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110624 --- Comment #7 from CVS Commits --- The master branch has been updated by Iain D Sandoe : https://gcc.gnu.org/g:032b5da1fc781bd3c23d9caa72fb09439e7f6f3a commit r14-2506-g032b5da1fc781bd3c23d9caa72fb09439e7f6f3a Author: Iain Sandoe Date: Thu Jul 13 07:36:51 2023 +0100 Darwin: Use -platform_version when available [PR110624]. Later versions of the static linker support a more flexible flag to describe the OS, OS version and SDK used to build the code. This replaces the functionality of '-mmacosx_version_min' (which is now deprecated, leading to the diagnostic described in the PR). We now use the platform_version flag when available which avoids the diagnostic. Signed-off-by: Iain Sandoe PR target/110624 gcc/ChangeLog: * config/darwin.h (DARWIN_PLATFORM_ID): New. (LINK_COMMAND_A): Use DARWIN_PLATFORM_ID to pass OS, OS version and SDK data to the static linker.
[Bug target/110624] Xcode 15 ld warns about -macosx_version_min
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110624 --- Comment #6 from ro at CeBiTec dot Uni-Bielefeld.DE --- > --- Comment #5 from Iain Sandoe --- > Here, I will test on some earlier Darwin versions - but would welcome > confirmation that it fixes the XC15 issue. I've done that now and could successfully bootstrap on macOS 14.0 beta 3 with Xcode 15 beta 4. Thanks for the patch, especially since my patch series to consistently prune the ld warning provded to be a can of worms. I needed one patch to link m2/boot-bin/mklink with -static-libstdc++ (to be submitted shortly). However, there's an enormous number of issues compared to macOS 14.0 beta 2/Xcode 15 beta 2, in particular all (?) EH-related execution tests failing, and all gfortran tests failing due to ld warnings about duplicate libraries (will submit a PR for that).
[Bug target/110624] Xcode 15 ld warns about -macosx_version_min
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110624 Iain Sandoe changed: What|Removed |Added Target Milestone|--- |11.5 Assignee|unassigned at gcc dot gnu.org |iains at gcc dot gnu.org Last reconfirmed||2023-07-11 Status|UNCONFIRMED |WAITING Ever confirmed|0 |1
[Bug target/110624] Xcode 15 ld warns about -macosx_version_min
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110624 --- Comment #5 from Iain Sandoe --- Created attachment 55523 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55523=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 ```
[Bug target/110624] Xcode 15 ld warns about -macosx_version_min
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110624 --- Comment #4 from ro at CeBiTec dot Uni-Bielefeld.DE --- > --- Comment #3 from Iain Sandoe --- > actually, we already have a config test for -platform_version, which is what > clang passes to ld. First, I'll take a look at enabling that (in which case > the mmacosx_version_min is not needed). That would be even easier indeed. > I take it that clang -cc1as does not warn for -mmacosx-version-min= ? Right: the HAVE_AS_MMACOSX_VERSION_MIN_OPTION test succeeds.
[Bug target/110624] Xcode 15 ld warns about -macosx_version_min
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110624 --- Comment #3 from Iain Sandoe --- actually, we already have a config test for -platform_version, which is what clang passes to ld. First, I'll take a look at enabling that (in which case the mmacosx_version_min is not needed). I take it that clang -cc1as does not warn for -mmacosx-version-min= ?
[Bug target/110624] Xcode 15 ld warns about -macosx_version_min
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110624 --- Comment #2 from ro at CeBiTec dot Uni-Bielefeld.DE --- > --- Comment #1 from Iain Sandoe --- > OK. (I do not have enough hardware to install 14 or xc15 at present). You don't depend on macOS 14 here, fortunately: xc 15 still supports macOS 13.4+. I'm running in qemu btw., the only virtualization solution that does support 13 and 14 at the moment. > I guess we just add a configuration test for it and then make the link line > dependent; will have a go on D21+XC14.3 I suspect so: older versions like xc 8 certainly don't support the new form.
[Bug target/110624] Xcode 15 ld warns about -macosx_version_min
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110624 --- Comment #1 from Iain Sandoe --- OK. (I do not have enough hardware to install 14 or xc15 at present). I guess we just add a configuration test for it and then make the link line dependent; will have a go on D21+XC14.3