summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-libs/glibc/files/glibc-2.2.5-sparc64-fixups.diff')
-rw-r--r--sys-libs/glibc/files/glibc-2.2.5-sparc64-fixups.diff46
1 files changed, 46 insertions, 0 deletions
diff --git a/sys-libs/glibc/files/glibc-2.2.5-sparc64-fixups.diff b/sys-libs/glibc/files/glibc-2.2.5-sparc64-fixups.diff
new file mode 100644
index 000000000000..181f13c52d49
--- /dev/null
+++ b/sys-libs/glibc/files/glibc-2.2.5-sparc64-fixups.diff
@@ -0,0 +1,46 @@
+#! /bin/sh -e
+
+# DP: Fix ldconfig so that lib64 searches are implicit.
+
+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
+
+--- glibc-2.2.3/elf/ldconfig.c~ Tue Mar 20 11:44:35 2001
++++ glibc-2.2.3/elf/ldconfig.c Tue Apr 24 18:14:05 2001
+@@ -287,6 +287,26 @@
+ dir_entries = entry;
+ else if (ptr == NULL)
+ prev->next = entry;
++#ifdef __sparc__
++#define MSUBDIR "64"
++ if (ptr == NULL) {
++ int si = strlen(entry->path) - strlen(MSUBDIR);
++ if (strcmp (entry->path + (si <= 0 ? 0 : si), MSUBDIR) != 0) {
++ /* Handle subdirectory later. */
++ struct dir_entry *new_entry;
++
++ new_entry = xmalloc (sizeof (struct dir_entry));
++ new_entry->path = xmalloc(strlen(entry->path)+strlen(MSUBDIR)+1);
++ new_entry->flag = entry->flag;
++ new_entry->next = NULL;
++ sprintf(new_entry->path, "%s%s", entry->path, MSUBDIR);
++ if (opt_verbose)
++ printf("Adding implicit multilib directory:\n\t%s\n", new_entry->path);
++ add_single_dir (new_entry, 0);
++ }
++ }
++#undef MSUBDIR
++#endif
+ }
+
+ /* Add one directory to the list of directories to process. */