trylink: remove useless redirects, add missing error checks

This commit is contained in:
Denis Vlasenko 2007-10-09 13:08:02 +00:00
parent 8d755adc1a
commit d19b87ece4

View File

@ -53,8 +53,7 @@ while test "$LDLIBS"; do
-o $EXE -Wl,-Map -Wl,$EXE.map \ -o $EXE -Wl,-Map -Wl,$EXE.map \
-Wl,--warn-common -Wl,--sort-common -Wl,--gc-sections \ -Wl,--warn-common -Wl,--sort-common -Wl,--gc-sections \
-Wl,--start-group $O_FILES $A_FILES -Wl,--end-group \ -Wl,--start-group $O_FILES $A_FILES -Wl,--end-group \
$l_list \ $l_list
>/dev/null
if test $? = 0; then if test $? = 0; then
echo "Library $one is not needed" echo "Library $one is not needed"
LDLIBS="$without_one" LDLIBS="$without_one"
@ -82,7 +81,10 @@ if ! test -f busybox_ldscript; then
-Wl,--warn-common -Wl,--sort-common -Wl,--gc-sections \ -Wl,--warn-common -Wl,--sort-common -Wl,--gc-sections \
-Wl,--start-group $O_FILES $A_FILES -Wl,--end-group \ -Wl,--start-group $O_FILES $A_FILES -Wl,--end-group \
$l_list -Wl,--verbose \ $l_list -Wl,--verbose \
>/dev/null || {
cat $EXE.out
exit 1
}
else else
echo "Custom linker script 'busybox_ldscript' found, using it" echo "Custom linker script 'busybox_ldscript' found, using it"
# Add SORT_BY_ALIGNMENT to linker script (found in $EXE.out): # 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 \ -Wl,--start-group $O_FILES $A_FILES -Wl,--end-group \
$l_list -Wl,--verbose \ $l_list -Wl,--verbose \
-Wl,-T -Wl,busybox_ldscript \ -Wl,-T -Wl,busybox_ldscript \
>/dev/null || {
cat $EXE.out
exit 1
}
fi fi
. .config . .config