Hello, I could build cross gcc 4.4.5-4 with attached patch (only tested for GCC_TARGET=powerpcspe, though).
Shouldn't we stop tweaking LD_LIBRARY_PATH to cross-build gcc? * rationale In my understanding, the error message: > error while loading shared libraries: /usr/powerpc-linux-gnu/lib/libc.so.6: ELF file data encoding not little-endian means: "failed to load the Perl interpreter with $LD_LIBRARY_PATH/libc.so instead of /lib/libc.so". Fortunately, recent versions of dpkg-shlibdeps seems to be wise enough to detect GCC_TARGET and DEB_TARGET_GNU_TYPE and we no longer have to tell dh_shlibdeps where to search libraries using a special environment variable. * http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=453267 * http://git.debian.org/?p=dpkg/dpkg.git;a=commitdiff;h=626dda6f55bb7fb025be6a7c276651df884ac8a1 regards, -- MINAMI Hirokazu <min...@pylone.jp>
diff -urN gcc-4.4.debian.orig/rules.defs gcc-4.4-4.4.5/debian//rules.defs --- gcc-4.4.debian.orig/rules.defs 2010-10-20 17:14:31.000000000 +0900 +++ gcc-4.4-4.4.5/debian//rules.defs 2010-10-20 17:18:04.000000000 +0900 @@ -154,7 +154,7 @@ TARGET_ALIAS := $(DEB_TARGET_ALIAS) lib_binaries := indep_binaries - cross_shlibdeps = $(SET_CROSS_LIB_PATH) ARCH=$(DEB_TARGET_ARCH) MAKEFLAGS="CC=something" + cross_shlibdeps = ARCH=$(DEB_TARGET_ARCH) MAKEFLAGS="CC=something" else TARGET_ALIAS := $(DEB_TARGET_GNU_TYPE) diff -urN gcc-4.4.debian.orig/rules2 gcc-4.4-4.4.5/debian//rules2 --- gcc-4.4.debian.orig/rules2 2010-10-20 17:14:31.000000000 +0900 +++ gcc-4.4-4.4.5/debian//rules2 2010-10-20 17:18:19.000000000 +0900 @@ -433,7 +433,6 @@ --with-headers=/$(PF)/$(DEB_TARGET_GNU_TYPE)/include \ --with-libs=/$(PF)/$(DEB_TARGET_GNU_TYPE)/lib endif - SET_CROSS_LIB_PATH = LD_LIBRARY_PATH=$${LD_LIBRARY_PATH:+$$LD_LIBRARY_PATH:}/$(PF)/$(DEB_TARGET_GNU_TYPE)/lib endif ifeq ($(with_bootstrap),)