1 # DP: Add multiarch directories to linker search path.
3 Index: binutils-2.21.0.20110322/ld/genscripts.sh
4 ===================================================================
5 --- binutils-2.21.0.20110322.orig/ld/genscripts.sh 2011-03-27 18:45:12.283057003 +0000
6 +++ binutils-2.21.0.20110322/ld/genscripts.sh 2011-03-27 18:51:20.623057182 +0000
10 LIB_SEARCH_DIRS=`echo ${LIB_PATH} | sed -e 's/:/ /g' -e 's/\([^ ][^ ]*\)/SEARCH_DIR(\\"\1\\");/g'`
11 +if [ -n "$DEB_HOST_MULTIARCH" ]; then
13 + for dir in `echo ${LIB_PATH} | sed -e 's/:/ /g'`; do
15 + ${tool_lib}*|*/${target_alias}/*)
18 + if [ -n "$DEB_HOST_MULTIARCH32" ]; then
19 + case $EMULATION_NAME in
21 + temp_dirs="${temp_dirs}${dir}/$DEB_HOST_MULTIARCH32 ";;
23 + temp_dirs="${temp_dirs}${dir}/$DEB_HOST_MULTIARCH "
25 + elif [ -n "$DEB_HOST_MULTIARCH64" ]; then
26 + case $EMULATION_NAME in
28 + temp_dirs="${temp_dirs}${dir}/$DEB_HOST_MULTIARCH64 ";;
30 + temp_dirs="${temp_dirs}${dir}/$DEB_HOST_MULTIARCH "
33 + temp_dirs="${temp_dirs}${dir}/$DEB_HOST_MULTIARCH "
37 + if [ -n "$DEB_HOST_MULTIARCH32" ]; then
38 + dir2=$(echo $dir | sed "s,32$,,")
39 + temp_dirs="${temp_dirs}${dir2}/$DEB_HOST_MULTIARCH32 "
44 + powerpc64-*-*|s390x-*-*|sparc64-*-*|x86_64-*-linux*)
45 + #dir=$(echo $dir | sed "s,64$,,")
46 + dir2=$(echo $dir | sed "s,64$,,")
47 + temp_dirs="${temp_dirs}${dir2}/$DEB_HOST_MULTIARCH "
50 + if [ -n "$DEB_HOST_MULTIARCH64" ]; then
51 + dir2=$(echo $dir | sed "s,64$,,")
52 + temp_dirs="${temp_dirs}${dir2}/$DEB_HOST_MULTIARCH64 "
60 + temp_dirs="${temp_dirs}${dir} "
63 + for dir in $temp_dirs; do
64 + if echo "$LIB_SEARCH_DIRS" | fgrep -q "\"$dir\""; then
67 + LIB_SEARCH_DIRS="${LIB_SEARCH_DIRS}SEARCH_DIR(\"$dir\"); "
71 # We need it for testsuite.
72 set $EMULATION_LIBPATH