Source: ace-of-penguins
Version: 1.5~rc2-5
Tags: patch upstream
User: [email protected]
Usertags: ftcbfs

ace-of-penguins fails to cross build from source, because it confuses
build architecture and host architecture compiler flags. This happens at
the upstream level already. It hasn't been a problem earlier, but now
with PAC/BTI arm64 and amd64 have architecture-specific default flags
that happen to not work on other architectures. I suggest that you move
to AX_PROG_CC_FOR_BUILD from autoconf-archive instead of reinventing the
wheel here and attach a patch for your convenience.

Helmut
--- ace-of-penguins-1.5~rc2.orig/configure.in
+++ ace-of-penguins-1.5~rc2/configure.in
@@ -45,10 +45,10 @@
 AC_PROG_LN_S
 AC_PROG_MAKE_SET
 
-AC_CHECK_PROGS(BUILD_CC,gcc cc ${CC},gcc)
 AC_CHECK_PROG(AR,${AR:-ar},${AR:-ar},ar)
 AC_CHECK_PROG(LD,${LD:-ld},${LD:-ld},ld)
 AC_CHECK_PROG(STRIP,${STRIP:-strip},${STRIP:-strip},strip)
+AX_PROG_CC_FOR_BUILD
 
 dnl Checks for libraries.
 dnl Replace `main' with a function in -lgd:
--- ace-of-penguins-1.5~rc2.orig/lib/Makefile.am
+++ ace-of-penguins-1.5~rc2/lib/Makefile.am
@@ -8,7 +8,6 @@
 AM_CPPFLAGS = $(X_CFLAGS) @PDA@
 AM_LDFLAGS = $(X_LIBS)
 
-BUILD_CC = @BUILD_CC@
 AR = @AR@
 STRIP = @STRIP@
 
@@ -20,11 +19,11 @@
 # table_ai.c table_ck.c table_dc.c table_dg.c \
 #table_dp.c table_in.c table_ky.c table_rd.c table_rs.c
 
-images.c : make-imglib Makefile images.in
+images.c : make-imglib$(BUILD_EXEEXT) Makefile images.in
 	./make-imglib -n cards -i $(srcdir)/png -d images.d $(srcdir)/images.in images.c
 
-make-imglib$(EXEEXT) : make-imglib.c
-	$(BUILD_CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(srcdir)/make-imglib.c -o make-imglib -lpng -lz
+make-imglib$(BUILD_EXEEXT) : make-imglib.c
+	$(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(CPPFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) $(srcdir)/make-imglib.c -o make-imglib -lpng -lz
 
-text2c$(EXEEXT) : text2c.c
-	$(BUILD_CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(srcdir)/text2c.c -o text2c -lpng -lz
+text2c$(BUILD_EXEEXT) : text2c.c
+	$(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(CPPFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) $(srcdir)/text2c.c -o text2c -lpng -lz

Reply via email to