+2014-01-16 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/16456
+ * genscripts.sh: Don't search directory with LIBPATH_SUFFIX_SKIP
+ suffix.
+ * emulparams/elf32_x86_64.sh (LIBPATH_SUFFIX_SKIP): Set to 64
+ for elf32_x86_64 emulation.
+ * emulparams/elf_i386.sh (LIBPATH_SUFFIX_SKIP): Set to 64
+ for elf_i386 emulation.
+
2014-01-16 Alan Modra <amodra@gmail.com>
* ld.h (fat_section_userdata_type, get_userdata): Move to..
case "$target" in
x86_64*-linux*|i[3-7]86-*-linux-*)
case "$EMULATION_NAME" in
- *32*) LIBPATH_SUFFIX=x32 ;;
- *64*) LIBPATH_SUFFIX=64 ;;
+ *32*)
+ LIBPATH_SUFFIX=x32
+ LIBPATH_SUFFIX_SKIP=64
+ ;;
+ *64*)
+ LIBPATH_SUFFIX=64
+ ;;
esac
;;
esac
if [ "x${use_sysroot}" = "xyes" ] ; then
lib="=${lib}"
fi
+ skip_lib=no
if test -n "${LIBPATH_SUFFIX}"; then
case "${lib}" in
*${LIBPATH_SUFFIX})
*) lib_path1=${lib_path1}:${lib} ;;
esac ;;
*)
- case :${lib_path1}: in
- *:${lib}${LIBPATH_SUFFIX}:*) ;;
- ::) lib_path1=${lib}${LIBPATH_SUFFIX} ;;
- *) lib_path1=${lib_path1}:${lib}${LIBPATH_SUFFIX} ;;
- esac ;;
+ if test -n "${LIBPATH_SUFFIX_SKIP}"; then
+ case "${lib}" in
+ *${LIBPATH_SUFFIX_SKIP}) skip_lib=yes ;;
+ esac
+ fi
+ if test "${skip_lib}" = "no"; then
+ case :${lib_path1}: in
+ *:${lib}${LIBPATH_SUFFIX}:*) ;;
+ ::) lib_path1=${lib}${LIBPATH_SUFFIX} ;;
+ *) lib_path1=${lib_path1}:${lib}${LIBPATH_SUFFIX} ;;
+ esac
+ fi ;;
+ esac
+ fi
+ if test "${skip_lib}" = "no"; then
+ case :${lib_path1}:${lib_path2}: in
+ *:${lib}:*) ;;
+ *::) lib_path2=${lib} ;;
+ *) lib_path2=${lib_path2}:${lib} ;;
esac
fi
- case :${lib_path1}:${lib_path2}: in
- *:${lib}:*) ;;
- *::) lib_path2=${lib} ;;
- *) lib_path2=${lib_path2}:${lib} ;;
- esac
done
fi
}