diff options
author | Daniel Jacobowitz <drow@false.org> | 2003-01-06 16:14:01 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@false.org> | 2003-01-06 16:14:01 +0000 |
commit | 9c8ebd6a5127e55660465d193593cce16b26516c (patch) | |
tree | d9e30a69db894db226592dad8cf182d9bc60b00a /ld/emulparams | |
parent | b089b3da7575478aa863aa494cce5d5d7d4b68fe (diff) | |
download | gdb-9c8ebd6a5127e55660465d193593cce16b26516c.zip gdb-9c8ebd6a5127e55660465d193593cce16b26516c.tar.gz gdb-9c8ebd6a5127e55660465d193593cce16b26516c.tar.bz2 |
* Makefile.am (eelf32iq10.c): Fix tab/whitespace mixup.
* Makefile.am (ldmain.o): Add @TARGET_SYSTEM_ROOT_DEFINE@.
(GENSCRIPTS): Add @use_sysroot@.
* Makefile.in: Regenerated.
* configure.host: Move setting of NATIVE_LIB_DIRS to...
* configure.tgt: ... here. Use ${target} instead of ${host}
for NATIVE_LIB_DIRS.
* configure.in: Add --with-sysroot.
* configure: Regenerated.
* genscripts.sh: Accept use_sysroot option. Set new variables
NATIVE and USE_LIBPATH. Prepend "=" to directory names if
$use_sysroot. Don't search $tool_lib if $use_sysroot.
* ldfile.c (ldfile_add_library_path): Handle leading '='.
* ldmain.c (TARGET_SYSTEM_ROOT): Define if not defined.
(ld_sysroot): New variable.
(main): Initialize ld_sysroot.
* ldmain.h (ld_sysroot): New extern.
* emultempl/elf32.em: Use NATIVE and USE_LIBPATH instead of
searching $EMULATION_LIBPATH.
(gld${EMULATION_NAME}_add_sysroot): New function.
(gld${EMULATION_NAME}_check_ld_so_conf): Use it. Honor ld_sysroot.
(gld${EMULATION_NAME}_after_open): Likewise. Only search
environment variables if $NATIVE.
* ld.texinfo (Options): Mention "=" prefix in the description of -L.
* NEWS: Mention --with-sysroot.
* emulparams/elf32bmipn32-defs.sh: Set NATIVE and LIBPATH_SUFFIX
instead of setting LIB_PATH.
* emulparams/elf32ppc.sh: Likewise.
* emulparams/elf64_s390.sh: Likewise.
* emulparams/elf64_sparc.sh: Likewise.
* emulparams/elf64ppc.sh: Likewise.
* emulparams/elf_x86_64.sh: Likewise.
* emulparams/elf64_aix.sh: Add "=" prefixes to LIB_PATH.
* emulparams/elf64hppa.sh: Add "=" prefixes to LIB_PATH.
Diffstat (limited to 'ld/emulparams')
-rw-r--r-- | ld/emulparams/elf32bmipn32-defs.sh | 15 | ||||
-rw-r--r-- | ld/emulparams/elf32ppc.sh | 25 | ||||
-rw-r--r-- | ld/emulparams/elf64_aix.sh | 2 | ||||
-rw-r--r-- | ld/emulparams/elf64_s390.sh | 33 | ||||
-rw-r--r-- | ld/emulparams/elf64_sparc.sh | 44 | ||||
-rwxr-xr-x | ld/emulparams/elf64hppa.sh | 2 | ||||
-rw-r--r-- | ld/emulparams/elf64ppc.sh | 24 | ||||
-rw-r--r-- | ld/emulparams/elf_x86_64.sh | 33 |
8 files changed, 68 insertions, 110 deletions
diff --git a/ld/emulparams/elf32bmipn32-defs.sh b/ld/emulparams/elf32bmipn32-defs.sh index deccadd..790eecf 100644 --- a/ld/emulparams/elf32bmipn32-defs.sh +++ b/ld/emulparams/elf32bmipn32-defs.sh @@ -21,19 +21,14 @@ esac if test `echo "$host" | sed -e s/64//` = `echo "$target" | sed -e s/64//`; then case " $EMULATION_LIBPATH " in *" ${EMULATION_NAME} "*) - LIB_PATH=${libdir} - for lib in ${NATIVE_LIB_DIRS}; do - case :${LIB_PATH}: in - *:${lib}:*) ;; - *) LIB_PATH=${LIB_PATH}:${lib} ;; - esac - done - # Look for 64 bit target libraries in /lib64, /usr/lib64 etc., first. - LIB_PATH=`echo ${LIB_PATH}: | sed -e s,:,$ELFSIZE:,g`$LIB_PATH - ;; + NATIVE=yes + ;; esac fi +# Look for 64 bit target libraries in /lib64, /usr/lib64 etc., first. +LIBPATH_SUFFIX=$ELFSIZE + GENERATE_SHLIB_SCRIPT=yes TEXT_START_ADDR=0x10000000 diff --git a/ld/emulparams/elf32ppc.sh b/ld/emulparams/elf32ppc.sh index d1caf58..f0fb005 100644 --- a/ld/emulparams/elf32ppc.sh +++ b/ld/emulparams/elf32ppc.sh @@ -25,19 +25,14 @@ OTHER_GOT_RELOC_SECTIONS=" # Treat a host that matches the target with the possible exception of "64" # in the name as if it were native. if test `echo "$host" | sed -e s/64//` = `echo "$target" | sed -e s/64//`; then - case " $EMULATION_LIBPATH " in - *" ${EMULATION_NAME} "*) - LIB_PATH=${libdir} - for lib in ${NATIVE_LIB_DIRS}; do - case :${LIB_PATH}: in - *:${lib}:*) ;; - *) LIB_PATH=${LIB_PATH}:${lib} ;; - esac - done - # Look for 64 bit target libraries in /lib64, /usr/lib64 etc., first. - case "$EMULATION_NAME" in - *64*) LIB_PATH=`echo ${LIB_PATH}: | sed -e s,:,64:,g`$LIB_PATH - esac - ;; - esac + case " $EMULATION_LIBPATH " in + *" ${EMULATION_NAME} "*) + NATIVE=yes + ;; + esac fi + +# Look for 64 bit target libraries in /lib64, /usr/lib64 etc., first. +case "$EMULATION_NAME" in + *64*) LIBPATH_SUFFIX=64 ;; +esac diff --git a/ld/emulparams/elf64_aix.sh b/ld/emulparams/elf64_aix.sh index df2b0aa..738fea9 100644 --- a/ld/emulparams/elf64_aix.sh +++ b/ld/emulparams/elf64_aix.sh @@ -18,4 +18,4 @@ OTHER_READONLY_SECTIONS=" .opd ${RELOCATING-0} : { *(.opd) } .IA_64.unwind_info ${RELOCATING-0} : { *(.IA_64.unwind_info*${RELOCATING+ .gnu.linkonce.ia64unwi.*}) } .IA_64.unwind ${RELOCATING-0} : { *(.IA_64.unwind*${RELOCATING+ .gnu.linkonce.ia64unw.*}) }" -LIB_PATH=/usr/lib/ia64l64:/usr/lib:/usr/local/lib +LIB_PATH="=/usr/lib/ia64l64:=/usr/lib:=/usr/local/lib" diff --git a/ld/emulparams/elf64_s390.sh b/ld/emulparams/elf64_s390.sh index 236fd17..8cea83d 100644 --- a/ld/emulparams/elf64_s390.sh +++ b/ld/emulparams/elf64_s390.sh @@ -16,26 +16,17 @@ if test `echo "$host" | sed -e s/390x/390/` \ = `echo "$target" | sed -e s/390x/390/`; then case " $EMULATION_LIBPATH " in *" ${EMULATION_NAME} "*) - LIB_PATH=${libdir} - for lib in ${NATIVE_LIB_DIRS}; do - case :${LIB_PATH}: in - *:${lib}:*) ;; - *) LIB_PATH=${LIB_PATH}:${lib} ;; - esac - done - - case "$target" in - s390*-linux*) - suffix=64 ;; - esac - - # Look for 64 bit target libraries in /lib64, /usr/lib64 etc., first - # on Linux. - if [ -n "$suffix" ]; then - case "$EMULATION_NAME" in - *64*) - LIB_PATH=`echo ${LIB_PATH}: | sed -e s,:,$suffix:,g`$LIB_PATH ;; - esac - fi ;; + NATIVE=yes esac fi + +# Look for 64 bit target libraries in /lib64, /usr/lib64 etc., first +# on Linux. +case "$target" in + s390*-linux*) + case "$EMULATION_NAME" in + *64*) + LIBPATH_SUFFIX=$suffix ;; + esac + ;; +esac diff --git a/ld/emulparams/elf64_sparc.sh b/ld/emulparams/elf64_sparc.sh index 7a4d2dc..3bc3ea8 100644 --- a/ld/emulparams/elf64_sparc.sh +++ b/ld/emulparams/elf64_sparc.sh @@ -28,31 +28,23 @@ if test `echo "$host" | sed -e 's/64//;s/v[789]//'` \ = `echo "$target" | sed -e 's/64//;s/v[789]//'`; then case " $EMULATION_LIBPATH " in *" ${EMULATION_NAME} "*) - LIB_PATH=${libdir} - for lib in ${NATIVE_LIB_DIRS}; do - case :${LIB_PATH}: in - *:${lib}:*) ;; - *) LIB_PATH=${LIB_PATH}:${lib} ;; - esac - done - - # 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 - - # Look for 64 bit target libraries in /lib64, /usr/lib64 etc., first - # on Linux and /lib/sparcv9, /usr/lib/sparcv9 etc. on Solaris. - if [ -n "$suffix" ]; then - case "$EMULATION_NAME" in - *64*) - LIB_PATH=`echo ${LIB_PATH}: | sed -e s,:,$suffix:,g`$LIB_PATH ;; - esac - fi ;; + NATIVE=yes + ;; esac fi + +# 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. +# Look for 64 bit target libraries in /lib64, /usr/lib64 etc., first +# on Linux and /lib/sparcv9, /usr/lib/sparcv9 etc. on Solaris. +case "$EMULATION_NAME" in + *64*) + case "$target" in + sparc*-linux*) + suffix=64 ;; + sparc*-solaris*) + suffix=/sparcv9 ;; + esac + ;; +esac diff --git a/ld/emulparams/elf64hppa.sh b/ld/emulparams/elf64hppa.sh index 8a44179..26c3153 100755 --- a/ld/emulparams/elf64hppa.sh +++ b/ld/emulparams/elf64hppa.sh @@ -1,6 +1,6 @@ . ${srcdir}/emulparams/hppa64linux.sh OUTPUT_FORMAT="elf64-hppa" -LIB_PATH=/usr/lib/pa20_64:/opt/langtools/lib/pa20_64 +LIB_PATH="=/usr/lib/pa20_64:=/opt/langtools/lib/pa20_64" TEXT_START_ADDR=0x4000000000001000 DATA_ADDR=0x8000000000001000 TARGET_PAGE_SIZE=4096 diff --git a/ld/emulparams/elf64ppc.sh b/ld/emulparams/elf64ppc.sh index fda7728..300b8d4 100644 --- a/ld/emulparams/elf64ppc.sh +++ b/ld/emulparams/elf64ppc.sh @@ -34,18 +34,14 @@ OTHER_READWRITE_SECTIONS=" # Treat a host that matches the target with the possible exception of "64" # in the name as if it were native. if test `echo "$host" | sed -e s/64//` = `echo "$target" | sed -e s/64//`; then - case " $EMULATION_LIBPATH " in - *" ${EMULATION_NAME} "*) - LIB_PATH=${libdir} - for lib in ${NATIVE_LIB_DIRS}; do - case :${LIB_PATH}: in - *:${lib}:*) ;; - *) LIB_PATH=${LIB_PATH}:${lib} ;; - esac - done - # Look for 64 bit target libraries in /lib64, /usr/lib64 etc., first. - case "$EMULATION_NAME" in - *64*) LIB_PATH=`echo ${LIB_PATH}: | sed -e s,:,64:,g`$LIB_PATH - esac - esac + case " $EMULATION_LIBPATH " in + *" ${EMULATION_NAME} "*) + NATIVE=yes + ;; + esac fi + +# Look for 64 bit target libraries in /lib64, /usr/lib64 etc., first. +case "$EMULATION_NAME" in + *64*) LIBPATH_SUFFIX=64 ;; +esac diff --git a/ld/emulparams/elf_x86_64.sh b/ld/emulparams/elf_x86_64.sh index a428bfc..146b55f 100644 --- a/ld/emulparams/elf_x86_64.sh +++ b/ld/emulparams/elf_x86_64.sh @@ -15,27 +15,16 @@ NO_SMALL_DATA=yes if [ "x${host}" = "x${target}" ]; then case " $EMULATION_LIBPATH " in *" ${EMULATION_NAME} "*) - LIB_PATH=${libdir} - for lib in ${NATIVE_LIB_DIRS}; do - case :${LIB_PATH}: in - *:${lib}:*) ;; - *) LIB_PATH=${LIB_PATH}:${lib} ;; - esac - done - - # Linux modify the default library search path to first include - # a 64-bit specific directory. - case "$target" in - x86_64*-linux*) - suffix=64 ;; - esac - - # Look for 64 bit target libraries in /lib64, /usr/lib64 etc., first. - if [ -n "$suffix" ]; then - case "$EMULATION_NAME" in - *64*) - LIB_PATH=`echo ${LIB_PATH}: | sed -e s,:,$suffix:,g`$LIB_PATH ;; - esac - fi ;; + NATIVE=yes esac fi + +# Linux modify the default library search path to first include +# a 64-bit specific directory. +case "$target" in + x86_64*-linux*) + case "$EMULATION_NAME" in + *64*) LIBPATH_SUFFIX=$suffix ;; + esac + ;; +esac |