Bug#865887: libdumb FTCBFS: uses the build architecture compiler

Helmut Grohne helmut at subdivi.de
Sun Jun 25 15:52:37 UTC 2017


Source: libdumb
Version: 1:0.9.3-6
Tags: patch
User: helmutg at debian.org
Usertags: rebootstrap

libdumb fails to cross build from source, because it uses the build
architecture compiler. Adding the $(DEB_HOST_GNU_TYPE) as a prefix to
the compiler fixes that. Please consider applying the attached patch. It
also ensures that a CC environment variable is properly propagated to
the build (e.g. for building with clang).

Helmut
-------------- next part --------------
diff --minimal -Nru libdumb-0.9.3/debian/changelog libdumb-0.9.3/debian/changelog
--- libdumb-0.9.3/debian/changelog	2013-06-07 23:09:54.000000000 +0200
+++ libdumb-0.9.3/debian/changelog	2017-06-25 17:48:41.000000000 +0200
@@ -1,3 +1,10 @@
+libdumb (1:0.9.3-6.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: Supply CC as a cross compiler. (Closes: #-1)
+
+ -- Helmut Grohne <helmut at subdivi.de>  Sun, 25 Jun 2017 17:48:41 +0200
+
 libdumb (1:0.9.3-6) unstable; urgency=low
 
   * I took over the package after it was unmaintained for a long time.
diff --minimal -Nru libdumb-0.9.3/debian/rules libdumb-0.9.3/debian/rules
--- libdumb-0.9.3/debian/rules	2013-06-07 23:12:54.000000000 +0200
+++ libdumb-0.9.3/debian/rules	2017-06-25 17:48:39.000000000 +0200
@@ -7,7 +7,11 @@
 CFLAGS  := $(shell dpkg-buildflags --get CFLAGS)
 LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS)
 
-DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
+include /usr/share/dpkg/architecture.mk
+
+ifeq ($(origin CC),default)
+CC := $(DEB_HOST_GNU_TYPE)-gcc
+endif
 
 # Compilation options
 export CONFIG_FLAGS="--prefix=/usr"
@@ -29,13 +33,13 @@
 	echo 'PREFIX := /usr' >> make/config.txt
 	mkdir -p obj/unix/release/
 	mkdir -p lib/unix/
-	$(MAKE) lib/unix/libdumb.a
-	$(MAKE) lib/unix/libaldmb.a
+	$(MAKE) lib/unix/libdumb.a CC='$(CC)'
+	$(MAKE) lib/unix/libaldmb.a CC='$(CC)'
 	cp lib/unix/libdumb.a .
 	cp lib/unix/libaldmb.a .
 	$(MAKE) clean
-	$(MAKE) lib/unix/libdumb.a CFLAGS_EXTRA=-fPIC
-	$(MAKE) lib/unix/libaldmb.a CFLAGS_EXTRA=-fPIC
+	$(MAKE) lib/unix/libdumb.a CC='$(CC)' CFLAGS_EXTRA=-fPIC
+	$(MAKE) lib/unix/libaldmb.a CC='$(CC)' CFLAGS_EXTRA=-fPIC
 	$(CC) $(CFLAGS) $(LDFLAGS) -Wl,-soname,libdumb.so.1 -shared `sed -ne '/^CORE_MODULES :=/,/c$$/p' < Makefile | sed -e 's,\\\\,,' -e 's,.*/\\(.*\\)\\.c,obj/unix/release/\\1.o,' | tail -n +2` -o libdumb.so.1.0.0 -lm -lc
 	ln -s libdumb.so.1.0.0 libdumb.so
 	$(CC) $(CFLAGS) $(LDFLAGS) -Wl,-soname,libaldmb.so.1 -shared `sed -ne '/^ALLEGRO_MODULES :=/,/c$$/p' < Makefile | sed -e 's,\\\\,,' -e 's,.*/\\(.*\\)\\.c,obj/unix/release/\\1.o,' | tail -n +2` -o libaldmb.so.1.0.0 -L. -ldumb `allegro-config --libs` -lm -lc


More information about the Pkg-games-devel mailing list