Source: tuxpuck
Version: 0.8.2-12
Tags: patch upstream
User: [email protected]
Usertags: ftcbfs

tuxpuck cross builds successfully for a number of architectures. It
fails for e.g. arm64. That is an architecture that has gained
architecture-specific compiler flags such as
-mbranch-protection=standard. tuxpuck has some compiler invocations for
the build architecture compiler, but does not yet distinguish between
build architecture flags and host architecture flags. Hence, the build
architecture compiler invocation can fail. I'm attaching a patch that
applies the *_FOR_BUILD concept to more variables. debhelper already
passes them all, so the buildsystem change is enough to make it cross
build for more architectures.

Helmut
--- tuxpuck-0.8.2.orig/utils/Makefile
+++ tuxpuck-0.8.2/utils/Makefile
@@ -1,18 +1,22 @@
 # Makefile for TuxPuck Utils , Copyright Jacob Kroon 2001-2002
 CC_FOR_BUILD	= gcc
+PKG_CONFIG_FOR_BUILD = pkg-config
+CFLAGS_FOR_BUILD ?= $(CFLAGS)
+CPPFLAGS_FOR_BUILD ?= $(CPPFLAGS)
+LDFLAGS_FOR_BUILD ?= $(LDFLAGS)
 CFLAGS		+= -g -Wall -Werror
 #############################################################
 
 all : ttf2font data2c anim
 
 ttf2font : ttf2font.c
-	$(CC_FOR_BUILD) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) ttf2font.c `pkg-config --cflags --libs freetype2` -o ttf2font
+	$(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(CPPFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) ttf2font.c `$(PKG_CONFIG_FOR_BUILD) --cflags --libs freetype2` -o ttf2font
 
 data2c : data2c.c
-	$(CC_FOR_BUILD) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) data2c.c -o data2c
+	$(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(CPPFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) data2c.c -o data2c
 
 anim : anim.c
-	$(CC_FOR_BUILD) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) anim.c -o anim
+	$(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(CPPFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) anim.c -o anim
 
 clean :
 	rm -f *~ data2c ttf2font anim

Reply via email to