Skip to content

Makefile: Pass CFLAGS to the compiler when invoking the linker.#23

Merged
solardiz merged 1 commit intoopenwall:mainfrom
besser82:topic/besser82/apply_cflags_for_linking
Dec 16, 2024
Merged

Makefile: Pass CFLAGS to the compiler when invoking the linker.#23
solardiz merged 1 commit intoopenwall:mainfrom
besser82:topic/besser82/apply_cflags_for_linking

Conversation

@besser82
Copy link
Copy Markdown
Contributor

Some CFLAGS imply effects on the linker too (e.g., -fsanitize=), so they must get passed within the linker rule as well.

Some CFLAGS imply effects on the linker too (e.g., -fsanitize=),
so they must get passed within the linker rule as well.

Signed-off-by: Björn Esser <besser82@fedoraproject.org>
@solardiz solardiz requested a review from ldv-alt December 15, 2024 17:56
@solardiz
Copy link
Copy Markdown
Member

Looks good to me, although I'm not sure what the current best practice is.
@ldv-alt What do you think?

Copy link
Copy Markdown
Collaborator

@ldv-alt ldv-alt left a comment

Choose a reason for hiding this comment

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

Yes, this is the accepted way of doing the linking nowadays.
For example, GNU automake is generating that kind of linking rules.

@solardiz solardiz merged commit 539ebde into openwall:main Dec 16, 2024
@besser82 besser82 deleted the topic/besser82/apply_cflags_for_linking branch December 16, 2024 18:42
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