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

Bug#325463: glibc: [Patch] Allow for multiarch libraries



Package: glibc
Severity: wishlist
Tags: patch

Hi,

atached is a patch that will add /lib/arch-os-gnu and
/usr/lib/arch-os-gnu to the default-rpath. Those two directories are
the placement for libraries in the future multiarch support [...-gnu
now since gcc -dumpmachine has it and to allow for e.g. uclibc linked
libraries].

The patch is part of work done by Tollef Fog Heen <tfheen@debian.org>
to multiarch-ify glibc and reduced to just the parts needed to make
glibc see other, already multiarch-ified libraries. Adding this would
greatly help transitioning to multiarch as it prevents a big testing
blockage (libraries don't have to wait for glibc to become multiarch
but can transition on their own).

MfG
	Goswin

-- System Information:
Debian Release: 3.1
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.8-frosties-2
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
diff -u glibc-2.3.5.orig/debian/patches/99_multiarch-ld.dpatch glibc-2.3.5/debian/patches/99_multiarch-ld.dpatch
--- glibc-2.3.5.orig/debian/patches/99_multiarch-ld.dpatch
+++ glibc-2.3.5/debian/patches/99_multiarch-ld.dpatch
@@ -0,0 +1,48 @@
+#! /bin/sh -e
+
+# All lines beginning with `# DP:' are a description of the patch.
+# DP: Description: Multiarch support
+# DP: Author: Tollef Fog Heen <tfheen@debian.org>
+# DP: Upstream status: Not submitted
+# DP: Date: 2005-01-20
+
+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/Makeconfig	2004-05-10 19:32:23.000000000 +0200
++++ glibc-2.3.2/Makeconfig	2004-05-10 19:30:33.000000000 +0200
+@@ -178,6 +178,12 @@
+ endif
+ inst_slibdir = $(install_root)$(slibdir)
+ 
++# Extra places to look for libraries
++ifndef extra_libdir
++extra_libdir := $(exec_prefix)/lib/$(shell gcc -dumpmachine):/lib/$(shell gcc -dumpmachine)
++endif
++
++
+ # Prefix to put on files installed in $(libdir).  For libraries `libNAME.a',
+ # the prefix is spliced between `lib' and the name, so the linker switch
+ # `-l$(libprefix)NAME' finds the library; for other files the prefix is
+@@ -482,6 +488,10 @@
+ default-rpath = $(libdir)
+ endif
+ 
++ifdef extra_libdir
++default-rpath += :$(extra_libdir)
++endif
++
+ ifndef link-extra-libs
+ ifeq (yes,$(build-shared))
+ ifneq ($(common-objpfx),$(objpfx))
diff -u glibc-2.3.5/debian/patches/00list glibc-2.3.5/debian/patches/00list
--- glibc-2.3.5/debian/patches/00list
+++ glibc-2.3.5/debian/patches/00list
@@ -84,0 +85 @@
+99_multiarch-ld

Reply to: