-
-
Notifications
You must be signed in to change notification settings - Fork 39.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix parallel builds w/ LTO on systems where make is not GNU make. #13955
Conversation
When compiling with LTO, the lto-wrapper of GCC will detect the presence of parallelism via the environment, and either call $MAKE or simply `make` (and the detection of a jobserver messes this up for FreeBSD). On FreeBSD and other systems, you have to build with `gmake` and the way to have lto-wrapper use the same make(1) is to pass it via the environment. This fixes the (parallel) linking when LTO is active under FreeBSD.
I'm not sure how necessary this is, since qmk_firmware/lib/python/qmk/commands.py Lines 19 to 27 in 8d4fcd6
|
That is not the issue here. In fact, I don't use the The problem is that gmake will fork lto-wrapper, which detects a parallel make, and then it produces a temporary Makefile and then it wants to fork $MAKE (falling back to So it's the compiler/linker that is forking make, not the other way round. ¯_(ツ)_/¯ A workaround for me is to run it like so: One way or the other, we need to clue in lto-wrapper to use GNU make, or disable its parallelism outright, so it stops forking make. |
Thank you for your contribution! |
This is still a problem that would be fixed by merging the request. How can I stop the stalebot? |
That's a cool change, thank you! |
When compiling with LTO, the lto-wrapper of GCC will detect the presence
of parallelism via the environment, and either call $MAKE or simply
make
(and the detection of a jobserver messes this up for FreeBSD).On FreeBSD and other systems, you have to build with
gmake
and theway to have lto-wrapper use the same make(1) is to pass it via the
environment.
This fixes the (parallel) linking when LTO is active under FreeBSD.
Description
Types of Changes
Issues Fixed or Closed by This PR
Checklist