https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111481
Bug ID: 111481
Summary: MacOS, linker issues with Xcode 15
Product: gcc
Version: 13.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: simon at pushface dot org
Target Milestone: ---
Running on a Mac mini with Apple silicon (M1), with Darwin 22.6.0 (macOS
13.5.2) and Command Line Tools version 15.0.0.0.1.1694021235.
The compiler is GCC 13.1.0, for x86_64-apple-darwin21 (so, running under
Rosetta).
Compiling hello.c gives the following result:
$ gcc hello.c
-macosx_version_min has been renamed to -macos_version_min
Running otool -l hello.o reports minos 13.0, so we may not have needed to
specify the old version of the switch anyway.
The executable runs as expected.
Compiling hello.adb fails:
$ gnatmake hello.adb
gcc -c hello.adb
gnatbind -x hello.ali
gnatlink hello.ali
-macosx_version_min has been renamed to -macos_version_min
0 0x100837f43 __assert_rtn + 64
1 0x100739f43 ld::AtomPlacement::findAtom(unsigned char, unsigned long long,
ld::AtomPlacement::AtomLoc const*&, long long&) const + 1411
2 0x100756431 ld::InputFiles::SliceParser::parseObjectFile(mach_o::Header
const*) const + 19745
3 0x100766e44 ld::InputFiles::parseAllFiles(void (ld::AtomFile const*)
block_pointer)::$_7::operator()(unsigned long, ld::FileInfo const&) const +
1380
4 0x7ff8128ae066 _dispatch_client_callout2 + 8
5 0x7ff8128bfe09 _dispatch_apply_invoke + 213
6 0x7ff8128ae033 _dispatch_client_callout + 8
7 0x7ff8128be0f6 _dispatch_root_queue_drain + 683
8 0x7ff8128be768 _dispatch_worker_thread2 + 170
9 0x7ff812a4bc0f _pthread_wqthread + 257
ld: Assertion failed: (resultIndex < sectData.atoms.size()), function findAtom,
file Relocations.cpp, line 1336.
collect2: error: ld returned 1 exit status
gnatlink: error when calling /opt/gcc-13.1.0/bin/gcc
gnatmake: *** link failed.