Source: open-ath9k-htc-firmware Severity: normal Tags: patch ftbfs X-Debbugs-Cc: [email protected] User: [email protected] Usertags: origin-ubuntu stonking ubuntu-patch
Hi, open-ath9k-htc-firmware fails to build in Ubuntu, where dpkg enables the qa=framepointer build feature by default: xtensa-elf-gcc: error: unrecognized command-line option '-mno-omit-leaf-frame-pointer'; did you mean '-fno-omit-frame-pointer'? debian/rules exports the dpkg build flags (DPKG_EXPORT_BUILDFLAGS), and they reach the firmware build done with the xtensa-elf cross-compiler. The package already disables hardening for that reason; -mno-omit-leaf-frame-pointer, added by qa=framepointer, is another host-only option that the Xtensa compiler doesn't accept. In Debian the feature is off by default, so the current build works. But it fails the same way with DEB_BUILD_MAINT_OPTIONS=qa=+framepointer, or if the default changes. The attached patch adds qa=-framepointer next to the existing hardening=-all. It's a no-op for the current Debian defaults. We are carrying it in Ubuntu as 1.4.0-110-ge888634+dfsg1-0.4ubuntu1. Cheers, Sebastien -- System Information: Debian Release: forky/sid APT prefers resolute-updates APT policy: (500, 'resolute-updates'), (500, 'resolute-security'), (500, 'resolute'), (100, 'resolute-backports') Architecture: amd64 (x86_64) Kernel: Linux 7.0.0-38-generic (SMP w/16 CPU threads; PREEMPT) Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_WARN, TAINT_OOT_MODULE Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), LANGUAGE not set Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled
--- a/debian/rules +++ b/debian/rules @@ -5,7 +5,9 @@ # Stack protector needs to be disabled since that entails linking to libssp. # Other hardening flags likewise cause more problems than they solve. -export DEB_BUILD_MAINT_OPTIONS=hardening=-all +# The exported build flags also reach the xtensa-elf firmware build, so +# drop host-only options the cross-compiler does not understand. +export DEB_BUILD_MAINT_OPTIONS=hardening=-all qa=-framepointer export DEB_CFLAGS_MAINT_APPEND=-Wno-error=discarded-qualifiers -Wno-error=incompatible-pointer-types FW_FILENAME_VER = 1.4.0

