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

Bug#246547: amd64 support for glibc 2.3.2.ds1-14



On 04-Jul-05 13:11, GOTO Masanori wrote:
> I plan to upgrade 2.3.2.ds1-14 for the last sarge hopefully.  I would
> like to add amd64 support to this version.  Could you resend your
> latest amd64 patches?

The attached patch does the following:

* Add amd64 at the appropriate places in debian/control, 
  debian/rules.d/control.mk and debian/control.in/libc6.
  Add debian/patches/amd64-lib.dpatch to disable the biarch 
  lib64 dir on amd64 and enable this patch in debian/patches/00list.
  (Closes: #246547)
* Add a new file debian/sysdeps/amd64.mk with GLIBC_PASSES += nptl
  (Closes: #248192)
* Modify debian/rules to use gcc instead of gcc-3.3 on amd64.
  Add [!amd64] to the Build-Depends on gcc-3.3 in debian/control.
  This will make it possible to build glibc with gcc-3.4
  when gcc-3.4 becomes the default on amd64 without changing glibc again. 
  (The amd64 archive will likely be recompiled with gcc-3.4 entirely
  and gcc-3.4 will become the default on amd64
  because gcc-3.4 has much better support for amd64.)

I am also working on building a 32bit i386-libc package on amd64 
(by adding an 'i386' pass to GLIBC_PASSES in debian/sysdeps/amd64.mk) 
to make it possible to build a gcc with multilib support and to allow
the easy compilation of 32bit programs using '-m32' on amd64. 

However, this will need an updated linux-kernel-headers package 
which includes the i386 kernel headers (see #252720) and some 
changes in the gcc package which have not been sufficiently tested yet.

Regards
Andreas Jochens

diff -urN ../tmp-orig/glibc-2.3.2.ds1/debian/control ./debian/control
--- ../tmp-orig/glibc-2.3.2.ds1/debian/control	2004-07-05 12:51:10.632483267 +0200
+++ ./debian/control	2004-07-05 12:50:43.849657694 +0200
@@ -1,7 +1,7 @@
 Source: glibc
 Section: libs
 Priority: required
-Build-Depends: gettext (>= 0.10.37-1), make (>= 3.80-1), dpkg-dev (>= 1.4.1.5), debianutils (>= 1.13.1), tar (>= 1.13.11), bzip2, texinfo (>= 4.0), linux-kernel-headers (>= 2.5.999-test7-bk-9) [!hurd-i386], mig (>= 1.3-2) [hurd-i386], hurd-dev (>= 20020608-1) [hurd-i386], gnumach-dev [hurd-i386], texi2html, file, gcc-3.3, autoconf, binutils (>= 2.14.90.0.7-5), sed (>= 4.0.5-4), gawk, debhelper (>= 4.1.76)
+Build-Depends: gettext (>= 0.10.37-1), make (>= 3.80-1), dpkg-dev (>= 1.4.1.5), debianutils (>= 1.13.1), tar (>= 1.13.11), bzip2, texinfo (>= 4.0), linux-kernel-headers (>= 2.5.999-test7-bk-9) [!hurd-i386], mig (>= 1.3-2) [hurd-i386], hurd-dev (>= 20020608-1) [hurd-i386], gnumach-dev [hurd-i386], texi2html, file, gcc-3.3 [!amd64], autoconf, binutils (>= 2.14.90.0.7-5), sed (>= 4.0.5-4), gawk, debhelper (>= 4.1.76)
 Build-Depends-Indep: perl, po-debconf
 Maintainer: GNU Libc Maintainers <debian-glibc@lists.debian.org>
 Uploaders: Ben Collins <bcollins@debian.org>, GOTO Masanori <gotom@debian.org>, Philip Blundell <pb@nexus.co.uk>, Jeff Bailey <jbailey@raspberryginger.com>, Daniel Jacobowitz <dan@debian.org>
@@ -38,7 +38,7 @@
  by default. This created a package that unpacked to an excess of 30 megs.
 
 Package: nscd
-Architecture: alpha arm i386 m68k mips mipsel powerpc sparc ia64 hppa s390 sh3 sh4 sh3eb sh4eb freebsd-i386
+Architecture: alpha amd64 arm i386 m68k mips mipsel powerpc sparc ia64 hppa s390 sh3 sh4 sh3eb sh4eb freebsd-i386
 Section: admin
 Priority: optional
 Depends: libc6 (>= ${Source-Version})
@@ -50,7 +50,7 @@
  slow Services like LDAP, NIS or NIS+
 
 Package: libc6
-Architecture: arm i386 m68k mips mipsel powerpc sparc s390 hppa sh3 sh4 sh3eb sh4eb
+Architecture: amd64 arm i386 m68k mips mipsel powerpc sparc s390 hppa sh3 sh4 sh3eb sh4eb
 Section: base
 Priority: required
 Provides: ${locale:Depends}
@@ -61,7 +61,7 @@
  Timezone data is also included.
 
 Package: libc6-dev
-Architecture: arm i386 m68k mips mipsel powerpc sparc s390 hppa sh3 sh4 sh3eb sh4eb
+Architecture: amd64 arm i386 m68k mips mipsel powerpc sparc s390 hppa sh3 sh4 sh3eb sh4eb
 Section: libdevel
 Priority: standard
 Depends: libc6 (= ${Source-Version})
@@ -71,7 +71,7 @@
  and link programs which use the standard C library.
 
 Package: libc6-dbg
-Architecture: arm i386 m68k mips mipsel powerpc sparc s390 hppa sh3 sh4 sh3eb sh4eb
+Architecture: amd64 arm i386 m68k mips mipsel powerpc sparc s390 hppa sh3 sh4 sh3eb sh4eb
 Section: libdevel
 Priority: extra
 Depends: libc6 (= ${Source-Version})
@@ -84,7 +84,7 @@
  Most people will not need this package.
 
 Package: libc6-prof
-Architecture: arm i386 m68k mips mipsel powerpc sparc s390 hppa sh3 sh4 sh3eb sh4eb
+Architecture: amd64 arm i386 m68k mips mipsel powerpc sparc s390 hppa sh3 sh4 sh3eb sh4eb
 Section: libdevel
 Priority: extra
 Depends: libc6 (= ${Source-Version})
@@ -93,7 +93,7 @@
  with gprof.
 
 Package: libc6-pic
-Architecture: arm i386 m68k mips mipsel powerpc sparc s390 hppa sh3 sh4 sh3eb sh4eb
+Architecture: amd64 arm i386 m68k mips mipsel powerpc sparc s390 hppa sh3 sh4 sh3eb sh4eb
 Section: libdevel
 Priority: optional
 Conflicts: libc-pic
@@ -108,7 +108,7 @@
 
 Package: libc6-udeb
 XC-Package-Type: udeb
-Architecture: arm i386 m68k mips mipsel powerpc sparc s390 hppa sh3 sh4 sh3eb sh4eb
+Architecture: amd64 arm i386 m68k mips mipsel powerpc sparc s390 hppa sh3 sh4 sh3eb sh4eb
 Section: debian-installer
 Priority: extra
 Provides: libc6, libc-udeb, ${locale:Depends}
diff -urN ../tmp-orig/glibc-2.3.2.ds1/debian/control.in/libc6 ./debian/control.in/libc6
--- ../tmp-orig/glibc-2.3.2.ds1/debian/control.in/libc6	2004-07-05 12:51:10.295548363 +0200
+++ ./debian/control.in/libc6	2004-07-05 12:50:43.850657501 +0200
@@ -1,5 +1,5 @@
 Package: libc6
-Architecture: arm i386 m68k mips mipsel powerpc sparc s390 hppa sh3 sh4 sh3eb sh4eb
+Architecture: amd64 arm i386 m68k mips mipsel powerpc sparc s390 hppa sh3 sh4 sh3eb sh4eb
 Section: base
 Priority: required
 Provides: ${locale:Depends}
@@ -10,7 +10,7 @@
  Timezone data is also included.
 
 Package: libc6-dev
-Architecture: arm i386 m68k mips mipsel powerpc sparc s390 hppa sh3 sh4 sh3eb sh4eb
+Architecture: amd64 arm i386 m68k mips mipsel powerpc sparc s390 hppa sh3 sh4 sh3eb sh4eb
 Section: libdevel
 Priority: standard
 Depends: libc6 (= ${Source-Version})
@@ -20,7 +20,7 @@
  and link programs which use the standard C library.
 
 Package: libc6-dbg
-Architecture: arm i386 m68k mips mipsel powerpc sparc s390 hppa sh3 sh4 sh3eb sh4eb
+Architecture: amd64 arm i386 m68k mips mipsel powerpc sparc s390 hppa sh3 sh4 sh3eb sh4eb
 Section: libdevel
 Priority: extra
 Depends: libc6 (= ${Source-Version})
@@ -33,7 +33,7 @@
  Most people will not need this package.
 
 Package: libc6-prof
-Architecture: arm i386 m68k mips mipsel powerpc sparc s390 hppa sh3 sh4 sh3eb sh4eb
+Architecture: amd64 arm i386 m68k mips mipsel powerpc sparc s390 hppa sh3 sh4 sh3eb sh4eb
 Section: libdevel
 Priority: extra
 Depends: libc6 (= ${Source-Version})
@@ -42,7 +42,7 @@
  with gprof.
 
 Package: libc6-pic
-Architecture: arm i386 m68k mips mipsel powerpc sparc s390 hppa sh3 sh4 sh3eb sh4eb
+Architecture: amd64 arm i386 m68k mips mipsel powerpc sparc s390 hppa sh3 sh4 sh3eb sh4eb
 Section: libdevel
 Priority: optional
 Conflicts: libc-pic
@@ -57,7 +57,7 @@
 
 Package: libc6-udeb
 XC-Package-Type: udeb
-Architecture: arm i386 m68k mips mipsel powerpc sparc s390 hppa sh3 sh4 sh3eb sh4eb
+Architecture: amd64 arm i386 m68k mips mipsel powerpc sparc s390 hppa sh3 sh4 sh3eb sh4eb
 Section: debian-installer
 Priority: extra
 Provides: libc6, libc-udeb, ${locale:Depends}
diff -urN ../tmp-orig/glibc-2.3.2.ds1/debian/patches/00list ./debian/patches/00list
--- ../tmp-orig/glibc-2.3.2.ds1/debian/patches/00list	2004-07-05 12:51:10.321543341 +0200
+++ ./debian/patches/00list	2004-07-05 12:50:43.850657501 +0200
@@ -95,3 +95,4 @@
 locale-ro_RO
 s390-backtrace
 glibc232-misc-syslog
+amd64-lib
diff -urN ../tmp-orig/glibc-2.3.2.ds1/debian/patches/amd64-lib.dpatch ./debian/patches/amd64-lib.dpatch
--- ../tmp-orig/glibc-2.3.2.ds1/debian/patches/amd64-lib.dpatch	1970-01-01 01:00:00.000000000 +0100
+++ ./debian/patches/amd64-lib.dpatch	2004-07-05 12:50:43.850657501 +0200
@@ -0,0 +1,41 @@
+#! /bin/sh -e
+ 
+# All lines beginning with `# DP:' are a description of the patch.
+# DP: Description: Use /lib instead of /lib64 for the native amd64 port
+
+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 -p1 < $0;;
+    -unpatch) patch -d "$2" -f --no-backup-if-mismatch -R -p1 < $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.
+--- glibc-2.3.2/sysdeps/unix/sysv/linux/configure~	2004-06-05 14:03:22.118247000 +0200
++++ glibc-2.3.2/sysdeps/unix/sysv/linux/configure	2004-06-05 11:43:35.667961319 +0200
+@@ -224,7 +224,7 @@
+ /usr | /usr/)
+   # 64-bit libraries on bi-arch platforms go in /lib64 instead of /lib
+   case $machine in
+-  sparc/sparc64 | x86_64 | powerpc/powerpc64 | s390/s390-64 | \
++  sparc/sparc64 | powerpc/powerpc64 | s390/s390-64 | \
+   mips/mips64/n64/* )
+     libc_cv_slibdir="/lib64"
+     if test "$libdir" = '${exec_prefix}/lib'; then
+--- glibc-2.3.2/sysdeps/unix/sysv/linux/configure.in~	2004-07-05 09:52:28.000000000 +0200
++++ glibc-2.3.2/sysdeps/unix/sysv/linux/configure.in	2004-07-05 12:18:07.995664571 +0200
+@@ -157,7 +157,7 @@
+ /usr | /usr/)
+   # 64-bit libraries on bi-arch platforms go in /lib64 instead of /lib
+   case $machine in
+-  sparc/sparc64 | x86_64 | powerpc/powerpc64 | s390/s390-64 | \
++  sparc/sparc64 | powerpc/powerpc64 | s390/s390-64 | \
+   mips/mips64/n64/* )
+     libc_cv_slibdir="/lib64"
+     if test "$libdir" = '${exec_prefix}/lib'; then
diff -urN ../tmp-orig/glibc-2.3.2.ds1/debian/rules ./debian/rules
--- ../tmp-orig/glibc-2.3.2.ds1/debian/rules	2004-07-05 12:51:10.319543727 +0200
+++ ./debian/rules	2004-07-05 12:51:04.857598972 +0200
@@ -81,7 +81,11 @@
 sbindir=$(prefix)/sbin
 libexecdir=$(prefix)/lib
 
+ifeq ($(DEB_BUILD_ARCH),amd64)
+BUILD_CC = gcc
+else
 BUILD_CC = gcc-3.3
+endif
 
 # Set CC for cross-compiling
 ifneq ($(DEB_HOST_ARCH),$(DEB_BUILD_ARCH))
diff -urN ../tmp-orig/glibc-2.3.2.ds1/debian/rules.d/control.mk ./debian/rules.d/control.mk
--- ../tmp-orig/glibc-2.3.2.ds1/debian/rules.d/control.mk	2004-07-05 12:51:10.626484426 +0200
+++ ./debian/rules.d/control.mk	2004-07-05 12:50:43.851657307 +0200
@@ -1,10 +1,10 @@
 control_deps := $(addprefix debian/control.in/, libc6 libc6.1 libc0.3 libc1 sparc64 s390x opt)
 
-threads_archs := alpha arm i386 m68k mips mipsel powerpc sparc ia64 hppa s390 sh3 sh4 sh3eb sh4eb freebsd-i386
+threads_archs := alpha amd64 arm i386 m68k mips mipsel powerpc sparc ia64 hppa s390 sh3 sh4 sh3eb sh4eb freebsd-i386
 
 debian/control.in/libc6: debian/control.in/libc debian/rules.d/control.mk
 	sed -e 's%@libc@%libc6%g' \
-	    -e 's%@archs@%arm i386 m68k mips mipsel powerpc sparc s390 hppa sh3 sh4 sh3eb sh4eb%g' < $< > $@
+	    -e 's%@archs@%amd64 arm i386 m68k mips mipsel powerpc sparc s390 hppa sh3 sh4 sh3eb sh4eb%g' < $< > $@
 
 debian/control.in/libc6.1: debian/control.in/libc debian/rules.d/control.mk
 	sed -e 's%@libc@%libc6.1%g;s%@archs@%alpha ia64%g' < $< > $@
diff -urN ../tmp-orig/glibc-2.3.2.ds1/debian/sysdeps/amd64.mk ./debian/sysdeps/amd64.mk
--- ../tmp-orig/glibc-2.3.2.ds1/debian/sysdeps/amd64.mk	1970-01-01 01:00:00.000000000 +0100
+++ ./debian/sysdeps/amd64.mk	2004-07-05 12:50:43.851657307 +0200
@@ -0,0 +1 @@
+GLIBC_PASSES += nptl



Reply to: