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

Make sure that CFLAGS from the cmdline are honoured #202

Merged
merged 1 commit into from
Jan 12, 2025

Conversation

umlaeute
Copy link
Contributor

both the levels and the three_point_balance filters require C99, and therefore add -std=c99 to the CFLAGS.

Unfortunately, they do so in a way that will ignore any CFLAGS set by the user (e.g. via envvars):

set(CMAKE_C_FLAGS "-std=c99")

a better way is of course to append the -std=c99 to any pre-existing CFLAGS.
This is what this PR proposes.

background: in Debian, we set some additional hardening flags (totalling to -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection).
Currently our flags are simply ignored (and thus our QA bails out), with the attached patch, everything works as it should.

Origin: Debian
Bug: <URL to the upstream bug report if any, implies patch has been forwarded, optional>
Forwarded: no
Last-Update: 2025-01-11

Last-Update: 2025-01-11
Gbp-Pq: Name apply_CFLAGS.patch
@jaromil jaromil merged commit 8bf0322 into dyne:master Jan 12, 2025
2 checks passed
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