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

Build system should honor CC, CFLAGS, CXX, CXXFLAGS #453

Closed
fweimer opened this issue Jul 26, 2016 · 3 comments
Closed

Build system should honor CC, CFLAGS, CXX, CXXFLAGS #453

fweimer opened this issue Jul 26, 2016 · 3 comments

Comments

@fweimer
Copy link

fweimer commented Jul 26, 2016

Build systems for native binaries should honor the environment variables CC, CFLAGS, CXX, CXXFLAGS, LDFLAGS and pass them to compiler and linker invocations.

The idea is that it should be easy to enable special build features like Address Sanitizier, or to comply with distribution hardening best practices.

If these variables are set, they should not override critical flags required by the existing build system.

@david-a-wheeler
Copy link
Collaborator

Here's a proposed tweak:

Build systems for native binaries SHOULD honor the relevant compiler and linker environment variables passed in to them (e.g., CC, CFLAGS, CXX, CXXFLAGS, and LDFLAGS) and pass them to compiler and linker invocations. A build system MAY extend them with additional flags; it SHOULD NOT simply replace provided values with its own.
DETAILS: It should be easy to enable special build features like Address Sanitizier (ASAN), or to comply with distribution hardening best practices (e.g., by easily turning on compiler flags to do so).

@fweimer
Copy link
Author

fweimer commented Oct 17, 2016

Colin Walters had the same idea: https://github.com/cgwalters/build-api

@david-a-wheeler
Copy link
Collaborator

I've added this as a proposed criterion for the "passing+1" badge level (making it a MUST).

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

No branches or pull requests

2 participants