Skip to content

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.

1 participant