Source: le-dico-de-rene-cougnenc
Version: 1.4-3
Severity: serious
Tags: ftbfs patch

https://buildd.debian.org/status/logs.php?pkg=le-dico-de-rene-cougnenc&ver=1.4-3

...
cc -fstack-protector-strong -fstack-clash-protection -Wformat 
-Werror=format-security -fcf-protection -D_FORTIFY_SOURCE=2 -Wl,-z,relro -g -O2 
dico.c -o dico-rc
cc1: error: ‘-fcf-protection=full’ is not supported for this target
make[2]: *** [Makefile:6: dico-rc] Error 1
...


The manual setting of flags causes two issues:
- -fcf-protection is only supported on x86
  (and dpkg adds it only there with hardening=+all)
- you are overwriting the flags from dpkg, note how your
  "-Wall -pedantic" is not in the build log on any architecture
  and also no hardening flags provided by hardening=+all

Additionally, since bullseye our toolchain defaults to -Wl,--as-needed
so manually setting it is not necessary.


--- debian/rules.old    2025-09-03 19:14:28.795127407 +0000
+++ debian/rules        2025-09-03 19:24:36.930581608 +0000
@@ -2,10 +2,6 @@
 
 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 export DEB_CFLAGS_MAINT_APPEND  = -Wall -pedantic
-export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
-export CFLAGS += -fstack-protector-strong -fstack-clash-protection -Wformat 
-Werror=format-security -fcf-protection
-export CPPFLAGS += -D_FORTIFY_SOURCE=2
-export LDFLAGS += -Wl,-z,relro
 
 %:
        dh $@

Reply via email to