Page MenuHomeFreeBSD

Enable .init_array and .fini_array with xtoolchain GCC.
ClosedPublic

Authored by jhb on Jun 26 2018, 12:34 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Dec 8, 9:53 PM
Unknown Object (File)
Tue, Dec 3, 3:49 AM
Unknown Object (File)
Nov 25 2024, 8:21 AM
Unknown Object (File)
Nov 25 2024, 2:22 AM
Unknown Object (File)
Nov 24 2024, 10:49 PM
Unknown Object (File)
Nov 24 2024, 9:53 AM
Unknown Object (File)
Nov 24 2024, 1:30 AM
Unknown Object (File)
Nov 23 2024, 6:46 PM
Subscribers

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
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 17961
Build 17716: arc lint + arc unit

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

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.