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

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



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.


-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (600, 'testing')
Architecture: mipsel (mips64)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.14-rc1-Helix64-smp
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

-- no debconf information
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
+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
+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
+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/control.in/mips64
===================================================================
--- debian/control.in/mips64	(.../vendor/glibc/current)	(revision 0)
+++ debian/control.in/mips64	(.../src/glibc)	(revision 144)
@@ -0,0 +1,21 @@
+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
+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.
+
Index: debian/control.in/mips32
===================================================================
--- debian/control.in/mips32	(.../vendor/glibc/current)	(revision 0)
+++ debian/control.in/mips32	(.../src/glibc)	(revision 144)
@@ -0,0 +1,22 @@
+Package: libc6-mipsn32
+Architecture: mips mipsel
+Section: base
+Priority: required
+Depends: libc6 (= ${Source-Version})
+Conflicts: libc6-mips32
+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
+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.
+
Index: debian/changelog
===================================================================
--- debian/changelog	(.../vendor/glibc/current)	(revision 144)
+++ debian/changelog	(.../src/glibc)	(revision 144)
@@ -1,3 +1,10 @@
+glibc (2.3.5-8.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Enable mips multilib support 
+
+ -- Stuart Anderson <anderson@realmsys.com>  Tue, 22 Nov 2005 12:00:47 -0600
+
 glibc (2.3.5-8) unstable; urgency=low
 
   * Add missing build dependency on libc6-dev-ppc64 on powerpc.
@@ -15,6 +22,21 @@
 
  -- Daniel Jacobowitz <dan@debian.org>  Sat, 12 Nov 2005 19:15:29 -0500
 
+glibc (2.3.5-7.2a) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Rename packages from -mips32/mips64 to -mipsn32/mipsn64 per suggestion
+    from debian-mips list. 
+
+ -- Stuart Anderson <anderson@helix01>  Sat,  5 Nov 2005 15:37:09 -0700
+
+glibc (2.3.5-7.1a) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Enable mips multilib support 
+
+ -- Stuart Anderson <anderson@realmsys.com>  Wed, 12 Oct 2005 13:56:30 -0600
+
 glibc (2.3.5-7) unstable; urgency=low
 
   [ GOTO Masanori ]
Index: debian/patches/00list
===================================================================
--- debian/patches/00list	(.../vendor/glibc/current)	(revision 144)
+++ debian/patches/00list	(.../src/glibc)	(revision 144)
@@ -91,3 +91,4 @@
 hppa-fenv-align
 sparc64-tls
 eh-frame-terminator
+mips-ptrace
Index: debian/patches/mips-ptrace.dpatch
===================================================================
--- debian/patches/mips-ptrace.dpatch	(.../vendor/glibc/current)	(revision 0)
+++ debian/patches/mips-ptrace.dpatch	(.../src/glibc)	(revision 144)
@@ -0,0 +1,82 @@
+#! /bin/sh -e
+
+# All lines beginning with `# DP:' are a description of the patch.
+# DP: Description: Add the 32-on-64 PTRACE commands
+# DP: Related bugs: 
+# DP: Dpatch author: 
+# DP: Patch author: STuart Anderson <anderson@netsweng.com>
+# DP: Upstream status: Not submitted
+# DP: Status Details: 
+# DP: Date: Tue Nov 29 06:39:08 MST 2005
+
+PATCHLEVEL=0
+
+if [ $# -ne 2 ]; then
+    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+    exit 1
+fi
+case "$1" in
+    -patch) patch -d "$2" -f --no-backup-if-mismatch -p$PATCHLEVEL < $0;;
+    -unpatch) patch -d "$2" -f --no-backup-if-mismatch -R -p$PATCHLEVEL < $0;;
+    *)
+	echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+	exit 1
+esac
+exit 0
+
+# append the patch here and adjust the -p? flag in the patch calls.
+*** ptrace.h.orig	Tue Nov 29 11:05:00 2005
+--- ptrace.h	Tue Nov 29 11:05:06 2005
+***************
+*** 110,118 ****
+     PTRACE_SETFPXREGS = 19,
+  #define PT_SETFPXREGS PTRACE_SETFPXREGS
+  
+    /* Continue and stop at the next (return from) syscall.  */
+!   PTRACE_SYSCALL = 24
+  #define PT_SYSCALL PTRACE_SYSCALL
+  };
+  
+  /* Perform process tracing functions.  REQUEST is one of the values
+--- 110,150 ----
+     PTRACE_SETFPXREGS = 19,
+  #define PT_SETFPXREGS PTRACE_SETFPXREGS
+  
++   /* */
++   PTRACE_OLDSETOPTIONS = 21,
++ #define PT_OLDSETOPTIONS PTRACE_OLDSETOPTIONS
++ 
+    /* Continue and stop at the next (return from) syscall.  */
+!   PTRACE_SYSCALL = 24,
+  #define PT_SYSCALL PTRACE_SYSCALL
++ 
++   /* */
++   PTRACE_GET_THREAD_AREA = 25,
++ #define PT_GET_THREAD_AREA PTRACE_GET_THREAD_AREA
++ 
++   /* */
++   PTRACE_SET_THREAD_AREA = 26,
++ #define PT_SET_THREAD_AREA PTRACE_SET_THREAD_AREA
++ 
++   /* 32-on-64 version */
++   PTRACE_PEEKTEXT_3264 = 0xc0,
++ #define PT_PEEKTEXT_3264 PTRACE_PEEKTEXT_3264
++ 
++   /* 32-on-64 version */
++   PTRACE_PEEKDATA_3264 = 0xc1,
++ #define PT_PEEKDATA_3264 PTRACE_PEEKDATA_3264
++ 
++   /* 32-on-64 version */
++   PTRACE_POKETEXT_3264 = 0xc2,
++ #define PT_POKETEXT_3264 PTRACE_POKETEXT_3264
++ 
++   /* 32-on-64 version */
++   PTRACE_POKEDATA_3264 = 0xc3,
++ #define PT_POKEDATA_3264 PTRACE_POKEDATA_3264
++ 
++   /* 32-on-64 version */
++   PTRACE_GET_THREAD_AREA_3264 = 0xc4
++ #define PT_GET_THREAD_AREA_3264 PTRACE_GET_THREAD_AREA_3264
+  };
+  
+  /* Perform process tracing functions.  REQUEST is one of the values
Index: debian/sysdeps/mipsel.mk
===================================================================
--- debian/sysdeps/mipsel.mk	(.../vendor/glibc/current)	(revision 0)
+++ debian/sysdeps/mipsel.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-tradlittlemips
+
+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
+
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
+
+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
+
Index: debian/rules.d/debhelper.mk
===================================================================
--- debian/rules.d/debhelper.mk	(.../vendor/glibc/current)	(revision 144)
+++ debian/rules.d/debhelper.mk	(.../src/glibc)	(revision 144)
@@ -193,7 +193,7 @@
 	  destdir=$$1; \
 	  shift; \
 	  z=debian/$(libc)-$$x.install; \
-	  if test $$destdir = 64; then \
+	  if test $$destdir = 64 -o $$destdir = 32 ; then \
 	    cp debian/debhelper.in/libc-alt.install $$z; \
 	    zd=debian/$(libc)-dev-$$x.install; \
 	    cp debian/debhelper.in/libc-alt-dev.install $$zd; \
Index: debian/rules.d/control.mk
===================================================================
--- debian/rules.d/control.mk	(.../vendor/glibc/current)	(revision 144)
+++ debian/rules.d/control.mk	(.../src/glibc)	(revision 144)
@@ -1,4 +1,4 @@
-control_deps := $(addprefix debian/control.in/, libc6 libc6.1 libc0.3 libc1 sparc64 s390x ppc64 opt amd64)
+control_deps := $(addprefix debian/control.in/, libc6 libc6.1 libc0.3 libc1 sparc64 s390x ppc64 opt amd64 mips32 mips64)
 
 threads_archs := alpha amd64 arm armeb i386 m68k mips mipsel powerpc sparc ia64 hppa s390 sh3 sh4 sh3eb sh4eb freebsd-i386
 
@@ -26,6 +26,8 @@
 	cat debian/control.in/s390x		>> $@T
 	cat debian/control.in/amd64		>> $@T
 	cat debian/control.in/ppc64		>> $@T
+	cat debian/control.in/mips32		>> $@T
+	cat debian/control.in/mips64		>> $@T
 	cat debian/control.in/opt		>> $@T
 	cat debian/control.in/libnss-dns-udeb	>> $@T
 	cat debian/control.in/libnss-files-udeb	>> $@T

Reply to: