Skip to content
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

Tweak MAKEFLAGS and -X interaction #138

Open
wants to merge 1 commit into
base: remake-4-3
Choose a base branch
from

Conversation

ronan-d
Copy link

@ronan-d ronan-d commented Aug 19, 2022

Hi, this patch addresses an issue I had using remake with Linux's build system. The issue is described in the commit message.

The mechanism introduced is a little clunky and it uses global state, but I've been using remake with this patch applied for a while and it does not seem to break anything.

Before this commit, running one of "continue", "next", "step" or "finish"
in the interactive debugger overwrote the value of MAKEFLAGS to either
"" or "-X".

This was sometimes a problem. For instance, with Linux v5.18, first
setting up the build system with `make defconfig`, launching the
debugger with `remake -X modules`, and running `continue` triggered
the following error:

	m2c    -o fs/efivarfs/efivarfs.o fs/efivarfs/efivarfs.mod
	remake[1]: m2c: No such file or directory
	<builtin>*** [fs/efivarfs/efivarfs.o] error 127

This happened because the root makefile disables Make's built-in rules
by appending "-R" to MAKEFLAGS, and the other makefiles rely on these
rules being disabled. `continue` overwrote MAKEFLAGS, which caused
recursive make instances to have built-in rules enabled.

This commit fixes this issue by changing the way the debugger commands
communicate status to other instances. It still happens through MAKEFLAGS,
but the value is now generated using the same function upstream Make uses.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant