Source: strace Version: 7.0+ds-1 Tags: patch User: [email protected] Usertags: ftcbfs
strace fails to cross build from source when building for arm64 on amd64. Many other architecture combinations just work. What is unique about arm64 is CFLAGS containing -mbranch-protection=standard. Unfortunately, this flag makes it into CFLAGS_FOR_BUILD and from there it is used for compiling ioctlsort with CC_FOR_BUILD, which doesn't like the flag. I traced this down to debian/rules assigning CFLAGS to CFLAGS_FOR_BUILD with a comment "ioctlsort is compiled with *_FOR_BUILD flags". I guess that in earlier times, dpkg's buildflags.mk was not setting CFLAGS_FOR_BUILD and then blhc was complaining about missing flags while compiling ioctlsort. Nowadays, buildflags.mk properly initializes CFLAGS_FOR_BUILD. Hence, I propose to turn the = assignment into a ?= assignment. You could also drop the assignment entirely and just export the value from buildflags.mk. This is all that is needed for making strace cross build for arm64. Helmut
diff -Nru strace-7.0+ds/debian/changelog strace-7.0+ds/debian/changelog --- strace-7.0+ds/debian/changelog 2026-06-05 05:18:44.000000000 +0200 +++ strace-7.0+ds/debian/changelog 2026-06-22 13:13:55.000000000 +0200 @@ -1,3 +1,10 @@ +strace (7.0+ds-1.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix FTCBFS: Do not force host flags on the build compiler. (Closes: #-1) + + -- Helmut Grohne <[email protected]> Mon, 22 Jun 2026 13:13:55 +0200 + strace (7.0+ds-1) unstable; urgency=medium * Update upstream OpenPGP signing key diff -Nru strace-7.0+ds/debian/rules strace-7.0+ds/debian/rules --- strace-7.0+ds/debian/rules 2026-06-05 05:18:44.000000000 +0200 +++ strace-7.0+ds/debian/rules 2026-06-22 13:13:55.000000000 +0200 @@ -16,9 +16,9 @@ endif # ioctlsort is compiled with *_FOR_BUILD flags -export CFLAGS_FOR_BUILD = $(CFLAGS) -export CPPFLAGS_FOR_BUILD = $(CPPFLAGS) -export LDFLAGS_FOR_BUILD = $(LDFLAGS) +export CFLAGS_FOR_BUILD ?= $(CFLAGS) +export CPPFLAGS_FOR_BUILD ?= $(CPPFLAGS) +export LDFLAGS_FOR_BUILD ?= $(LDFLAGS) ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))

