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