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: honor CPPFLAGS as well for correct hardening. #80

Merged
merged 1 commit into from
Jun 23, 2023
Merged

Makefile: honor CPPFLAGS as well for correct hardening. #80

merged 1 commit into from
Jun 23, 2023

Conversation

cdluminate
Copy link
Contributor

No description provided.

@adsr
Copy link
Owner

adsr commented Jun 23, 2023

Is something like this a valid alternative?

diff --git a/debian/rules b/debian/rules
index d704428..85e99d1 100755
--- a/debian/rules
+++ b/debian/rules
@@ -2,6 +2,11 @@
 
 export DEB_BUILD_MAINT_OPTIONS=hardening=+all
 
+DPKG_EXPORT_BUILDFLAGS = 1
+include /usr/share/dpkg/buildflags.mk
+
+CFLAGS += $(CPPFLAGS)
+
 %:
 	dh $@
 

Also, is there a different Lintian config I should be using that will emit the warnings you pointed out here? This is the most verbose I can get it on my system:

test@debian:/tmp/mle.QgNxRcWtww$ lintian -I -E --pedantic mle_1.7.2-1_source.changes
X: mle source: debian-watch-does-not-check-gpg-signature
P: mle source: package-uses-old-debhelper-compat-version 10
P: mle source: silent-on-rules-requiring-root
X: mle source: upstream-metadata-file-is-missing

@cdluminate
Copy link
Contributor Author

I usually use lintian -EviI without the --pedantic option. The alternative is acceptable as long as it works.

@cdluminate
Copy link
Contributor Author

BTW, CPPFLAGS is C-Pre-Processor flags, instead of C-Plus-Plus flags. So I think it should be there in the makefile.

@adsr adsr merged commit a65d82f into adsr:master Jun 23, 2023
@adsr
Copy link
Owner

adsr commented Jun 23, 2023

Thank you for the reminder about CPPFLAGS. I often confuse it for CXXFLAGS.

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