Skip to content

Conversation

amazingfate
Copy link

I'm doing packaging for debian these days, and I find there are missing flags when compiling:
https://salsa.debian.org/amazingfate/moonlight-qt/-/jobs/7624590

I'm using qmake6 as buildsystem supported by debhelper. There are very few qt6 projects that is using qmake6, but there is a package doesn't have this issue: https://codeberg.org/ltworf/explosive-c4/src/branch/master/debian/rules.

Now I find that it is sub dir not supporting QMAKE FLAGS passed from parent project.

debhelper is using the following qmake command:

qmake6 -makefile "QMAKE_CFLAGS_RELEASE=-g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=$PWD=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2" "QMAKE_CFLAGS_DEBUG=-g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=$PWD=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2" "QMAKE_CXXFLAGS_RELEASE=-g -O2 -ffile-prefix-map=$PWD=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2" "QMAKE_CXXFLAGS_DEBUG=-g -O2 -ffile-prefix-map=$PWD=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2" "QMAKE_LFLAGS_RELEASE=-Wl,-z,relro -Wl,-z,now" "QMAKE_LFLAGS_DEBUG=-Wl,-z,relro -Wl,-z,now" QMAKE_STRIP=: PREFIX=/usr

But at subdir qmake is not setting flags like QMAKE_CFLAGS_RELEASE with debian's default hardening flags like fstack-protector-strong. So I allow accepting QMAKE FLAGS from env so that all subdir projects can receive the flags set by debhelper.

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.

1 participant