Re: pkg/60439: lang/gcc12 fails to build on NetBSD/macppc 11.0_RC6 but succeeds on 10.0
"Havard Eidnes via gnats" <[email protected]> Sun, 12 Jul 2026 14:00:02 +0000 (UTC)
| Newsgroups | gmane.os.netbsd.devel.pkgsrc.bugs |
|---|---|
| Message-ID | <[email protected]> |
The following reply was made to PR pkg/60439; it has been noted by GNATS. From: Havard Eidnes <[email protected]> To: [email protected], [email protected] Cc: [email protected], [email protected] Subject: Re: pkg/60439: lang/gcc12 fails to build on NetBSD/macppc 11.0_RC6 but succeeds on 10.0 Date: Sun, 12 Jul 2026 15:57:12 +0200 (CEST) Hi, I took a look at the executables with "objdump -x", and looking for the sections with "CODE", for the one compiled with the in-tree gcc, I find: 8 .init 00000020 0180040c 0180040c 0000040c 2**2 CONTENTS, ALLOC, LOAD, READONLY, CODE 9 .text 000006c0 01800430 01800430 00000430 2**4 CONTENTS, ALLOC, LOAD, READONLY, CODE 10 .fini 00000020 01800af0 01800af0 00000af0 2**2 CONTENTS, ALLOC, LOAD, READONLY, CODE However, for the one built by the half-built gcc12 compiler, I additionally find: 20 .got 00000010 01820000 01820000 00010000 2**2 CONTENTS, ALLOC, LOAD, CODE 21 .sdata 00000004 01820010 01820010 00010010 2**2 CONTENTS, ALLOC, LOAD, DATA 22 .sbss 00000010 01820018 01820018 00010014 2**3 ALLOC 23 .plt 000000c0 01820028 01820028 00010014 2**2 ALLOC, CODE and those two "CODE" marked sections are not marked as "CODE" when using the in-tree compiler. I've already tried linking the gcc12-built conftest.o that I built with the system linker, and the resulting executable still aborts, so collect2 and/or the linker does not appear to be to blame. Looking at the object files with "objdump -x" shows the same two sections marked as CODE (and no others): Sections: Idx Name Size VMA LMA File off Algn 0 .text 00000000 00000000 00000000 00000034 2**0 CONTENTS, ALLOC, LOAD, READONLY, CODE ... 5 .text.startup 00000068 00000000 00000000 00000050 2**2 CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE and skimming through the rest reveals just one notable change: the in-tree-built conftest.o has RELOCATION RECORDS FOR [.text.startup]: OFFSET TYPE VALUE 00000016 R_PPC_REL16_HA .got2+0x0000800a 0000001e R_PPC_REL16_LO .got2+0x00008012 00000028 R_PPC_PLTREL24 fopen+0x00008000 00000054 R_PPC_PLTREL24 fclose+0x00008000 whereas the gcc12-built has RELOCATION RECORDS FOR [.text.startup]: OFFSET TYPE VALUE 00000000 R_PPC_REL32 .got2+0x00007ff0 0000002c R_PPC_PLTREL24 fopen 00000058 R_PPC_PLTREL24 fclose But I don't see how that will make such a difference in the executables. Any more hints for what to look for?