[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#333952: Cross-compilers should not use biarch



Package: gcc-4.0
Version: 4.0.2-2
Tags: patch

Currently, for platforms which natively build a biarch GCC, such as
powerpc, the GCC package also attempts to build a biarch cross-compiler
when targetting that platform.  This would require the installation of
cross-compilation libraries for two different cross-architectures,
rather than just one, in order to build and use GCC; otherwise, the
build fails when attempting to find a libc for the alternate target.  In
addition, dpkg-cross doesn't appear to support converting and installing
library packages for the alternate architectures.  It also seems far
more likely that when setting up a cross-compilation environment, one
would simply construct two cross-compilers, one for each of the two
architectures, rather than one two-target compiler.

The attached patch disables biarch when building a cross-compiler.  Note
that the logic assumes a 64-bit alternate platform; it may need to be
made more sophisticated to work for 32-bit alternate platforms.  I did
not include such logic, because I was not targetting a platform with a
32-bit alternate, and thus would not test that code path in my GCC
cross-compiler build.

- Josh Triplett
diff -Naur gcc-4.0-4.0.2.orig/debian/rules.defs gcc-4.0-4.0.2/debian/rules.defs
--- gcc-4.0-4.0.2.orig/debian/rules.defs	2005-10-14 03:40:30.000000000 -0700
+++ gcc-4.0-4.0.2/debian/rules.defs	2005-10-14 03:44:05.000000000 -0700
@@ -670,6 +670,18 @@
   endif
 endif
 
+ifdef DEB_CROSS
+  with_lib64gcc		:= no
+  with_lib64cxx		:= no
+  with_lib64objc	:= no
+  with_lib64ffi		:= no
+  with_lib64gcj		:= no
+  with_lib64fortran	:= no
+
+  biarch   	:= disabled for cross build
+  biarch32 	:= disabled for cross build
+endif
+
 ifeq ($(biarch32),yes)
   with_32bit_check := $(shell CC="gcc -m32" sh debian/runcheck.sh)
 endif

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: