Skip to content

Makefile: don't override LDFLAGS - #24

Open
thejh wants to merge 1 commit into
nyx-fuzz:devfrom
thejh:fix-ldflags
Open

Makefile: don't override LDFLAGS#24
thejh wants to merge 1 commit into
nyx-fuzz:devfrom
thejh:fix-ldflags

Conversation

@thejh

@thejh thejh commented May 9, 2025

Copy link
Copy Markdown

Since commit 64311c8, LDFLAGS is overridden by "LDFLAGS =", causing linker flags specified by the caller to be ignored.
This seems to have been an accident while moving things around - delete that line.
This makes the QEMU-Nyx static build work again for me; otherwise, libcapstone.so.4 can't be found.
(I'm not going to ask why a static build involves a shared library in the first place...)

Since commit 64311c8, LDFLAGS is
overridden by "LDFLAGS =", causing linker flags specified by the caller to
be ignored.
This seems to have been an accident while moving things around - delete
that line.
This makes the QEMU-Nyx static build work again for me; otherwise,
libcapstone.so.4 can't be found.
(I'm not going to ask why a static build involves a shared library in the
first place...)
@morehouse

Copy link
Copy Markdown

I also ran into this when trying to build AFL++ Nyx mode.

QEMU-Nyx sets LDFLAGS so that capstone v4 can be linked, but libxdc then ignores the LDFLAGS. So unless you already have capstone v4 installed on your system, the build fails.

It would be great if this simple fix could be merged.

@morehouse morehouse left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM, this is how I fixed my build issues locally as well.

fanquake added a commit to fanquake/QEMU-Nyx that referenced this pull request Jan 5, 2026
@fanquake

fanquake commented Jan 30, 2026

Copy link
Copy Markdown

+1. Would be great to land this (closes #23).

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.

3 participants