Page MenuHomeFreeBSD

Remove the build-tools phase from buildworld
Needs RevisionPublic

Authored by arichardson on Jan 20 2021, 2:24 PM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 22 2023, 10:59 PM
Unknown Object (File)
Dec 17 2023, 3:48 AM
Unknown Object (File)
Dec 11 2023, 3:46 AM
Unknown Object (File)
Nov 28 2023, 2:02 AM
Unknown Object (File)
Nov 9 2023, 5:06 AM
Unknown Object (File)
Oct 27 2023, 11:08 AM
Unknown Object (File)
Oct 27 2023, 1:00 AM
Unknown Object (File)
Oct 8 2023, 4:01 AM
Subscribers

Details

Reviewers
bdrewery
emaste
brooks
sjg
Group Reviewers
manpages
Summary

After D28253 this phase is no longer needed. I'm not sure if there are
downstream consumers of LOCAL_TOOLS_DIRS so it probably makes sense to
keep this separate.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 36364
Build 33253: arc lint + arc unit

Event Timeline

share/mk/local.meta.sys.mk
211–216

Please test code that is removed. There's no way this still works for cross builds.

bdrewery added inline comments.
share/man/man7/build.7
585–589

This is removing an advertised feature. What justification is there that downstream people should do work to resolve this?

This revision now requires changes to proceed.Jan 21 2021, 5:53 PM
share/man/man7/build.7
585–589

I posted this review to determine if there is any out-of-tree use of this feature. I'm fine not committing it, I just thought it simplifies quite a few makefiles.

I wasn't sure if there are any downstream users. For me the presence of build-tools has caused lots of confusing build failures due to make clean && make all not working. Other projects such as binutils/gdb seem to use variables such as CC_FOR_BUILD/CC_FOR_TARGET to allow building tools that generate build inputs without needing a pre-build phase.

share/man/man7/build.7
585–589

Yes I'm all for having more clear distinction between host and target compilers. I also dislike that we have legacy, build, cross, bootstrap. It feels overly redundant but each does have subtle differences. I know at least my work is using each via these LOCAL_DIRS to do specific tasks.

I think what would work is stepping back and rather than removing, first understanding all of the pieces in each phase and then designing something that works for each of those and their advertised features.

Specifically I think build-tools is a hack to allow building the same Makefile for both target and host. A simpler solution, I think, would be to move all of those tools into their own Makefiles/dirs so they *always* build as host binaries.

share/man/man7/build.7
585–589

Moving them to separate directories sounds like it would solve lots of problems. Building multiple binaries with different flags in the same makefile is indeed rather fragile. I'll try that approach next. Thanks for the suggestion!