Page MenuHomeFreeBSD

Enable .init_array and .fini_array with xtoolchain GCC.

Authored by jhb on Jun 26 2018, 12:34 AM.
Referenced Files
Unknown Object (File)
Wed, Jul 10, 11:08 PM
Unknown Object (File)
Mon, Jul 1, 10:37 AM
Unknown Object (File)
Thu, Jun 27, 12:16 AM
Unknown Object (File)
Thu, Jun 27, 12:01 AM
Unknown Object (File)
Tue, Jun 25, 9:34 AM
Unknown Object (File)
Mon, Jun 24, 3:16 PM
Unknown Object (File)
Mon, Jun 24, 8:55 AM
Unknown Object (File)
Mon, Jun 17, 10:43 AM



For base/gcc, only enable .init_array and .fini_array for 12.0 and later
to match the policy used by clang and llvm. For the xtoolchain ports,
enable these unconditionally since the only OS version handy is the OS
version of the build host, not the target OS to be built. Unlike llvm,
the use of .init_array and .fini_array is set at compile-time for GCC
and can't be changed at runtime.

Bump PORTREVISION for base/gcc and the xtoolchain GCC ports.

Test Plan
  • built and ran a FreeBSD/mips world with this enabled. The native self-hosted world is still trying to finish, but it has made sufficient progress that it should be using some cross-tools built with the base/gcc native compiler.

Diff Detail

rP FreeBSD ports repository
Lint Not Applicable
Tests Not Applicable

Event Timeline

Do these need PORTREVISION bumps?

Yes, they probably will need those. I wanted to get feedback for the idea of how these are enabled (if we wanted to do something with OSVERSION, etc.) first and then add the bumps to the final candidate patch.

accepted with a bump of portrevision

This revision is now accepted and ready to land.Jun 28 2018, 7:08 AM
  • Make init/fini conditional on OSVERSION for base/gcc.
  • Add PORTREVISION bumps.
This revision now requires review to proceed.Jun 29 2018, 6:39 PM
46 ↗(On Diff #44651)

I still think I can't really make this one conditional b/c we don't know the target OS version (OSVERSION is the OS version of the build host, not the target we are planning to build).

jhb edited the summary of this revision. (Show Details)
  • Don't enable init_array/fini_array for arm-none-eabi-gcc and aarch64-none-elf-gcc.
This revision was not accepted when it landed; it landed in state Needs Review.Jul 11 2018, 4:50 PM
This revision was automatically updated to reflect the committed changes.