aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-10-09 13:08:02 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-10-09 13:08:02 +0000
commitd19b87ece4add3dd24bea9d9d0b32946c219ef2c (patch)
tree448eb5f1a4616f85aab8ded5f4c25328a979ca33
parent8d755adc1a1ecab53b3a840f0cf618108809c5cf (diff)
downloadbusybox-w32-d19b87ece4add3dd24bea9d9d0b32946c219ef2c.tar.gz
busybox-w32-d19b87ece4add3dd24bea9d9d0b32946c219ef2c.tar.bz2
busybox-w32-d19b87ece4add3dd24bea9d9d0b32946c219ef2c.zip
trylink: remove useless redirects, add missing error checks
-rwxr-xr-xscripts/trylink13
1 files changed, 9 insertions, 4 deletions
diff --git a/scripts/trylink b/scripts/trylink
index 4ee5d8255..0829121ab 100755
--- a/scripts/trylink
+++ b/scripts/trylink
@@ -53,8 +53,7 @@ while test "$LDLIBS"; do
53 -o $EXE -Wl,-Map -Wl,$EXE.map \ 53 -o $EXE -Wl,-Map -Wl,$EXE.map \
54 -Wl,--warn-common -Wl,--sort-common -Wl,--gc-sections \ 54 -Wl,--warn-common -Wl,--sort-common -Wl,--gc-sections \
55 -Wl,--start-group $O_FILES $A_FILES -Wl,--end-group \ 55 -Wl,--start-group $O_FILES $A_FILES -Wl,--end-group \
56 $l_list \ 56 $l_list
57 >/dev/null
58 if test $? = 0; then 57 if test $? = 0; then
59 echo "Library $one is not needed" 58 echo "Library $one is not needed"
60 LDLIBS="$without_one" 59 LDLIBS="$without_one"
@@ -82,7 +81,10 @@ if ! test -f busybox_ldscript; then
82 -Wl,--warn-common -Wl,--sort-common -Wl,--gc-sections \ 81 -Wl,--warn-common -Wl,--sort-common -Wl,--gc-sections \
83 -Wl,--start-group $O_FILES $A_FILES -Wl,--end-group \ 82 -Wl,--start-group $O_FILES $A_FILES -Wl,--end-group \
84 $l_list -Wl,--verbose \ 83 $l_list -Wl,--verbose \
85 >/dev/null 84 || {
85 cat $EXE.out
86 exit 1
87 }
86else 88else
87 echo "Custom linker script 'busybox_ldscript' found, using it" 89 echo "Custom linker script 'busybox_ldscript' found, using it"
88 # Add SORT_BY_ALIGNMENT to linker script (found in $EXE.out): 90 # Add SORT_BY_ALIGNMENT to linker script (found in $EXE.out):
@@ -96,7 +98,10 @@ else
96 -Wl,--start-group $O_FILES $A_FILES -Wl,--end-group \ 98 -Wl,--start-group $O_FILES $A_FILES -Wl,--end-group \
97 $l_list -Wl,--verbose \ 99 $l_list -Wl,--verbose \
98 -Wl,-T -Wl,busybox_ldscript \ 100 -Wl,-T -Wl,busybox_ldscript \
99 >/dev/null 101 || {
102 cat $EXE.out
103 exit 1
104 }
100fi 105fi
101 106
102. .config 107. .config