🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.debian.bugs.dist
1 messages
1 total messages Started by Helmut Grohne Tue, 24 Nov 2026 21:00
Bug#1155164: a56 FTCBFS: fails stripping keybld
#6000
Author: Helmut Grohne
Date: Tue, 24 Nov 2026 21:00
91 lines
4236 bytes
--9Ce/AGDVWfaHoMpA
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Source: a56
Version: 1.3+dfsg-15
Tags: patch upstream
User: debian-cross@lists.debian.org
Usertags: ftcbfs

a56 fails to cross build from source as it fails stripping keybld. They
keybld tool is in a strange position as it is both run during build and
installed into the package. The upstream Makefile partially recognizes
this and compiles it using $(HOSTCC). Unfortunately, that results in it
being the wrong architecture for packaging. There is no right here as
the installed one must be host and the run one must be build. What we
actually need here is building them twice. I am attaching a patch to the
Makefile that implements this need. When HOSTCC equals CC, there is no
need to build them twice, so my patch ensures that the native case
remains as before. Please consider forwarding the patch upstream.

Helmut

--9Ce/AGDVWfaHoMpA
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment; filename="cross.patch"

--- a56-1.3+dfsg.orig/Makefile
+++ a56-1.3+dfsg/Makefile
@@ -63,6 +63,13 @@
 #DEFINES = -DYYDEBUG -DLDEBUG $(CCDEFS)
 
 CFLAGS += $(DEBUG) $(DEFINES) $(CPPFLAGS) $(LDFLAGS)
+HOSTCFLAGS += $(DEBUG) $(DEFINES) $(HOSTCPPFLAGS) $(HOSTLDFLAGS)
+
+ifeq ($(CC),$(HOSTCC))
+HOST_KEYBLD = keybld
+else
+HOST_KEYBLD = host_keybld
+endif
 
 all:	keybld a56 toomf a56-tobin bin2h
 
@@ -71,20 +78,30 @@
 	@$(POSTPROCESS) a56
 
 keybld:	keybld.o ksubs.o
-	$(HOSTCC) $(CFLAGS) -o keybld keybld.o ksubs.o
+	$(CC) $(CFLAGS) -o keybld keybld.o ksubs.o
 	@$(POSTPROCESS) keybld
 
+host_keybld: host_keybld.o host_ksubs.o
+	$(HOSTCC) $(HOSTCFLAGS) -o host_keybld host_keybld.o host_ksubs.o
+	@$(POSTPROCESS) host_keybld
+
 keybld.o:	keybld.c
-	$(HOSTCC) $(CFLAGS) -c keybld.c
+	$(CC) $(CFLAGS) -c keybld.c
+
+host_keybld.o: keybld.c
+	$(HOSTCC) $(HOSTCFLAGS) -c keybld.c -o host_keybld.o
 
 ksubs.o:	subs.c
-	$(HOSTCC) $(CFLAGS) -c subs.c
+	$(CC) $(CFLAGS) -c subs.c
 	$(MV) subs.o ksubs.o
 
+host_ksubs.o: subs.c
+	$(HOSTCC) $(HOSTCFLAGS) -c subs.c -o host_ksubs.o
+
 lex.o:	lex.c a56.h gram.h
 
-kparse.c:	a56.key keybld
-	./keybld < a56.key > kparse.c
+kparse.c:	a56.key $(HOST_KEYBLD)
+	./$(HOST_KEYBLD) < a56.key > kparse.c
 
 gram.c gram.h:	a56.y
 	@echo "[expect 2 shift/reduce conflicts here]"
@@ -112,7 +129,7 @@
 
 main.o:	a56.h gram.h
 
-clean:	; rm -f a56 toomf y.output *.o *.out tmp *.bak a56.tar.gz keybld
+clean:	; rm -f a56 toomf y.output *.o *.out tmp *.bak a56.tar.gz keybld host_keybld
 
 spotless:	clean
 	rm -f gram.c lexyy.c gram.h toktab.c kparse.c

--9Ce/AGDVWfaHoMpA--
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads