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

Bug#341884: libc6: [mips] tri-arch support for mips & mipsel



[Cc:ing debian-mips@lists.d.o, as some people might be interested there]

Hi!

On Sat, Dec 03, 2005 at 01:42:10PM -0700, Stuart Anderson wrote:
> Package: libc6
> Version: 2.3.5-8.2
> Severity: wishlist
> Tags: patch
> 
> 
> Please enable tri-arch support for the MIPS platforms. The attached
> patch (And corresponding patch for gcc #341882) provide support for n32
> & n64 ABIs in addition to the current o32 ABI. These patches have been
> tested by building n32 & n64 version of the ltp packages.
> 

I have just reviewed your patch, please find my comments inline (parts
where I agree have been removed).

Please note also that I used a modified version of this patch (mainly
because the glibc has changed since you reported the bug) to bootstrap
32-bit and 64-bit glibc/gcc/zlib on mips. You can find all the 
corresponding packages on:
http://people.debian.org/~aurel32/mips-triarch/

> Index: debian/control
> ===================================================================
> --- debian/control	(.../vendor/glibc/current)	(revision 144)
> +++ debian/control	(.../src/glibc)	(revision 144)
> @@ -424,6 +424,49 @@
>   which use the standard C library. This is the 64bit version of the
>   library, meant for PowerPC64 systems.
>  
> +Package: libc6-mipsn32
> +Architecture: mips mipsel
> +Section: base
> +Priority: required
> +Depends: libc6 (= ${Source-Version})
> +Conflicts: libc6-mips32

Why a confict there? Does such a package has existed in the archive?

> +Description: GNU C Library: n32 Shared libraries for MIPS
> + This package includes shared versions of the standard C library and the
> + standard math library, as well as many others. This is the n32 version
> + of the library, meant for MIPS systems.
> +
> +Package: libc6-dev-mipsn32
> +Architecture: mips mipsel
> +Section: libdevel
> +Priority: standard
> +Provides: libn32c-dev

What about providing lib32c-dev instead? It seems more "standard"
compared to the other ports, and it also have the advantage for other
biarch packages to use a unique name across all the architectures.

Note also that the other architectures does not encode the ABI name in
32-bit or 64-bit packages. I mean that the package is not called for
example libi386c-dev and the libgcc package is called lib32gcc1-dev and
not libi386gcc1-dev.

> +Depends: libc6-mipsn32 (= ${Source-Version}), libc6-dev (= ${Source-Version}), lib32gcc1
> +Description: GNU C Library: n32 Development Libraries for MIPS
> + Contains the symlinks and object files needed to compile and link programs
> + which use the standard C library. This is the n32 version of the
> + library, meant for MIPS systems.
> +
> +Package: libc6-mipsn64
> +Architecture: mips mipsel
> +Section: base
> +Priority: required
> +Depends: libc6 (= ${Source-Version})
> +Description: GNU C Library: 64bit Shared libraries for MIPS64
> + This package includes shared versions of the standard C library and the
> + standard math library, as well as many others. This is the 64bit version
> + of the library, meant for MIPS64 systems.
> +
> +Package: libc6-dev-mipsn64
> +Architecture: mips mipsel
> +Section: libdevel
> +Priority: standard
> +Provides: libn64c-dev

Same comment as for the 32-bit part.

> +Depends: libc6-mipsn64 (= ${Source-Version}), libc6-dev (= ${Source-Version}), lib64gcc1
> +Description: GNU C Library: 64bit Development Libraries for MIPS64
> + Contains the symlinks and object files needed to compile and link programs
> + which use the standard C library. This is the 64bit version of the
> + library, meant for MIPS64 systems.
> +
>  Package: libc6-sparcv9
>  Architecture: sparc
>  Section: libs

> Index: debian/sysdeps/mips.mk
> ===================================================================
> --- debian/sysdeps/mips.mk	(.../vendor/glibc/current)	(revision 0)
> +++ debian/sysdeps/mips.mk	(.../src/glibc)	(revision 144)
> @@ -0,0 +1,29 @@
> +GLIBC_PASSES += mipsn64 mipsn32
> +DEB_ARCH_REGULAR_PACKAGES += libc6-mipsn64 libc6-dev-mipsn64 libc6-mipsn32 libc6-dev-mipsn32
> +# This is needed to keep binutils (ar & ranlib) from getting confused about
> +# the file format being used.
> +export GNUTARGET=elf64-tradbigmips

I have concerned with this. I understand that is is a workaround
necessary to currently build the glibc, however, I would prefer to have
a fixed binutils instead of that.

Note that such a hack is also necessary to build zlib, so I think it is
virtually necessary for all 64-bit stuff.

> +mipsn32_MIN_KERNEL_SUPPORTED = 2.6.0
> +mipsn32_configure_target = mips64-linux
> +mipsn32_CC = $(CC) -mabi=n32
> +mipsn32_extra_cflags = 
> +mipsn32_add-ons = linuxthreads $(add-ons)
> +libc6-mipsn32_shlib_dep = libc6-mipsn32 (>= $(shlib_dep_ver))
> +mipsn32_LIBDIR = 32
> +mipsn32_extra_config_options := $(extra_config_options) --with-__thread --disable-profile
> +
> +mipsn64_MIN_KERNEL_SUPPORTED = 2.6.0
> +mipsn64_configure_target = mips64-linux
> +mipsn64_CC = $(CC) -mabi=64
> +mipsn64_extra_cflags = 
> +mipsn64_add-ons = linuxthreads $(add-ons)
> +libc6-mipsn64_shlib_dep = libc6-mipsn64 (>= $(shlib_dep_ver))
> +mipsn64_LIBDIR = 64
> +mipsn64_extra_config_options := $(extra_config_options) --with-__thread --disable-profile
> +
> +# Need to put a tri-arch awaare version of ldd in the base package
> +define mipsn32_extra_install
> +cp debian/tmp-mipsn32/usr/bin/ldd debian/tmp-libc/usr/bin
> +endef
> +

-- 
  .''`.  Aurelien Jarno	            | GPG: 1024D/F1BCDB73
 : :' :  Debian developer           | Electrical Engineer
 `. `'   aurel32@debian.org         | aurelien@aurel32.net
   `-    people.debian.org/~aurel32 | www.aurel32.net



Reply to: