diff options
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/defconfig | 1 | ||||
-rwxr-xr-x | scripts/trylink | 15 |
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 | |||
376 | CONFIG_PASSWD=y | 376 | CONFIG_PASSWD=y |
377 | CONFIG_FEATURE_PASSWD_WEAK_CHECK=y | 377 | CONFIG_FEATURE_PASSWD_WEAK_CHECK=y |
378 | CONFIG_CRYPTPW=y | 378 | CONFIG_CRYPTPW=y |
379 | CONFIG_CHPASSWD=y | ||
379 | CONFIG_SU=y | 380 | CONFIG_SU=y |
380 | CONFIG_FEATURE_SU_SYSLOG=y | 381 | CONFIG_FEATURE_SU_SYSLOG=y |
381 | CONFIG_FEATURE_SU_CHECKS_SHELLS=y | 382 | CONFIG_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 | } |
25 | mv 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. |
29 | ever_discarded=false | ||
28 | while test "$BBOX_LIB_LIST"; do | 30 | while 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 |
49 | done | 52 | done |
50 | 53 | ||
51 | # Ok, make the binary | 54 | mv busybox_unstripped.tmp busybox_unstripped |
52 | echo "Final link with: $BBOX_LIB_LIST" | 55 | $ever_discarded && { |
53 | l_list=`echo "$BBOX_LIB_LIST" | sed -e 's/ / -l/g' -e 's/^/-l/'` | 56 | # Ok, make the binary |
54 | try "-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 | } | ||
61 | exit 0 # Ensure "success" exit code | ||