[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#784669: FTCBFS: uses build arch compiler



Source: readline5
Version: 5.2+dfsg-2
Tags: patch
User: helmutg@debian.org
Usertags: rebootstrap

readline5 currently cannot be cross built, because it uses the build
arch compiler "gcc" instead of using the triplet-prefixed host arch
compiler. Cross compilation is needed, because lvm2 build-depends on
libreadline-gplv2-dev. Please consider applying the attached patch to
address the issue.

Helmut
diff -u readline5-5.2+dfsg/debian/changelog readline5-5.2+dfsg/debian/changelog
--- readline5-5.2+dfsg/debian/changelog
+++ readline5-5.2+dfsg/debian/changelog
@@ -1,3 +1,10 @@
+readline5 (5.2+dfsg-2.1) UNRELEASED; urgency=low
+
+  * Non-maintainer upload.
+  * Use correct compiler when cross building. Closes: #-1.
+
+ -- Helmut Grohne <helmut@subdivi.de>  Wed, 25 Feb 2015 23:05:20 +0100
+
 readline5 (5.2+dfsg-2) unstable; urgency=low
 
   * QA upload.
diff -u readline5-5.2+dfsg/debian/rules readline5-5.2+dfsg/debian/rules
--- readline5-5.2+dfsg/debian/rules
+++ readline5-5.2+dfsg/debian/rules
@@ -15,9 +15,13 @@
 
 distribution := $(shell lsb_release -is)
 
+ifeq ($(origin CC),default)
+CC = $(DEB_HOST_GNU_TYPE)-cc
+endif
+
 ifneq (,$(findstring /$(DEB_HOST_ARCH)/,/i386/powerpc/sparc/s390/))
   build64 = yes
-  CC64 = gcc -m64
+  CC64 = $(CC) -m64
   gencontrol_flags = -- \
 	'-Vdevxx:Depends=libc6-dev-$(ARCH64)'
   ifeq ($(DEB_HOST_ARCH),i386)
@@ -40,7 +44,7 @@
 
 ifneq (,$(findstring /$(DEB_HOST_ARCH)/,/amd64/ppc64/))
   build32 = yes
-  CC32 = gcc -m32
+  CC32 = $(CC) -m32
   lib32dir = lib32
   lib32devdir = usr/lib32
   gencontrol_flags = -- \
@@ -63,7 +67,6 @@
 else
   CC_LINK_FLAGS = -Wl,
 endif
-CC	= gcc
 
 SHELL	= bash
 

Reply to: