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

Re: gcc tri-arch support



Stuart Anderson wrote:
[snip]
> Index: debian/control.in/mips64
> ===================================================================
> --- debian/control.in/mips64	(.../vendor/glibc/current)	(revision 0)
> +++ debian/control.in/mips64	(.../src/glibc)	(revision 97)
> @@ -0,0 +1,21 @@
> +Package: libc6-mips64
> +Architecture: mips mipsel
> +Section: base
> +Priority: required
[snip]
> @@ -0,0 +1,22 @@
> +Package: libc6-mips32
> +Architecture: mips mipsel
> +Section: base
> +Priority: required
> +Depends: libc6 (= ${Source-Version})
> +Conflicts: libc6-mipsn32

We should probably have an consistent naming scheme for o32/n32/n64, and
avoid _both_ mips32 and mips64 because they are already overloaded in
their meaning (I would expect a package with -mips32 to be a version
optimized for MIPS32 ISA). The names "mipsn32" and "mipsn64" may look
a bit funny, but at least it's clear what they stand for.

> Index: debian/sysdeps/mipsel.mk
> ===================================================================
> --- debian/sysdeps/mipsel.mk	(.../vendor/glibc/current)	(revision 0)
> +++ debian/sysdeps/mipsel.mk	(.../src/glibc)	(revision 97)
> @@ -0,0 +1,23 @@
> +GLIBC_PASSES += mips64 mips32
> +DEB_ARCH_REGULAR_PACKAGES += libc6-mips64 libc6-dev-mips64 libc6-mips32 libc6-dev-mips32
> +# This is needed to keep binutils (ar & ranlib) from getting confused about
> +# the file format being used.
> +export GNUTARGET=elf64-tradlittlemips
> +
> +mips32_MIN_KERNEL_SUPPORTED = 2.6.0
> +mips32_configure_target = mips64-linux
> +mips32_CC = $(CC) -mabi=n32
> +mips32_extra_cflags = 
> +mips32_add-ons = linuxthreads $(add-ons)

Not NPTL instead of linuxthreads?

[snip]
> Index: debian/patches/mips-biarch.dpatch
> ===================================================================
> --- debian/patches/mips-biarch.dpatch	(.../vendor/gcc-4.0/current)	(revision 0)
> +++ debian/patches/mips-biarch.dpatch	(.../src/gcc-4.0)	(revision 97)
> @@ -0,0 +1,86 @@
> +#! /bin/sh -e
> +
> +# DP: add full tri-arch support. Include linux64.h also
> +# DP: make sure -32 & -64 are recognized

The canonical way to select the ABI for a mips compiler is via -mabi=.
-32/-64 stem from the IRIX compiler, and are only left for backward
compatibility.

> +# DP: Fix up the directory names so that o32 is the default and the
> +# DP: 32 & 64 bit names follow the same convention as is used by glibc

Be aware that this is somewhat broken. A mips64-linux compiler has
different predefined macros than a mips-linux compiler when compiling
for the same ABI. I have a patch for this and hope to bring it upstream
in the next weeks.

[snip]
> Index: debian/rules.defs
> ===================================================================
> --- debian/rules.defs	(.../vendor/gcc-4.0/current)	(revision 97)
> +++ debian/rules.defs	(.../src/gcc-4.0)	(revision 97)
> @@ -9,6 +9,7 @@
>  builddir_ia6432	= $(PWD)/build-ia6432
>  stampdir	= stamps
>  distribution	:= $(shell lsb_release -is)
> +export GNUTARGET = elf64-tradlittlemips
>  
>  lib64		= lib64
>  
> @@ -331,7 +332,7 @@
>    with_fortran := yes
>  endif
>  
> -f95_no_cpus :=
> +f95_no_cpus := mips mipsel
>  ifneq (, $(filter $(DEB_TARGET_ARCH_CPU),$(f95_no_cpus)))
>      with_fortran := disabled for architecure $(DEB_TARGET_ARCH_CPU)
>  endif
> @@ -475,7 +476,7 @@
>  endif
>  
>  with_libgnat := yes
> -ada_no_cpus := alpha arm armeb m68k sh3 sh3eb sh4 sh4eb
> +ada_no_cpus := alpha arm armeb m68k sh3 sh3eb sh4 sh4eb mips mipsel

Does this generally lose Ada and Fortran support for mips/mipsel?


Thiemo



Reply to: