Hello,

On 05-Aug-18 19:38, GOTO Masanori wrote:
> If your patch does not have any impact, please send your latest
> version to me.

I updated the ppc64 patch again so that it now applies cleanly to 
the current glibc version 2.3.5-4 and also to the current svn.

Regards
Andreas Jochens


Summary of changes to enable native ppc64 support:

    * debian/control.in/main: Add Build-Depends on gcc-3.4 [ppc64] and
        libc6-dev-powerpc [ppc64].

    * debian/control.in/powerpc: New libc6-(dev-)powerpc packages for ppc64.

    * debian/patches/amd64-lib.dpatch: Apply on amd64 and ppc64 only.
        Add support for (/usr)/lib32.

    * debian/sysdeps/ppc64.mk: Build settings for ppc64.

    * debian/rules.d/debhelper.mk: Add support for (/usr)/lib32.

    * debian/rules.d/control.mk: Add ppc64 to archs and threads_archs.
        Include new 'debian/control.in/powerpc' file.

diff -urN ../tmp-orig/glibc-2.3.5/debian/control ./debian/control
--- ../tmp-orig/glibc-2.3.5/debian/control      2005-08-24 09:27:31.000000000 
+0000
+++ ./debian/control    2005-08-24 09:25:58.000000000 +0000
@@ -1,7 +1,7 @@
 Source: glibc
 Section: libs
 Priority: required
