beginning of LD_LIBRARY_PATH as opposed to simply replacing it.
This allows users to use LD_LIBRARY_PATH when running tests (useful for
when they have installed their own version of GCC).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6800
91177308-0d34-0410-b5e6-
96231b3b80d8
rm -f test.bc.temp[12]
-LD_LIBRARY_PATH=$3
+#
+# Split the current LD_LIBRARY_PATH into two separate components.
+#
+FirstLDP=`echo $LD_LIBRARY_PATH | cut -d\; -f1`
+SecondLDP=`echo $LD_LIBRARY_PATH | cut -d\; -f2`
+
+#
+# Now create a new LD_LIBRARY_PATH with our command line options as
+# the first section.
+#
+LD_LIBRARY_PATH="$3:${FirstLDP}\;${SecondLDP}"
export LD_LIBRARY_PATH
AS=$2/as
#!/bin/sh
-LD_LIBRARY_PATH=$3
+
+#
+# Split the current LD_LIBRARY_PATH into two separate components.
+#
+FirstLDP=`echo $LD_LIBRARY_PATH | cut -d\; -f1`
+SecondLDP=`echo $LD_LIBRARY_PATH | cut -d\; -f2`
+
+#
+# Now create a new LD_LIBRARY_PATH with our command line options as
+# the first section.
+#
+LD_LIBRARY_PATH="$3:${FirstLDP}\;${SecondLDP}"
export LD_LIBRARY_PATH
AS=$2/as