diff options
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/trylink | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/trylink b/scripts/trylink index a8b0b2e03..e47169917 100755 --- a/scripts/trylink +++ b/scripts/trylink | |||
| @@ -117,7 +117,7 @@ LDLIBS=`echo "$LDLIBS" | xargs -n1 | sort | uniq | xargs` | |||
| 117 | # First link with all libs. If it fails, bail out | 117 | # First link with all libs. If it fails, bail out |
| 118 | echo "Trying libraries: $LDLIBS" | 118 | echo "Trying libraries: $LDLIBS" |
| 119 | # "lib1 lib2 lib3" -> "-llib1 -llib2 -llib3" | 119 | # "lib1 lib2 lib3" -> "-llib1 -llib2 -llib3" |
| 120 | l_list=`echo "$LDLIBS" | sed -e 's/ / -l/g' -e 's/^/-l/' -e 's/^-l$//'` | 120 | l_list=`echo " $LDLIBS " | sed -e 's: \([^- ][^ ]*\): -l\1:g'` |
| 121 | test "x$l_list" != "x" && l_list="$START_GROUP $l_list $END_GROUP" | 121 | test "x$l_list" != "x" && l_list="$START_GROUP $l_list $END_GROUP" |
| 122 | try $CC $CFLAGS $LDFLAGS \ | 122 | try $CC $CFLAGS $LDFLAGS \ |
| 123 | -o $EXE \ | 123 | -o $EXE \ |
| @@ -141,7 +141,7 @@ while test "$LDLIBS"; do | |||
| 141 | for one in $LDLIBS; do | 141 | for one in $LDLIBS; do |
| 142 | without_one=`echo " $LDLIBS " | sed "s/ $one / /g" | xargs` | 142 | without_one=`echo " $LDLIBS " | sed "s/ $one / /g" | xargs` |
| 143 | # "lib1 lib2 lib3" -> "-llib1 -llib2 -llib3" | 143 | # "lib1 lib2 lib3" -> "-llib1 -llib2 -llib3" |
| 144 | l_list=`echo "$without_one" | sed -e 's/ / -l/g' -e 's/^/-l/' -e 's/^-l$//'` | 144 | l_list=`echo " $without_one " | sed -e 's: \([^- ][^ ]*\): -l\1:g'` |
| 145 | test x"$l_list" != x"" && l_list="$START_GROUP $l_list $END_GROUP" | 145 | test x"$l_list" != x"" && l_list="$START_GROUP $l_list $END_GROUP" |
| 146 | $debug && echo "Trying -l options: '$l_list'" | 146 | $debug && echo "Trying -l options: '$l_list'" |
| 147 | try $CC $CFLAGS $LDFLAGS \ | 147 | try $CC $CFLAGS $LDFLAGS \ |
| @@ -172,7 +172,7 @@ done | |||
| 172 | 172 | ||
| 173 | # Make the binary with final, minimal list of libs | 173 | # Make the binary with final, minimal list of libs |
| 174 | echo "Final link with: ${LDLIBS:-<none>}" | 174 | echo "Final link with: ${LDLIBS:-<none>}" |
| 175 | l_list=`echo "$LDLIBS" | sed -e 's/ / -l/g' -e 's/^/-l/' -e 's/^-l$//'` | 175 | l_list=`echo " $LDLIBS " | sed -e 's: \([^- ][^ ]*\): -l\1:g'` |
| 176 | test "x$l_list" != "x" && l_list="$START_GROUP $l_list $END_GROUP" | 176 | test "x$l_list" != "x" && l_list="$START_GROUP $l_list $END_GROUP" |
| 177 | # --verbose gives us gobs of info to stdout (e.g. linker script used) | 177 | # --verbose gives us gobs of info to stdout (e.g. linker script used) |
| 178 | if ! test -f busybox_ldscript; then | 178 | if ! test -f busybox_ldscript; then |
