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

Fix build with make-4.4. #77

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

valandil
Copy link

make-4.4 changed the behaviour of .SECONDEXPANSION to only expand rules that were explicitly used by the currently built target. Because leveldata used .SECONDEXPANSION to override an implicit pattern rule with another implicit pattern rule, the override wasn't considered for expansion and never used. By replacing the implicit pattern override with a static pattern override, i.e. by explicitly listing the dependencies, the rule takes precedence over the implicit pattern rule ($(BUILD_DIR)/*.elf) and gets expanded.

This patch fixes the build for make-4.4, and was also tested with make-4.3.

make-4.4 changed the behaviour of .SECONDEXPANSION to only
expand rules that were explicitly used by the currently built target.
Because leveldata used .SECONDEXPANSION to override an implicit pattern
rule with another implicit pattern rule, the override wasn't considered
for expansion and never used. By replacing the implicit pattern override
with a static pattern override, i.e. by explicitly listing the dependencies,
the rule takes precedence over the implicit pattern rule ($(BUILD_DIR)/*.elf)
and gets expanded.

This patch fixes the build for make-4.4, and was also tested with make-4.3.
Copy link

@Sonic1paRadise Sonic1paRadise left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

X No default remote repository has been set for this directory.

@mountainflaw
Copy link
Collaborator

Will be merged in upstream after testing.

@Sonic1paRadise
Copy link

Sonic1paRadise commented Sep 6, 2023 via email

@zZeck
Copy link

zZeck commented Feb 7, 2024

I just hit this when building on Gentoo. The fix works great.

@ghost
Copy link

ghost commented Feb 16, 2024

This PR fixed the undefined reference to building errors on Arch Linux.

I highly suggest merging this PR - otherwise people will assume the project is broken and start complaining about it through invalid PRs (since the ability to open an Issue is disabled) or the Discord server (which appears to be dead with barely anyone chatting in it).

Not to mention, this repository hasn't had any activity for 6 months. If this repository is abandoned, I suggest marking it as archive or so.

@bahamas10
Copy link

This PR fixed the issues as noted in my gist here https://gist.github.com/bahamas10/92b742bd88d3ce106de271454bb5fbd6 on an m1 mac.

@legluondunet
Copy link

legluondunet commented May 27, 2024

This pr fixed my compilation error on Manjaro 24.0.0 Wynsdey wich uses GNU Make 4.4.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants