Page MenuHomeFreeBSD

Enable .init_array and .fini_array with xtoolchain GCC.
ClosedPublic

Authored by jhb on Jun 26 2018, 12:34 AM.

Details

Summary

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

Repository
rP FreeBSD ports repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit 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
devel/powerpc64-gcc/Makefile
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.