summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Vlasenko2007-10-09 13:08:02 +0000
committerDenis Vlasenko2007-10-09 13:08:02 +0000
commitd19b87ece4add3dd24bea9d9d0b32946c219ef2c (patch)
tree448eb5f1a4616f85aab8ded5f4c25328a979ca33
parent8d755adc1a1ecab53b3a840f0cf618108809c5cf (diff)
downloadbusybox-d19b87ece4add3dd24bea9d9d0b32946c219ef2c.zip
busybox-d19b87ece4add3dd24bea9d9d0b32946c219ef2c.tar.gz
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 4ee5d82..0829121 100755
--- a/scripts/trylink
+++ b/scripts/trylink
@@ -53,8 +53,7 @@ while test "$LDLIBS"; do
-o $EXE -Wl,-Map -Wl,$EXE.map \
-Wl,--warn-common -Wl,--sort-common -Wl,--gc-sections \
-Wl,--start-group $O_FILES $A_FILES -Wl,--end-group \
- $l_list \
- >/dev/null
+ $l_list
if test $? = 0; then
echo "Library $one is not needed"
LDLIBS="$without_one"
@@ -82,7 +81,10 @@ if ! test -f busybox_ldscript; then
-Wl,--warn-common -Wl,--sort-common -Wl,--gc-sections \
-Wl,--start-group $O_FILES $A_FILES -Wl,--end-group \
$l_list -Wl,--verbose \
- >/dev/null
+ || {
+ cat $EXE.out
+ exit 1
+ }
else
echo "Custom linker script 'busybox_ldscript' found, using it"
# Add SORT_BY_ALIGNMENT to linker script (found in $EXE.out):
@@ -96,7 +98,10 @@ else
-Wl,--start-group $O_FILES $A_FILES -Wl,--end-group \
$l_list -Wl,--verbose \
-Wl,-T -Wl,busybox_ldscript \
- >/dev/null
+ || {
+ cat $EXE.out
+ exit 1
+ }
fi
. .config