Source: fdutils
Version: 5.6-1
Tags: patch upstream
User: [email protected]
Usertags: ftcbfs

fdutils fails to cross build from source, because it fails running
doc/texi-linearize with an Exec format error. That indicates that it is
a build tool and should be using the build architecture compiler rather
than the host architecture compiler. The autoconf-archive provides a
useful macro AX_CC_FOR_BUILD for this task. I'm attaching a patch that
makes use of it to make fdutils cross buildable. Please consider
applying the attached patch.

Helmut
--- fdutils-5.6.orig/configure.in
+++ fdutils-5.6/configure.in
@@ -9,6 +9,7 @@
 AC_PROG_GCC_TRADITIONAL
 AC_PROG_INSTALL
 AC_PROG_LN_S
+AX_CC_FOR_BUILD
 
 AC_PATH_PROG(INSTALL_INFO, install-info, "")
 
--- fdutils-5.6.orig/doc/Makefile.in
+++ fdutils-5.6/doc/Makefile.in
@@ -37,6 +37,8 @@
 CC          = @CC@
 CPPFLAGS    = @CPPFLAGS@
 CFLAGS      = @CFLAGS@
+CC_FOR_BUILD= @CC_FOR_BUILD@
+EXEEXT_FOR_BUILD= @EXEEXT_FOR_BUILD@
 
 all: info dvi
 
@@ -76,8 +78,11 @@
 %.html: Fdutils.texi
 	$(TEXI2HTML) $<
 
-Fdutils.texi: $(TEXISRC) texi-linearize
-	./texi-linearize $(srcdir) fdutils.texi > $@
+texi-linearize$(EXEEXT_FOR_BUILD): texi-linearize.c
+	$(CC_FOR_BUILD) -o $@ $^
+
+Fdutils.texi: $(TEXISRC) texi-linearize$(EXEEXT_FOR_BUILD)
+	./texi-linearize$(EXEEXT_FOR_BUILD) $(srcdir) fdutils.texi > $@
 
 
 # Don't cd, to avoid breaking install-sh references.

Reply via email to