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

Propogate LDFLAGS and other user-supplied options #1168

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

Conversation

mr-c
Copy link

@mr-c mr-c commented Feb 29, 2024

We use this patch for the Debian package of minimap2.

@jmarshall
Copy link
Contributor

LDFLAGS naturally goes alongside CFLAGS, not at the end of the command.

Co-authored-by: Michael R. Crusoe <crusoe@debian.org>
@mr-c
Copy link
Author

mr-c commented Feb 29, 2024

Good point @jmarshall , thanks!

@jmarshall
Copy link
Contributor

It goes alongside the other flag options on the commands that are doing linking. All those *.o recipes should not include $(LDFLAGS); having it there will lead to “argument unused during compilation” warnings with Clang.

endif

ksw2_extz2_sse41.o:ksw2_extz2_sse.c ksw2.h kalloc.h
$(CC) -c $(CFLAGS) -msse4.1 $(CPPFLAGS) -DKSW_CPU_DISPATCH $(INCLUDES) $< -o $@
$(CC) -c $(CFLAGS) $(LDFLAGS) -msse4.1 $(CPPFLAGS) -DKSW_CPU_DISPATCH $(INCLUDES) $< -o $@
Copy link
Owner

Choose a reason for hiding this comment

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

Do we need LDFLAGS for compiling? I thought this flag is only used for linking?

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.

4 participants