[Pkg-directfb-devel] Bug#480933: directfb: long term mass bug filing for cross build support

Neil Williams codehelp at debian.org
Mon May 12 18:42:45 UTC 2008


Package: directfb
Version: 1.0.1-8
Severity: wishlist
Tags: patch
User: codehelp at debian.org
Usertags: crossbuilt

In line with the other cross-building support bugs:
http://lists.debian.org/debian-devel/2007/11/msg00116.html

This patch is necessary to allow directfb to cross-build in Debian.

The added LD variable prevents a build error at the very end of the
build:

(cd .libs/libdirectfb_fbdev.a.tmp && arm-linux-gnu-ar x
../../.libs/libdirectfb_fbdev.a)
ld -o libdirectfb_fbdev.o -r .libs/libdirectfb_fbdev.a.tmp/*.o
ld: .libs/libdirectfb_fbdev.a.tmp/agp.o: Relocations in generic ELF (EM:
40)
.libs/libdirectfb_fbdev.a.tmp/agp.o: could not read symbols: File in
wrong format
make[4]: *** [libdirectfb_fbdev.o] Error 1

I've tested this patch for Emdebian and in a normal Debian build without
problems (CROSS is empty if not cross building).

*** ../crossbuild.diff
--- directfb-1.0.1.debian/debian/rules 
+++ directfb-1.0.1.emdebian/debian/rules 
@@ -25,6 +25,7 @@
   conf_gnu_type += --build $(DEB_HOST_GNU_TYPE)
 else
   conf_gnu_type += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
+  CROSS=LD=$(DEB_HOST_GNU_TYPE)-ld
 endif
 
 ifeq ($(DEB_HOST_ARCH_OS), linux)
@@ -90,22 +91,22 @@
 	  --disable-sse
 
 setup-dist: patch
-	$(MAKE) -f debian/rules configure-dist
+	$(MAKE) $(CROSS) -f debian/rules configure-dist
 
 setup-udeb: patch
-	$(MAKE) -f debian/rules configure-udeb
+	$(MAKE) $(CROSS) -f debian/rules configure-udeb
 
 build: build-dist build-udeb
 
 build-dist: setup-dist
 	dh_testdir
 	
-	$(MAKE) -C $(BUILD_DIST)
+	$(MAKE) $(CROSS) -C $(BUILD_DIST)
 
 build-udeb: setup-udeb
 	dh_testdir
 	
-	$(MAKE) -C $(BUILD_UDEB)
+	$(MAKE) $(CROSS) -C $(BUILD_UDEB)
 
 clean: unpatch
 	dh_testdir
@@ -129,8 +130,8 @@
 	dh_clean -k
 	dh_installdirs
 	
-	$(MAKE) -C $(BUILD_DIST) install DESTDIR=$(DESTDIR_DIST)
-	$(MAKE) -C $(BUILD_UDEB) install DESTDIR=$(DESTDIR_UDEB)
+	$(MAKE) $(CROSS) -C $(BUILD_DIST) install DESTDIR=$(DESTDIR_DIST)
+	$(MAKE) $(CROSS) -C $(BUILD_UDEB) install DESTDIR=$(DESTDIR_UDEB)
 
 binary: binary-indep binary-arch
 


-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.22-2-amd64 (SMP w/1 CPU core)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/pkg-directfb-devel/attachments/20080512/287d0de3/attachment.pgp 


More information about the Pkg-directfb-devel mailing list