This is the mail archive of the binutils@sourceware.cygnus.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[PATCH] elf64_sparc default search dirs


Hi!

This patch sets the default SEARCH_DIR for elf64_sparc on sparc*-linux* and
sparc*-solaris*. On Linux to /lib64, /usr/lib64 etc. style of paths, on
Solaris to /lib/sparcv9/, /usr/lib/sparcv9/ style of paths.
Without it, users cannot link even simple 64bit binaries unless they use
-rpath explicitely.

1999-07-05  Jakub Jelinek  <jj@ultra.linux.cz>

	ld/emulparams/elf64_sparc.sh: Set LIB_PATH on sparc*-linux*
	and sparc*-solaris* to 64bit libraries locations.

--- ld/emulparams/elf64_sparc.sh.jj	Thu Apr 22 10:15:45 1999
+++ ld/emulparams/elf64_sparc.sh	Fri Jun  4 15:54:28 1999
@@ -10,3 +10,31 @@
 DATA_PLT=
 GENERATE_SHLIB_SCRIPT=yes
 NOP=0x01000000
+if [ "x${host}" = "x${target}" ] ; then
+  # Native
+  case "$target" in
+    sparc*-linux*)
+      SPARC_ELF64_SUFFIX=64 ;;
+    sparc*-solaris*)
+      SPARC_ELF64_SUFFIX=/sparcv9 ;;
+  esac
+fi
+if [ -n "${SPARC_ELF64_SUFFIX}" ]; then
+  LIB_PATH=/lib${SPARC_ELF64_SUFFIX}:/lib:/usr/lib${SPARC_ELF64_SUFFIX}:/usr/lib
+  if [ "x${DEFAULT_EMULATION}" = "x${EMULATION_NAME}" ] ; then
+    if [ -n "${NATIVE_LIB_DIRS}" ]; then
+      LIB_PATH=${LIB_PATH}:`echo ${NATIVE_LIB_DIRS} | sed 's_/lib\(\|/\)$_/lib'${SPARC_ELF64_SUFFIX}_`
+    fi
+    if [ "${libdir}" != /usr/lib -a "${libdir}" != /usr/lib${SPARC_ELF64_SUFFIX} ]; then
+      LIB_PATH=${LIB_PATH}:`echo ${libdir} | sed 's_/lib\(\|/\)$_/lib'${SPARC_ELF64_SUFFIX}_`
+    fi
+    if [ "${libdir}" != /usr/local/lib -a "${libdir}" != /usr/local/lib${SPARC_ELF64_SUFFIX} ]; then
+      LIB_PATH=${LIB_PATH}:/usr/local/lib${SPARC_ELF64_SUFFIX}:/usr/local/lib
+    fi
+  else
+    LIB_PATH=${LIB_PATH}:/usr/local/lib${SPARC_ELF64_SUFFIX}:/usr/local/lib
+  fi
+  if [ "x${DEFAULT_EMULATION}" = "xelf32_sparc" ]; then
+    COMPILE_IN=true
+  fi
+fi

Cheers,
    Jakub
___________________________________________________________________
Jakub Jelinek | jj@sunsite.mff.cuni.cz | http://sunsite.mff.cuni.cz
Administrator of SunSITE Czech Republic, MFF, Charles University
___________________________________________________________________
UltraLinux  |  http://ultra.linux.cz/  |  http://ultra.penguin.cz/
Linux version 2.2.10 on a sparc64 machine (1343.49 BogoMips)
___________________________________________________________________

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]