Package: gcc-3.3 Version: 1:3.3.4-2 Severity: wishlist Tags: patch These patches do the following:
- rules2: Add a new environment variable "with_sysroot" - control.m4: Fix libgcc1-cross naming for non-Linux arch's. - rules.defs: Remove comments saying that cross-building is Linux specific. It's now tested on a non-Linux arch. - README.cross: Update documentation to include with_sysroot information and suggest crosshurd. --- rules2.old 2004-07-03 11:40:55.347156525 -0400 +++ rules2 2004-07-03 11:44:05.188070151 -0400 @@ -84,6 +84,10 @@ --enable-nls \ --without-included-gettext +ifneq ($(with_sysroot),) + CONFARGS += --with-sysroot=$(with_sysroot) +endif + ifeq ($(with_cxa_atexit),yes) CONFARGS += --enable-__cxa_atexit else --- control.m4.old 2004-07-03 13:48:01.863900548 -0400 +++ control.m4 2004-07-03 13:48:24.968905236 -0400 @@ -19,7 +19,7 @@ define(`MAINTAINER', `Debian GCC maintainers <debian-gcc@lists.debian.org>') ifdef(`TARGET', ` define(`PRI', `optional') - define(`LS', `-'ARCH`-cross') + define(`LS', `-'TARGET`-cross') ', ` define(`TS') define(`LS') --- rules.defs.old 2004-07-03 14:21:37.448417727 -0400 +++ rules.defs 2004-07-03 14:21:52.534052234 -0400 @@ -32,13 +32,6 @@ # cross compiler support. If GCC_TARGET is set, then it's the architecture # we build for. -# -# Note: This scheme assumes targets are *-linux. At some point -# in the future I'd like to work on generalizing this to allow -# for non-linux targets. My thought is that when specifying -# target names in GCC_TARGET, if it doesn't contain a '-', we'll -# assume Linux. If it *does* contain a '-', we'll *not* make -# that assumption, and handle it properly in these rules files. ifneq ($(DEB_HOST_ARCH),$(DEB_TARGET_ARCH)) DEB_CROSS = yes --- README.cross.old 2004-07-03 14:22:01.284853037 -0400 +++ README.cross 2004-07-03 14:29:12.786928547 -0400 @@ -46,7 +46,29 @@ installed. This bug was fixed in (unofficial) version 1.14.5 of dpkg-cross, currently available from http://zigzag.lvk.cs.msu.su/~nikita/debian/. -1.2. kernel-headers package for the target architecture +1.2. Packages for the Target architecture + +There are two ways of getting the packages you need for compiling to the +target architecture. The simplest way is to use the Debian 'crosshurd' +package to build a system in a directory. crosshurd is like debootstrap +but cross-arch, and works on the Hurd, Linux and FreeBSD. (The name is +historical). You will then need to fix symlinks in lib and usr/lib to be +relative links instead of absolute ones. + +For example: + +lrwxrwxrwx 1 root root 20 2004-05-06 23:02 libcom_err.so -> /lib/libcom_err.so.2 + +Needs to be changed to: + +lrwxrwxrwx 1 root root 20 2004-05-06 23:02 libcom_err.so -> ../../lib/libcom_err.so.2 + +If you choose this method, set the environment variable 'with_sysroot' to +point to the ABSOLUTE PATH where the crosshurd was done. + +Otherwise... + +1.2.0 kernel-headers package for the target architecture It is not recommended to use kernel-headers for the host architecture, because some constants defined in asm/*.h do differ between architectures. @@ -56,7 +78,7 @@ Unfortunately, dpkg-cross versions prior to (unofficial) 1.14.1 failed to process linux-kernel-headers package, so please use newer versions. -1.3. libc for the target architecture +1.2.1 libc for the target architecture Although it is possible to build cross-gcc without having target libc pre-installed, it is somewhat complex, and is not supported by gcc-3.3 source @@ -66,7 +88,7 @@ packages for the target architecture using dpkg-cross, and install the resulting packages. -1.4. cross-binutils for the target +1.3. cross-binutils for the target It is a good idea to use binutils source package to build cross-binutils. See debian bug report #231707 for patches that make it possible.