Source: binutils
Version: 2.35.1-5
Tags: patch
User: debian-cr...@lists.debian.org
Usertags: ftcbfs

binutils fails to cross build from source since --enable-pgo-build=lto.
This configuration fundamentally cannot work during cross builds. I
think this is the point where we cannot achieve cross vs native
reproducibility and should quite simply disable pgo for cross builds
only to have them build at all. Please consider applying the attached
patch.

Helmut
diff --minimal -Nru binutils-2.35.1/debian/changelog 
binutils-2.35.1/debian/changelog
--- binutils-2.35.1/debian/changelog    2020-12-17 20:42:32.000000000 +0100
+++ binutils-2.35.1/debian/changelog    2020-12-21 12:50:49.000000000 +0100
@@ -1,3 +1,10 @@
+binutils (2.35.1-5.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: Disable pgo for cross builds. (Closes: #-1)
+
+ -- Helmut Grohne <hel...@subdivi.de>  Mon, 21 Dec 2020 12:50:49 +0100
+
 binutils (2.35.1-5) unstable; urgency=medium
 
   * Backport the PGO/LTO build patches.
diff --minimal -Nru binutils-2.35.1/debian/rules binutils-2.35.1/debian/rules
--- binutils-2.35.1/debian/rules        2020-12-17 20:20:38.000000000 +0100
+++ binutils-2.35.1/debian/rules        2020-12-21 12:50:47.000000000 +0100
@@ -302,9 +302,9 @@
 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
   CFLAGS = -g -O0
 else
-  #ifneq (,$(filter $(DEB_HOST_ARCH), amd64 i386 x32))
+  ifeq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
     CONF_PGO = --enable-pgo-build=lto
-  #endif
+  endif
 endif
 
 # this outputs 0 or 1 depending on whether a macro appears in the *default* cpp

Reply via email to