Source: l2tpns Version: 2.3.1-2 Tags: patch upstream User: debian-cr...@lists.debian.org Usertags: ftcbfs
l2tpns fails to cross build from source, because it uses the build architecture compiler in a few remaining spots. It hard codes plain gcc in two occasions. Using $(CC) there fixes that. It also uses the build architecture compiler via the LD variable. This variable is not susbtituted by dh_auto_build, because its usage is not consistent. Sometimes people store ld there. In this case, defaulting it to $(CC) does what one usually wants. Please consider applying the attached patch as it makes l2tpns cross buildable. Helmut
--- l2tpns-2.3.1.orig/Makefile +++ l2tpns-2.3.1/Makefile @@ -13,7 +13,7 @@ DEB_CFLAGS_MAINT_APPEND=-Wall -O3 -Wno-format-zero-length CC = gcc -LD = gcc +LD = $(CC) INCLUDES = -I. CPPFLAGS = `dpkg-buildflags --get CPPFLAGS` $(INCLUDES) $(DEFINES) CFLAGS = `dpkg-buildflags --get CFLAGS` @@ -50,8 +50,8 @@ depend: (sed -n 'p; /^## Dependencies: (autogenerated) ##/q' Makefile && \ - gcc -MM $(CPPFLAGS) $(OBJS:.o=.c) && \ - gcc -MM $(CPPFLAGS) $(PLUGINS:.so=.c) | sed 's/\.o/.so/') >Makefile.tmp + $(CC) -MM $(CPPFLAGS) $(OBJS:.o=.c) && \ + $(CC) -MM $(CPPFLAGS) $(PLUGINS:.so=.c) | sed 's/\.o/.so/') >Makefile.tmp mv Makefile Makefile.bak mv Makefile.tmp Makefile