Source: ipxe Version: 1.21.1+git20220113.fbbdc3926+dfsg-4 Tags: patch User: debian-cr...@lists.debian.org Usertags: ftcbfs
ipxe fails to cross build from source e.g. for amd64 -> arm64 as it passes e.g. -mbranch-protection=standard to x86_64-linux-gnu-gcc and gcc does not like that. The way buildflags are computed does not correctly take the architecture switching into account. I'm attaching a patch to address this aspect. Helmut
diff --minimal -Nru ipxe-1.21.1+git20220113.fbbdc3926+dfsg/debian/changelog ipxe-1.21.1+git20220113.fbbdc3926+dfsg/debian/changelog --- ipxe-1.21.1+git20220113.fbbdc3926+dfsg/debian/changelog 2025-02-04 00:09:05.000000000 +0100 +++ ipxe-1.21.1+git20220113.fbbdc3926+dfsg/debian/changelog 2025-02-04 09:42:11.000000000 +0100 @@ -1,3 +1,10 @@ +ipxe (1.21.1+git20220113.fbbdc3926+dfsg-4.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix FTCBFS: Correctly compute build flags. (Closes: #-1) + + -- Helmut Grohne <hel...@subdivi.de> Tue, 04 Feb 2025 09:42:11 +0100 + ipxe (1.21.1+git20220113.fbbdc3926+dfsg-4) unstable; urgency=medium [ Miao Wang ] diff --minimal -Nru ipxe-1.21.1+git20220113.fbbdc3926+dfsg/debian/rules ipxe-1.21.1+git20220113.fbbdc3926+dfsg/debian/rules --- ipxe-1.21.1+git20220113.fbbdc3926+dfsg/debian/rules 2025-02-04 00:07:07.000000000 +0100 +++ ipxe-1.21.1+git20220113.fbbdc3926+dfsg/debian/rules 2025-02-04 09:42:11.000000000 +0100 @@ -40,9 +40,9 @@ CC="$${CROSS}gcc" \ CXX="$${CROSS}g++" \ PKG_CONFIG="$${CROSS}pkg-config" \ -CFLAGS="$$(dpkg-buildflags --get CFLAGS)" \ -CPPFLAGS="$$(dpkg-buildflags --get CPPFLAGS)" \ -LDFLAGS="$$(dpkg-buildflags --get LDFLAGS)" \ +CFLAGS="$$(dpkg-architecture -a${DEB_HOST_ARCH} -f -c dpkg-buildflags --get CFLAGS)" \ +CPPFLAGS="$$(dpkg-architecture -a${DEB_HOST_ARCH} -f -c dpkg-buildflags --get CPPFLAGS)" \ +LDFLAGS="$$(dpkg-architecture -a${DEB_HOST_ARCH} -f -c dpkg-buildflags --get LDFLAGS)" \ dh_auto_build --sourcedirectory=src -- \ V=1 NO_WERROR=1 VERSION="$(DEB_VERSION)" $(subst src/,,$@) endef