-Build-Depends: gettext (>= 0.10.37-1), make (>= 3.80-1), dpkg-dev (>= 1.13.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-4.0 [!powerpc !m68k !hppa], gcc-4.0 (>= 4.0.1-5) [hppa], 
gcc-3.4 (>= 3.4.4-6) [powerpc], gcc-3.4 [m68k], 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.13.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-4.0 [!powerpc !m68k !hppa], gcc-4.0 (>= 4.0.1-5) [hppa], 
gcc-3.4 (>= 3.4.4-6) [powerpc ppc64], gcc-3.4 [m68k], autoconf, binutils (>= 
2.14.90.0.7-5), sed (>= 4.0.5-4), gawk, debhelper (>= 4.1.76), 
libc6-dev-powerpc [ppc64]
 Build-Depends-Indep: perl, po-debconf
 Maintainer: GNU Libc Maintainers <[email protected]>
 Uploaders: Ben Collins <[EMAIL PROTECTED]>, GOTO Masanori <[EMAIL PROTECTED]>, 
Philip Blundell <[EMAIL PROTECTED]>, Jeff Bailey <[EMAIL PROTECTED]>, Daniel 
Jacobowitz <[EMAIL PROTECTED]>
diff -urN ../tmp-orig/glibc-2.3.5/debian/control.in/main 
./debian/control.in/main
--- ../tmp-orig/glibc-2.3.5/debian/control.in/main      2005-08-24 
09:27:31.000000000 +0000
+++ ./debian/control.in/main    2005-08-24 09:25:40.000000000 +0000
@@ -1,7 +1,7 @@
 Source: @glibc@
 Section: libs
 Priority: required
-Build-Depends: gettext (>= 0.10.37-1), make (>= 3.80-1), dpkg-dev (>= 1.13.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-4.0 [!powerpc !m68k !hppa], gcc-4.0 (>= 4.0.1-5) [hppa], 
gcc-3.4 (>= 3.4.4-6) [powerpc], gcc-3.4 [m68k], 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.13.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-4.0 [!powerpc !m68k !hppa], gcc-4.0 (>= 4.0.1-5) [hppa], 
gcc-3.4 (>= 3.4.4-6) [powerpc ppc64], gcc-3.4 [m68k], autoconf, binutils (>= 
2.14.90.0.7-5), sed (>= 4.0.5-4), gawk, debhelper (>= 4.1.76), 
libc6-dev-powerpc [ppc64]
 Build-Depends-Indep: perl, po-debconf
 Maintainer: GNU Libc Maintainers <[email protected]>
 Uploaders: Ben Collins <[EMAIL PROTECTED]>, GOTO Masanori <[EMAIL PROTECTED]>, 
Philip Blundell <[EMAIL PROTECTED]>, Jeff Bailey <[EMAIL PROTECTED]>, Daniel 
Jacobowitz <[EMAIL PROTECTED]>
diff -urN ../tmp-orig/glibc-2.3.5/debian/control.in/powerpc 
./debian/control.in/powerpc
--- ../tmp-orig/glibc-2.3.5/debian/control.in/powerpc   1970-01-01 
00:00:00.000000000 +0000
+++ ./debian/control.in/powerpc 2005-08-24 09:21:28.000000000 +0000
@@ -0,0 +1,21 @@
+Package: libc6-powerpc
+Architecture: ppc64
+Section: libs
+Priority: extra
+Depends: libc6 (= ${Source-Version}), lib32gcc1
+Description: GNU C Library: 32bit powerpc shared libraries for ppc64
+ This package includes shared versions of the standard C
+ library and the standard math library, as well as many others.
+ This is the 32bit version of the library, meant for ppc64 systems.
+
+Package: libc6-dev-powerpc
+Architecture: ppc64
+Section: libdevel
+Priority: standard
+Provides: lib32c-dev
+Depends: libc6-powerpc (= ${Source-Version}), libc6-dev (= ${Source-Version})
+Description: GNU C Library: 32bit powerpc development libraries for ppc64
+ Contains the symlinks and object files needed to compile and link programs
+ which use the standard C library. This is the 32bit version of the
+ library, meant for ppc64 systems.
+
diff -urN ../tmp-orig/glibc-2.3.5/debian/patches/amd64-lib.dpatch 
./debian/patches/amd64-lib.dpatch
--- ../tmp-orig/glibc-2.3.5/debian/patches/amd64-lib.dpatch     2005-08-24 
09:27:31.000000000 +0000
+++ ./debian/patches/amd64-lib.dpatch   2005-08-24 09:19:56.000000000 +0000
@@ -1,12 +1,15 @@
 #! /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
+# DP: Description: Use /lib instead of /lib64 for amd64/ppc64 ports
 # DP: Dpatch author: Andreas Jochens <[EMAIL PROTECTED]>
 # DP: Patch author: 
 # DP: Upstream status: Debian-Specific
 # DP: Status Details: 
-# DP: Date: 2004-06-07
+# DP: Date: 2004-06-07/2005-08-09
+
+# this patch is for amd64 and ppc64 only
+[ "$DEB_HOST_ARCH" != "amd64" ] && [ "$DEB_HOST_ARCH" != "ppc64" ] && exit 0
 
 if [ $# -ne 2 ]; then
     echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
@@ -29,10 +32,18 @@
    # 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 | \
++  sparc/sparc64 | s390/s390-64 | \
    mips/mips64/n64/* )
      libc_cv_slibdir="/lib64"
      if test "$libdir" = '${exec_prefix}/lib'; then
+@@ -245,6 +245,7 @@
+     ;;
+   *)
+     libc_cv_slibdir="/lib"
++    test "$libdir" = '/usr/lib32' && libc_cv_slibdir="/lib32"
+     ;;
+   esac
+   # Allow the user to override the path with --sysconfdir
 --- 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 @@
@@ -40,7 +51,15 @@
    # 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 | \
++  sparc/sparc64 | s390/s390-64 | \
    mips/mips64/n64/* )
      libc_cv_slibdir="/lib64"
      if test "$libdir" = '${exec_prefix}/lib'; then
+@@ -180,6 +180,7 @@
+     ;;
+   *)
+     libc_cv_slibdir="/lib"
++    test "$libdir" = '/usr/lib32' && libc_cv_slibdir="/lib32"
+     ;;
+   esac
+   # Allow the user to override the path with --sysconfdir
diff -urN ../tmp-orig/glibc-2.3.5/debian/rules.d/control.mk 
./debian/rules.d/control.mk
--- ../tmp-orig/glibc-2.3.5/debian/rules.d/control.mk   2005-08-24 
09:27:31.000000000 +0000
+++ ./debian/rules.d/control.mk 2005-08-24 09:18:24.000000000 +0000
@@ -1,10 +1,10 @@
 control_deps := $(addprefix debian/control.in/, libc6 libc6.1 libc0.3 libc1 
sparc64 s390x ppc64 opt)
 
-threads_archs := alpha amd64 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 ppc64 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 '[EMAIL PROTECTED]@%libc6%g' \
-           -e '[EMAIL PROTECTED]@%amd64 arm i386 m68k mips mipsel powerpc 
sparc s390 hppa sh3 sh4 sh3eb sh4eb%g' < $< > $@
+           -e '[EMAIL PROTECTED]@%amd64 arm i386 m68k mips mipsel powerpc 
ppc64 sparc s390 hppa sh3 sh4 sh3eb sh4eb%g' < $< > $@
 
 debian/control.in/libc6.1: debian/control.in/libc debian/rules.d/control.mk
        sed -e '[EMAIL PROTECTED]@%libc6.1%g;[EMAIL PROTECTED]@%alpha ia64%g' < 
$< > $@
@@ -24,6 +24,7 @@
        cat debian/control.in/libc1             >> [EMAIL PROTECTED]
        cat debian/control.in/sparc64           >> [EMAIL PROTECTED]
        cat debian/control.in/s390x             >> [EMAIL PROTECTED]
+       cat debian/control.in/powerpc           >> [EMAIL PROTECTED]
        cat debian/control.in/ppc64             >> [EMAIL PROTECTED]
        cat debian/control.in/opt               >> [EMAIL PROTECTED]
        cat debian/control.in/libnss-dns-udeb   >> [EMAIL PROTECTED]
diff -urN ../tmp-orig/glibc-2.3.5/debian/rules.d/debhelper.mk 
./debian/rules.d/debhelper.mk
--- ../tmp-orig/glibc-2.3.5/debian/rules.d/debhelper.mk 2005-08-24 
09:27:31.000000000 +0000
+++ ./debian/rules.d/debhelper.mk       2005-08-24 09:18:24.000000000 +0000
@@ -178,7 +178,7 @@
          esac; \
        done
 
-       # Hack: special-case passes whose destdir is 64 (i.e. /lib64)
+       # Hack: special-case for destdir==32 or 64 (i.e. /lib32 or /lib64)
        # to use a different install template, which includes more
        # libraries.  Also generate a -dev.  Non-64 libraries get scripts
        # to temporarily disable hwcap.  This needs some cleaning up.
@@ -187,7 +187,7 @@
          destdir=$$1; \
          shift; \
          z=debian/$(libc)-$$x.install; \
-         if test $$destdir = 64; then \
+         if test $$destdir = 64 || test $$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; \
diff -urN ../tmp-orig/glibc-2.3.5/debian/sysdeps/ppc64.mk 
./debian/sysdeps/ppc64.mk
--- ../tmp-orig/glibc-2.3.5/debian/sysdeps/ppc64.mk     1970-01-01 
00:00:00.000000000 +0000
+++ ./debian/sysdeps/ppc64.mk   2005-08-24 09:18:24.000000000 +0000
@@ -0,0 +1,36 @@
+CC = gcc-3.4
+BUILD_CC = gcc-3.4
+
+# build libc with nptl instead of linuxthreads
+libc_MIN_KERNEL_SUPPORTED = 2.6.0
+libc_add-ons = nptl $(add-ons)
+libc_extra_cflags = -O3
+
+# nptl/ppc64 extra_cflags needs -g2 because of gcc-3.4 bug.
+ifeq ($(BUILD_CC_VERSION),3.4)
+        libc_extra_cflags += -g2
+endif
+
+# /lib64 and /usr/lib64 are provided as symlinks 
+define libc6_extra_pkg_install
+ln -sf lib debian/$(curpass)/lib64
+ln -sf lib debian/$(curpass)/usr/lib64
+endef
+
+# build 32-bit (powerpc) alternative library
+GLIBC_PASSES += powerpc
+DEB_ARCH_REGULAR_PACKAGES += libc6-powerpc libc6-dev-powerpc
+powerpc_MIN_KERNEL_SUPPORTED = 2.6.0
+powerpc_configure_target = powerpc-linux
+powerpc_CC = $(CC) -m32
+powerpc_add-ons = nptl $(add-ons)
+libc6-powerpc_shlib_dep = libc6-powerpc (>= $(shlib_dep_ver))
+powerpc_extra_cflags = -O3 # -g1 disabled (should be reenabled)
+powerpc_LIBDIR = 32
+powerpc_extra_config_options = $(extra_config_options) --libdir=/usr/lib32
+
+# create a symlink for the 32 bit dynamic linker in /lib
+define libc6-powerpc_extra_pkg_install
+mkdir -p debian/$(curpass)/lib
+ln -s /lib32/ld.so.1 debian/$(curpass)/lib
+endef


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to