[PATCH] elf64_sparc default search dirs
Richard Henderson
rth@cygnus.com
Thu Jul 8 16:44:00 GMT 1999
On Mon, Jul 05, 1999 at 05:58:34PM +0200, Jakub Jelinek wrote:
>
> + if [ "x${DEFAULT_EMULATION}" = "x${EMULATION_NAME}" ] ; then
Please update from cvs more often. This wouldn't have worked anymore,
since DEFAULT_EMULATION is now replaced in favour of EMULATION_LIBPATH
so that ppc-linux can have two `default' emulations.
> + if [ -n "${NATIVE_LIB_DIRS}" ]; then
> + LIB_PATH=${LIB_PATH}:`echo ${NATIVE_LIB_DIRS} | sed 's_/lib\(\|/\)$_/lib'${SPARC_ELF64_SUFFIX}_`
> + fi
Is all this seding really necessary? Did you forget to add in
an unadorned ${NATIVE_LIB_DIRS}, or what that intentional?
Does the following work for you?
r~
Index: emulparams/elf64_sparc.sh
===================================================================
RCS file: /cvs/binutils/binutils/ld/emulparams/elf64_sparc.sh,v
retrieving revision 1.1.1.1
diff -c -p -d -r1.1.1.1 elf64_sparc.sh
*** elf64_sparc.sh 1999/05/03 07:29:07 1.1.1.1
--- elf64_sparc.sh 1999/07/08 23:41:15
*************** MACHINE=
*** 10,12 ****
--- 10,46 ----
DATA_PLT=
GENERATE_SHLIB_SCRIPT=yes
NOP=0x01000000
+
+ if [ "x${host}" = "x${target}" ]; then
+ case " $EMULATION_LIBPATH " in
+ *" ${EMULATION_NAME} "*)
+ # Native, and default or emulation requesting LIB_PATH.
+
+ # Linux and Solaris modify the default library search path
+ # to first include a 64-bit specific directory. It's put
+ # in slightly different places on the two systems.
+ case "$target" in
+ sparc*-linux*)
+ suffix=64 ;;
+ sparc*-solaris*)
+ suffix=/sparcv9 ;;
+ esac
+
+ if [ -n "${suffix}" ]; then
+
+ LIB_PATH=/lib${suffix}:/lib
+ LIB_PATH=${LIB_PATH}:/usr/lib${suffix}:/usr/lib
+ if [ -n "${NATIVE_LIB_DIRS}" ]; then
+ LIB_PATH=${LIB_PATH}:${NATIVE_LIB_DIRS}${suffix}:${NATIVE_LIB_DIRS}
+ fi
+ if [ "${libdir}" != /usr/lib ]; then
+ LIB_PATH=${LIB_PATH}:${libdir}${suffix}:${libdir}
+ fi
+ if [ "${libdir}" != /usr/local/lib ]; then
+ LIB_PATH=${LIB_PATH}:/usr/local/lib${suffix}:/usr/local/lib
+ fi
+
+ fi
+ ;;
+ esac
+ fi
More information about the Binutils
mailing list