aboutsummaryrefslogtreecommitdiff
path: root/ld/emulparams
diff options
context:
space:
mode:
authorAlexey Neyman <stilor@att.net>2017-03-12 20:49:46 -0700
committerAlan Modra <amodra@gmail.com>2017-03-13 17:51:38 +1030
commit4b5900d8b81522bd6ebe4d94d45dfb54d1982c62 (patch)
treeda7ff40f6c7ca1c2ecc0f4436d63a4ee68c2b032 /ld/emulparams
parentb9d62f893fcc0b4c36aad0552810dcde304979d0 (diff)
downloadgdb-4b5900d8b81522bd6ebe4d94d45dfb54d1982c62.zip
gdb-4b5900d8b81522bd6ebe4d94d45dfb54d1982c62.tar.gz
gdb-4b5900d8b81522bd6ebe4d94d45dfb54d1982c62.tar.bz2
PowerPC: incorrect library search order
First, need to match against just the CPU name, not the whole triplet. Otherwise, the test picks up "*le-*" pattern from x86_64-apple-darwin triplet. Second, it should be testing for $target, not $host. Host may be little endian by default, and the sysroot directory layout shouldn't depend on whether it is built on LE or BE machine. * emulparams/elf32ppccommon.sh (LIBPATH_SUFFIX): Set from target cpu, not host.
Diffstat (limited to 'ld/emulparams')
-rw-r--r--ld/emulparams/elf32ppccommon.sh10
1 files changed, 5 insertions, 5 deletions
diff --git a/ld/emulparams/elf32ppccommon.sh b/ld/emulparams/elf32ppccommon.sh
index 1f54ef8..d00cf68 100644
--- a/ld/emulparams/elf32ppccommon.sh
+++ b/ld/emulparams/elf32ppccommon.sh
@@ -44,11 +44,11 @@ fi
# Look for 64 bit target libraries in /lib64, /usr/lib64 etc., first.
# Similarly, look for 32 bit libraries in /lib32, /usr/lib32 etc.
-case "$host":"$EMULATION_NAME" in
- *le-*:*64lppc*) LIBPATH_SUFFIX=64 ;;
- *le-*:*32lppc*) LIBPATH_SUFFIX=32 ;;
- *le-*:*64*) LIBPATH_SUFFIX=64be ;;
- *le-*:*32*) LIBPATH_SUFFIX=32be ;;
+case `echo "$target" | sed -e 's/-.*//'`:"$EMULATION_NAME" in
+ *le:*64lppc*) LIBPATH_SUFFIX=64 ;;
+ *le:*32lppc*) LIBPATH_SUFFIX=32 ;;
+ *le:*64*) LIBPATH_SUFFIX=64be ;;
+ *le:*32*) LIBPATH_SUFFIX=32be ;;
*:*64lppc*) LIBPATH_SUFFIX=64le ;;
*:*32lppc*) LIBPATH_SUFFIX=32le ;;
*:*64*) LIBPATH_SUFFIX=64 ;;