aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/defconfig1
-rwxr-xr-xscripts/trylink15
2 files changed, 12 insertions, 4 deletions
diff --git a/scripts/defconfig b/scripts/defconfig
index 088ff791a..4709b2234 100644
--- a/scripts/defconfig
+++ b/scripts/defconfig
@@ -376,6 +376,7 @@ CONFIG_FEATURE_SECURETTY=y
376CONFIG_PASSWD=y 376CONFIG_PASSWD=y
377CONFIG_FEATURE_PASSWD_WEAK_CHECK=y 377CONFIG_FEATURE_PASSWD_WEAK_CHECK=y
378CONFIG_CRYPTPW=y 378CONFIG_CRYPTPW=y
379CONFIG_CHPASSWD=y
379CONFIG_SU=y 380CONFIG_SU=y
380CONFIG_FEATURE_SU_SYSLOG=y 381CONFIG_FEATURE_SU_SYSLOG=y
381CONFIG_FEATURE_SU_CHECKS_SHELLS=y 382CONFIG_FEATURE_SU_CHECKS_SHELLS=y
diff --git a/scripts/trylink b/scripts/trylink
index ddd7fb179..cbd702338 100755
--- a/scripts/trylink
+++ b/scripts/trylink
@@ -22,9 +22,11 @@ try "-Wl,--start-group $l_list -Wl,--end-group" "$@" \
22 cat busybox_ld.err 22 cat busybox_ld.err
23 exit 1 23 exit 1
24} 24}
25mv busybox_unstripped busybox_unstripped.tmp
25 26
26# Now try to remove each lib and build without. 27# Now try to remove each lib and build without.
27# Stop when no lib can be removed. 28# Stop when no lib can be removed.
29ever_discarded=false
28while test "$BBOX_LIB_LIST"; do 30while test "$BBOX_LIB_LIST"; do
29 $debug && echo "Trying libraries: $BBOX_LIB_LIST" 31 $debug && echo "Trying libraries: $BBOX_LIB_LIST"
30 all_needed=true 32 all_needed=true
@@ -36,6 +38,7 @@ while test "$BBOX_LIB_LIST"; do
36 echo "Library $one is not needed" 38 echo "Library $one is not needed"
37 BBOX_LIB_LIST="$without_one" 39 BBOX_LIB_LIST="$without_one"
38 all_needed=false 40 all_needed=false
41 ever_discarded=true
39 else 42 else
40 echo "Library $one is needed" 43 echo "Library $one is needed"
41 fi 44 fi
@@ -48,7 +51,11 @@ while test "$BBOX_LIB_LIST"; do
48 #echo "$BBOX_LIB_LIST" | grep -q ' ' || break 51 #echo "$BBOX_LIB_LIST" | grep -q ' ' || break
49done 52done
50 53
51# Ok, make the binary 54mv busybox_unstripped.tmp busybox_unstripped
52echo "Final link with: $BBOX_LIB_LIST" 55$ever_discarded && {
53l_list=`echo "$BBOX_LIB_LIST" | sed -e 's/ / -l/g' -e 's/^/-l/'` 56 # Ok, make the binary
54try "-Wl,--start-group $l_list -Wl,--end-group" "$@" 57 echo "Final link with: $BBOX_LIB_LIST"
58 l_list=`echo "$BBOX_LIB_LIST" | sed -e 's/ / -l/g' -e 's/^/-l/'`
59 try "-Wl,--start-group $l_list -Wl,--end-group" "$@"
60}
61exit 0 # Ensure "success" exit code