Page MenuHomeFreeBSD

Don't try and build the bootstrap gcc on arm64
ClosedPublic

Authored by ngie on Apr 27 2015, 4:48 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Nov 18, 11:08 AM
Unknown Object (File)
Mon, Nov 18, 1:27 AM
Unknown Object (File)
Thu, Nov 14, 12:07 AM
Unknown Object (File)
Sun, Nov 10, 5:07 PM
Unknown Object (File)
Mon, Nov 4, 11:54 PM
Unknown Object (File)
Mon, Oct 28, 11:31 PM
Unknown Object (File)
Sun, Oct 27, 9:36 PM
Unknown Object (File)
Oct 7 2024, 7:33 AM

Details

Summary

Don't try and build the bootstrap gcc or g++ on arm64

The GNU toolchain lacks a configuration profile for arm64. Don't attempt to
build it (which would result in a compilation failure)

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

ngie retitled this revision from to Don't try and build the bootstrap gcc or g++ on arm64.
ngie updated this object.
ngie added a reviewer: andrew.
ngie added a subscriber: emaste.
share/mk/src.opts.mk
236 ↗(On Diff #5028)

Don't put GNUCXX here. It isn't needed.

share/mk/src.opts.mk
236 ↗(On Diff #5028)

The user can still tweak this value though:

$ make -m $PWD/share/mk -VMK_CXX -f Makefile.inc1 TARGET=arm64 TARGET_ARCH=aarch64
yes
$ make -m $PWD/share/mk -VMK_GNUCXX -f Makefile.inc1 TARGET=arm64 TARGET_ARCH=aarch64
no
$ make -m $PWD/share/mk -VBROKEN_OPTIONS -f Makefile.inc1 TARGET=arm64 TARGET_ARCH=aarch64
BINUTILS BINUTILS_BOOTSTRAP GDB

If this value is set to yes, it will try and build things in Makefile.inc1 that will certainly fail:

1693 .if ${MK_GNUCXX} != "no"
1694 _prebuild_libs+= gnu/lib/libstdc++ gnu/lib/libsupc++
1695 gnu/lib/libstdc++L: lib/msunL
1696 gnu/lib/libsupc++L: gnu/lib/libstdc++L
1697 .endif

Are you saying that MK_GNUCXX should be explicitly set to no if MK_GCC is no though?

share/mk/src.opts.mk
236 ↗(On Diff #5028)

FWIW I thought that MK_GCC = no should have implied MK_GNUCXX = no... but things got a bit knob crazy in the past few years around the compiler stuff.

share/mk/src.opts.mk
236 ↗(On Diff #5028)

If the user specifically tweaks this value, they get what they deserve. It generally isn't a value that users tweak, and at best is a value to tweak during transitions. I had a request to specifically allow it to be set independent of GCC for testing purposes, so if it defaults to the right thing, don't put it in BROKEN_OPTIONS.

ngie edited edge metadata.

Remove GNUCXX per imp's request

share/mk/src.opts.mk
236 ↗(On Diff #5028)

I really dislike footshooting knobs like this because it requires some degree of experimentation, and causes frustration when things don't work and aren't documented in the manpages.

It also makes things annoying because now I have to manage a per-architecture src.conf instead of having a universal one.

In-tree gcc/g++ are shortlived though, so I'd rather not bikeshed over this knob.. this is better than before because now things won't blow up early on in buildworld with MK_GCC*; I still think that MK_GCC=no should imply no for other build knobs, but I'll disagree and commit this if it's ok.

imp added a reviewer: imp.
This revision is now accepted and ready to land.Apr 27 2015, 7:33 PM
ngie retitled this revision from Don't try and build the bootstrap gcc or g++ on arm64 to Don't try and build the bootstrap gcc on arm64.Apr 28 2015, 7:14 PM
ngie edited edge metadata.
This revision was automatically updated to reflect the committed changes.