Bug#871034: gcc-7: Please pass --program-prefix=$(cmd_prefix) for cross-build-native builds
Source: gcc-7
Version: 6.3.0-18
Severity: normal
Tags: patch
User: helmutg@debian.org
Usertags: rebootstrap
Hi!
Trying to cross-build a native compiler (build_type == cross-build-native)
fails with:
dh_movefiles -pcpp-7 usr/bin/powerpc-linux-gnuspe-cpp-7 usr/lib/gcc/powerpc-linux-gnuspe/7/cc1
dh_movefiles: debian/tmp/usr/bin/powerpc-linux-gnuspe-cpp-7 not found (supposed to put it in cpp-7)
debian/rules.d/binary-cpp.mk:27: recipe for target 'stamps/08-binary-stamp-cpp' failed
make[1]: *** [stamps/08-binary-stamp-cpp] Error 1
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
debian/rules:70: recipe for target 'binary-arch' failed
make: *** [binary-arch] Error 2
dpkg-buildpackage: error: fakeroot debian/rules binary-arch gave error exit status 2
This happens because --program-prefix is not being set.
This is fixed with:
--- debian/rules2~ 2017-08-06 20:48:20.000000000 +0200
+++ debian/rules2 2017-08-06 20:50:04.069729038 +0200
@@ -186,7 +186,7 @@
ifeq ($(versioned_packages),yes)
CONFARGS += --program-suffix=-$(BASE_VERSION)
endif
-ifeq ($(build_type),build-native)
+ifneq (,$(filter $(build_type),build-native cross-build-native))
CONFARGS += --program-prefix=$(cmd_prefix)
endif
Attaching a patch as well.
Adrian
--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer - glaubitz@debian.org
`. `' Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
--- debian/rules2~ 2017-08-06 20:48:20.000000000 +0200
+++ debian/rules2 2017-08-06 20:50:04.069729038 +0200
@@ -186,7 +186,7 @@
ifeq ($(versioned_packages),yes)
CONFARGS += --program-suffix=-$(BASE_VERSION)
endif
-ifeq ($(build_type),build-native)
+ifneq (,$(filter $(build_type),build-native cross-build-native))
CONFARGS += --program-prefix=$(cmd_prefix)
endif
Reply to: