Page MenuHomeFreeBSD

lang/gcc11-devel: Enable support for .init_array and .fini_array

Authored by salvadore on May 4 2023, 9:14 PM.
Referenced Files
Unknown Object (File)
Tue, May 21, 12:39 AM
Unknown Object (File)
Tue, May 21, 12:39 AM
Unknown Object (File)
Tue, May 21, 12:39 AM
Unknown Object (File)
Sun, May 19, 11:56 AM
Unknown Object (File)
Fri, May 17, 8:17 AM
Unknown Object (File)
May 11 2024, 9:06 AM
Unknown Object (File)
May 5 2024, 7:21 PM
Unknown Object (File)
May 4 2024, 1:15 PM



Enable support for .init_array and .fini_array, which FreeBSD supports
since commit 83aa9cc00c2d83d05a0efe7a1496d8aab4a153bb in the src

There __FreeBSD_version is 1000009, so we start enabling the support
from __FreeBSD_version == 1000010.

Reported by: Dan McGregor <>

Diff Detail

R11 FreeBSD ports repository
Lint Not Applicable
Tests Not Applicable

Event Timeline

This is a follow-up to the idea proposed by in

I have started testing it and eveything works for now. If everything is fine, similar patches will be committed to all gcc ports and the patch will be sent upstream.

Assuming that everything works as expected, I hope to be able to merge the patch into all the gcc*-devel ports this week, while also updating to the latest snapshots. For the other gcc ports, it could take a bit longer: I am planning to have an exp run to switch GCC_DEFAULT to 13, which will also work to test .init_array; however, if upgrading GCC_DEFAULT to 13 is too complex for now, then I will rather try to update lang/gcc12 to the latest release (which is about to be released), which will also require an exp run and will also allow for a thourough .init_array testing.

This looks good to me. It's more clear than my proposal of just force-enabling it, and looks like it's something that can be pushed upstream.

This revision is now accepted and ready to land.May 4 2023, 11:18 PM

@gerald reviewed the patch too and also approved it by email. So merging for lang/gcc*-devel ports is planned for this week snapshots.

Thanks and @gerald.