Source: gcc-4.2 Version: 4.2.4-1 Severity: normal Tags: patch NOTE: The patch has been tested and it is known to work. Also gcc-4.1-4.1.2-22 is affected. Same patch can be applied to gcc-4.1 source. It has also been tested.
When building powerpc cross compiler, mv debian/tmp/usr/powerpc-linux-gnu/lib64/lib*c++*.a debian/tmp/usr/lib/gcc/powerpc-linux-gnu/4.2.4/64/. mv: cannot stat `debian/tmp/usr/powerpc-linux-gnu/lib64/lib*c++*.a': No such file or directory make[1]: *** [stamps/08-binary-stamp-libstdcxx-dev] Error 1 # ls debian/tmp/usr/powerpc64-linux-gnu/lib64/lib*c++*.a debian/tmp/usr/powerpc64-linux-gnu/lib64/libstdc++.a debian/tmp/usr/powerpc64-linux-gnu/lib64/libstdc++_pic.a debian/tmp/usr/powerpc64-linux-gnu/lib64/libsupc++.a The following patch works arround the path ../powerpc-linux-gnu/.. by ../powerpc64-linux-gnu/.. when cross building libstdcxx: diff -urN gcc-4.2-4.2.4/debian/rules.d/binary-libstdcxx-cross.mk gcc-4.2-4.2.4.cross/debian/rules.d/binary-libstdcxx-cross.mk --- gcc-4.2-4.2.4/debian/rules.d/binary-libstdcxx-cross.mk 2008-05-31 22:23:29.000000000 +0000 +++ gcc-4.2-4.2.4.cross/debian/rules.d/binary-libstdcxx-cross.mk 2008-05-31 22:28:31.000000000 +0000 @@ -8,6 +8,13 @@ arch_binaries := $(arch_binaries) lib32stdcxx endif +ifeq ($(biarch),yes) +AUXDEB := $(DEB_TARGET_GNU_TYPE) +ifeq ($(DEB_TARGET_GNU_TYPE),powerpc-linux-gnu) +AUXDEB := powerpc64-linux-gnu +endif +endif + ifeq ($(with_cxxdev),yes) arch_binaries := $(arch_binaries) libstdcxx-dev endif @@ -280,7 +287,7 @@ -find $(d) -type d -name '*.gch' | xargs rm -rf ifeq ($(biarch),yes) - mv $(d)/$(PF)/$(DEB_TARGET_GNU_TYPE)/lib64/lib*c++*.a $(d)/$(gcc_lib_dir)/$(biarchsubdir)/. + mv $(d)/$(PF)/$(AUXDEB)/lib64/lib*c++*.a $(d)/$(gcc_lib_dir)/$(biarchsubdir)/. ln -sf ../../../../../lib64/libstdc++.so.$(CXX_SONAME) \ $(d)/$(gcc_lib_dir)/$(biarchsubdir)/libstdc++.so endif -- Héctor Orón
diff -urN gcc-4.2-4.2.4/debian/rules.d/binary-libstdcxx-cross.mk gcc-4.2-4.2.4.cross/debian/rules.d/binary-libstdcxx-cross.mk --- gcc-4.2-4.2.4/debian/rules.d/binary-libstdcxx-cross.mk 2008-05-31 22:23:29.000000000 +0000 +++ gcc-4.2-4.2.4.cross/debian/rules.d/binary-libstdcxx-cross.mk 2008-05-31 22:28:31.000000000 +0000 @@ -8,6 +8,13 @@ arch_binaries := $(arch_binaries) lib32stdcxx endif +ifeq ($(biarch),yes) +AUXDEB := $(DEB_TARGET_GNU_TYPE) +ifeq ($(DEB_TARGET_GNU_TYPE),powerpc-linux-gnu) +AUXDEB := powerpc64-linux-gnu +endif +endif + ifeq ($(with_cxxdev),yes) arch_binaries := $(arch_binaries) libstdcxx-dev endif @@ -280,7 +287,7 @@ -find $(d) -type d -name '*.gch' | xargs rm -rf ifeq ($(biarch),yes) - mv $(d)/$(PF)/$(DEB_TARGET_GNU_TYPE)/lib64/lib*c++*.a $(d)/$(gcc_lib_dir)/$(biarchsubdir)/. + mv $(d)/$(PF)/$(AUXDEB)/lib64/lib*c++*.a $(d)/$(gcc_lib_dir)/$(biarchsubdir)/. ln -sf ../../../../../lib64/libstdc++.so.$(CXX_SONAME) \ $(d)/$(gcc_lib_dir)/$(biarchsubdir)/libstdc++.so endif