* [Bug target/110624] Xcode 15 ld warns about -macosx_version_min
2023-07-11 8:57 [Bug target/110624] New: Xcode 15 ld warns about -macosx_version_min ro at gcc dot gnu.org
@ 2023-07-11 9:53 ` iains at gcc dot gnu.org
2023-07-11 9:57 ` ro at CeBiTec dot Uni-Bielefeld.DE
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: iains at gcc dot gnu.org @ 2023-07-11 9:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110624
--- Comment #1 from Iain Sandoe <iains at gcc dot gnu.org> ---
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
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/110624] Xcode 15 ld warns about -macosx_version_min
2023-07-11 8:57 [Bug target/110624] New: Xcode 15 ld warns about -macosx_version_min ro at gcc dot gnu.org
2023-07-11 9:53 ` [Bug target/110624] " iains at gcc dot gnu.org
@ 2023-07-11 9:57 ` ro at CeBiTec dot Uni-Bielefeld.DE
2023-07-11 10:01 ` iains at gcc dot gnu.org
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: ro at CeBiTec dot Uni-Bielefeld.DE @ 2023-07-11 9:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110624
--- Comment #2 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot Uni-Bielefeld.DE> ---
> --- Comment #1 from Iain Sandoe <iains at gcc dot gnu.org> ---
> 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.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/110624] Xcode 15 ld warns about -macosx_version_min
2023-07-11 8:57 [Bug target/110624] New: Xcode 15 ld warns about -macosx_version_min ro at gcc dot gnu.org
2023-07-11 9:53 ` [Bug target/110624] " iains at gcc dot gnu.org
2023-07-11 9:57 ` ro at CeBiTec dot Uni-Bielefeld.DE
@ 2023-07-11 10:01 ` iains at gcc dot gnu.org
2023-07-11 10:55 ` ro at CeBiTec dot Uni-Bielefeld.DE
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: iains at gcc dot gnu.org @ 2023-07-11 10:01 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110624
--- Comment #3 from Iain Sandoe <iains at gcc dot gnu.org> ---
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= ?
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/110624] Xcode 15 ld warns about -macosx_version_min
2023-07-11 8:57 [Bug target/110624] New: Xcode 15 ld warns about -macosx_version_min ro at gcc dot gnu.org
` (2 preceding siblings ...)
2023-07-11 10:01 ` iains at gcc dot gnu.org
@ 2023-07-11 10:55 ` ro at CeBiTec dot Uni-Bielefeld.DE
2023-07-11 14:11 ` iains at gcc dot gnu.org
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: ro at CeBiTec dot Uni-Bielefeld.DE @ 2023-07-11 10:55 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110624
--- Comment #4 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot Uni-Bielefeld.DE> ---
> --- Comment #3 from Iain Sandoe <iains at gcc dot gnu.org> ---
> 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.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/110624] Xcode 15 ld warns about -macosx_version_min
2023-07-11 8:57 [Bug target/110624] New: Xcode 15 ld warns about -macosx_version_min ro at gcc dot gnu.org
` (3 preceding siblings ...)
2023-07-11 10:55 ` ro at CeBiTec dot Uni-Bielefeld.DE
@ 2023-07-11 14:11 ` iains at gcc dot gnu.org
2023-07-11 14:13 ` iains at gcc dot gnu.org
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: iains at gcc dot gnu.org @ 2023-07-11 14:11 UTC (permalink / raw)
To: gcc-bugs
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
```
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/110624] Xcode 15 ld warns about -macosx_version_min
2023-07-11 8:57 [Bug target/110624] New: Xcode 15 ld warns about -macosx_version_min ro at gcc dot gnu.org
` (4 preceding siblings ...)
2023-07-11 14:11 ` iains at gcc dot gnu.org
@ 2023-07-11 14:13 ` iains at gcc dot gnu.org
2023-07-13 8:57 ` ro at CeBiTec dot Uni-Bielefeld.DE
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: iains at gcc dot gnu.org @ 2023-07-11 14:13 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110624
Iain Sandoe <iains at gcc dot gnu.org> 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
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/110624] Xcode 15 ld warns about -macosx_version_min
2023-07-11 8:57 [Bug target/110624] New: Xcode 15 ld warns about -macosx_version_min ro at gcc dot gnu.org
` (5 preceding siblings ...)
2023-07-11 14:13 ` iains at gcc dot gnu.org
@ 2023-07-13 8:57 ` ro at CeBiTec dot Uni-Bielefeld.DE
2023-07-13 19:15 ` cvs-commit at gcc dot gnu.org
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: ro at CeBiTec dot Uni-Bielefeld.DE @ 2023-07-13 8:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110624
--- Comment #6 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot Uni-Bielefeld.DE> ---
> --- Comment #5 from Iain Sandoe <iains at gcc dot gnu.org> ---
> 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).
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/110624] Xcode 15 ld warns about -macosx_version_min
2023-07-11 8:57 [Bug target/110624] New: Xcode 15 ld warns about -macosx_version_min ro at gcc dot gnu.org
` (6 preceding siblings ...)
2023-07-13 8:57 ` ro at CeBiTec dot Uni-Bielefeld.DE
@ 2023-07-13 19:15 ` cvs-commit at gcc dot gnu.org
2023-07-13 19:19 ` iains at gcc dot gnu.org
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-07-13 19:15 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110624
--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Iain D Sandoe <iains@gcc.gnu.org>:
https://gcc.gnu.org/g:032b5da1fc781bd3c23d9caa72fb09439e7f6f3a
commit r14-2506-g032b5da1fc781bd3c23d9caa72fb09439e7f6f3a
Author: Iain Sandoe <iain@sandoe.co.uk>
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 <iain@sandoe.co.uk>
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.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/110624] Xcode 15 ld warns about -macosx_version_min
2023-07-11 8:57 [Bug target/110624] New: Xcode 15 ld warns about -macosx_version_min ro at gcc dot gnu.org
` (7 preceding siblings ...)
2023-07-13 19:15 ` cvs-commit at gcc dot gnu.org
@ 2023-07-13 19:19 ` iains at gcc dot gnu.org
2023-07-19 8:08 ` cvs-commit at gcc dot gnu.org
2024-04-04 18:50 ` cvs-commit at gcc dot gnu.org
10 siblings, 0 replies; 12+ messages in thread
From: iains at gcc dot gnu.org @ 2023-07-13 19:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110624
Iain Sandoe <iains at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|WAITING |RESOLVED
--- Comment #8 from Iain Sandoe <iains at gcc dot gnu.org> ---
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).
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/110624] Xcode 15 ld warns about -macosx_version_min
2023-07-11 8:57 [Bug target/110624] New: Xcode 15 ld warns about -macosx_version_min ro at gcc dot gnu.org
` (8 preceding siblings ...)
2023-07-13 19:19 ` iains at gcc dot gnu.org
@ 2023-07-19 8:08 ` cvs-commit at gcc dot gnu.org
2024-04-04 18:50 ` cvs-commit at gcc dot gnu.org
10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-07-19 8:08 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110624
--- Comment #9 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-13 branch has been updated by Iain D Sandoe
<iains@gcc.gnu.org>:
https://gcc.gnu.org/g:4adf49a436429010ba928d4dc262625298e0d21a
commit r13-7587-g4adf49a436429010ba928d4dc262625298e0d21a
Author: Iain Sandoe <iain@sandoe.co.uk>
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 <iain@sandoe.co.uk>
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)
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/110624] Xcode 15 ld warns about -macosx_version_min
2023-07-11 8:57 [Bug target/110624] New: Xcode 15 ld warns about -macosx_version_min ro at gcc dot gnu.org
` (9 preceding siblings ...)
2023-07-19 8:08 ` cvs-commit at gcc dot gnu.org
@ 2024-04-04 18:50 ` cvs-commit at gcc dot gnu.org
10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-04-04 18:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110624
--- Comment #10 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Iain D Sandoe
<iains@gcc.gnu.org>:
https://gcc.gnu.org/g:a17f5a03e93d2cc6fd40cef6ab3930ba019f804a
commit r12-10310-ga17f5a03e93d2cc6fd40cef6ab3930ba019f804a
Author: Iain Sandoe <iain@sandoe.co.uk>
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 <iain@sandoe.co.uk>
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)
^ permalink raw reply [flat|nested] 12+ messages in thread