public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* PATCH: Add LIBPATH_SUFFIX for ${tool_lib}.
@ 2003-08-13 22:52 H. J. Lu
  2003-08-14  0:00 ` PATCH: Add LIBPATH_SUFFIX for ${tool_lib} (take 2) H. J. Lu
  2003-08-14  0:07 ` PATCH: Add LIBPATH_SUFFIX for ${tool_lib} Alan Modra
  0 siblings, 2 replies; 7+ messages in thread
From: H. J. Lu @ 2003-08-13 22:52 UTC (permalink / raw)
  To: binutils

[-- Attachment #1: Type: text/plain, Size: 240 bytes --]

We didn't add LIBPATH_SUFFIX for ${tool_lib}. As the result, we got

SEARCH_DIR("/export/tools/ppc64-linux/lib");

This patch changed it to

SEARCH_DIR("/export/tools/ppc64-linux/lib64"); SEARCH_DIR("/export/tools/ppc64-linux/lib");


H.J.

[-- Attachment #2: ld-ml.patch --]
[-- Type: text/plain, Size: 1309 bytes --]

2003-08-13  H.J. Lu  <hongjiu.lu@intel.com>

	* genscripts.sh (LIB_PATH): Add LIBPATH_SUFFIX for ${tool_lib}.

--- ld/genscripts.sh.ml	2003-08-13 07:29:53.000000000 -0700
+++ ld/genscripts.sh	2003-08-13 15:50:20.000000000 -0700
@@ -123,6 +123,41 @@ if [ "x${use_sysroot}" != "xyes" ] ; the
   ::) LIB_PATH=${tool_lib} ;;
   *) LIB_PATH=${tool_lib}:${LIB_PATH} ;;
   esac
+  LIB_SEARCH_DIRS=`echo ${LIB_PATH} | sed -e 's/:/ /g'`
+  LIB_PATH=
+  LIB_PATH2=
+  for lib in ${LIB_SEARCH_DIRS}; do
+    addsuffix=
+    case "${LIBPATH_SUFFIX}:${lib}" in
+      :*) ;;
+      *:*${LIBPATH_SUFFIX}) ;;
+      *) addsuffix=yes ;;
+    esac
+    if test -n "$addsuffix"; then
+      case :${LIB_PATH}: in
+	*:${lib}${LIBPATH_SUFFIX}:*)
+	  ;;
+	::)
+	  LIB_PATH=${lib}${LIBPATH_SUFFIX}
+	  LIB_PATH2=${lib}
+	  ;;
+	*)
+	  LIB_PATH=${LIB_PATH}:${lib}${LIBPATH_SUFFIX}
+	  LIB_PATH2=${LIB_PATH2}:${lib}
+	  ;;
+      esac
+    else
+      case :${LIB_PATH2}: in
+	*:${lib}:*) ;;
+	::) LIB_PATH2=${lib} ;;
+	*) LIB_PATH2=${LIB_PATH2}:${lib} ;;
+      esac
+    fi
+  done
+  case :${LIB_PATH}:${LIB_PATH2}: in
+    *:: | ::*) LIB_PATH=${LIB_PATH}${LIB_PATH2} ;;
+    *) LIB_PATH=${LIB_PATH}:${LIB_PATH2} ;;
+  esac
 fi
 
 LIB_SEARCH_DIRS=`echo ${LIB_PATH} | sed -e 's/:/ /g' -e 's/\([^ ][^ ]*\)/SEARCH_DIR(\\"\1\\");/g'`

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2003-08-14  1:34 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-13 22:52 PATCH: Add LIBPATH_SUFFIX for ${tool_lib} H. J. Lu
2003-08-14  0:00 ` PATCH: Add LIBPATH_SUFFIX for ${tool_lib} (take 2) H. J. Lu
2003-08-14  0:07 ` PATCH: Add LIBPATH_SUFFIX for ${tool_lib} Alan Modra
2003-08-14  0:20   ` H. J. Lu
2003-08-14  0:54     ` Alan Modra
2003-08-14  1:02       ` H. J. Lu
2003-08-14  1:34         ` Alan Modra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).