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

Honor the value of CPPFLAGS set in the environment #1910

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

rlaboiss
Copy link
Member

@rlaboiss rlaboiss commented Nov 4, 2021

This in necessary for distributions, like Debian, that require that C/C++ code must be compiled with certain options (like -D_FORTIFY_SOURCE=2, see the Hardening Requirements in Debian).

In the present patch, the statements for setting the variables CPPFLAGS in the Makefiles have been changed from = to +=.

@adriaandegroot
Copy link
Contributor

Are you intentionally not touching external/flac and external/gsl ? (Or perhaps asked differently: doesn't Debian use unbundled dependencies, so why bother changing the external/ bits?)

@rlaboiss
Copy link
Member Author

rlaboiss commented Dec 1, 2021

(Or perhaps asked differently: doesn't Debian use unbundled dependencies, so why bother changing the external/ bits?)

No, Debian uses the bundled flac and gsl dependencies.

Are you intentionally not touching external/flac and external/gsl ?

Thanks for drawing my attention to this. Debian has a mechanism for injecting the hardening flags into the generated file makefile.defs (the debian/rules file does it through a snippet). Since makefile.defs is included in flac/Makefile and gsl/Makefile, there is no need for patching them. On the other hand, the patch is necessary for the other Makefiles because they do not respect previous settings of CPPFLAGS.

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.

None yet

2 participants