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

Makefile: cleanup build system #42

Merged
merged 1 commit into from
May 9, 2024

Conversation

intelfx
Copy link
Contributor

@intelfx intelfx commented May 9, 2024

Allow overriding the "general purpose" (performance, debugging, hardening) flags in $(CFLAGS), $(CXXFLAGS) and $(LDFLAGS) while at the same time ensuring they always contain the "functionally required" flags (C/C++ standard conformance, diagnostics and preprocessor definitions).


This e.g. makes it possible to build inotify-info with

$ make CFLAGS=-O2 CXXFLAGS=-O2

Where -O2 overrides the instruction set, optimization level and debugging information generation flags (as might be the distro policy), while keeping the necessary flags such as -std=... and -D... intact.

Allow overriding the "general purpose" (performance, debugging, hardening)
flags in $(CFLAGS), $(CXXFLAGS) and $(LDFLAGS) while at the same time
ensuring they always contain the "functionally required" flags
(C/C++ standard conformance, diagnostics and preprocessor definitions).
@motiejus motiejus merged commit d3b8f6e into mikesart:master May 9, 2024
5 checks passed
@motiejus
Copy link
Collaborator

motiejus commented May 9, 2024

Thanks! I just realized I have packaged this to NixOS with -march=native.

@motiejus
Copy link
Collaborator

motiejus commented May 9, 2024

I think we should get rid of -march=native and leave it to the callers. Can you review #44 ?

This pull request was closed.
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.

2 participants