Source: libixp Version: 0.6~20121202+hg148-2 Tags: patch upstream User: [email protected] Usertags: rebootstrap
libixp fails to cross build from source. It mostly works, but in the end it uses the build architecture compiler as linker. Since it wants the C compiler as linker, seeding the variable LD from CC makes it much easier to replace the compiler. It also hard codes the build architecture pkg-config. The attached patch fixes both and makes libixp cross buildable. Please consider applying it. Helmut
--- libixp-0.6~20121202+hg148.orig/config.mk +++ libixp-0.6~20121202+hg148/config.mk @@ -23,7 +23,7 @@ # Compiler, Linker. Linker should usually *not* be ld. CC = cc -LD = cc +LD = $(CC) # Archiver AR = ar crs #AR = sh -c 'ar cr "$$@" && ranlib "$$@"' --- libixp-0.6~20121202+hg148.orig/mk/hdr.mk +++ libixp-0.6~20121202+hg148/mk/hdr.mk @@ -19,15 +19,16 @@ TEXT = FILTER = cat +PKG_CONFIG ?= pkg-config EXCFLAGS = $(INCLUDES) -D_XOPEN_SOURCE=600 -COMPILE_FLAGS = $(EXCFLAGS) -c $(CFLAGS) $$(pkg-config --cflags $(PACKAGES)) +COMPILE_FLAGS = $(EXCFLAGS) -c $(CFLAGS) $$($(PKG_CONFIG) --cflags $(PACKAGES)) COMPILE = $(SHELL) $(ROOT)/util/compile "$(CC)" "$(COMPILE_FLAGS)" COMPILEPIC = $(SHELL) $(ROOT)/util/compile "$(CC)" "$(COMPILE_FLAGS) $(SOCFLAGS)" -LINK = $(SHELL) $(ROOT)/util/link "$(LD)" "$$(pkg-config --libs $(PACKAGES)) $(LDFLAGS) $(LIBS)" -LINKSO = $(SHELL) $(ROOT)/util/link "$(LD)" "$$(pkg-config --libs $(PACKAGES)) $(SOLDFLAGS) $(LIBS) $(SHARED)" +LINK = $(SHELL) $(ROOT)/util/link "$(LD)" "$$($(PKG_CONFIG) --libs $(PACKAGES)) $(LDFLAGS) $(LIBS)" +LINKSO = $(SHELL) $(ROOT)/util/link "$(LD)" "$$($(PKG_CONFIG) --libs $(PACKAGES)) $(SOLDFLAGS) $(LIBS) $(SHARED)" CLEANNAME=$(SHELL) $(ROOT)/util/cleanname

