aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/bloat-o-meter11
-rw-r--r--scripts/kconfig/Makefile2
-rwxr-xr-xscripts/mkconfigs4
-rwxr-xr-xscripts/randomtest2
-rwxr-xr-xscripts/trylink6
5 files changed, 16 insertions, 9 deletions
diff --git a/scripts/bloat-o-meter b/scripts/bloat-o-meter
index 6db2a5e58..cb861b8e9 100755
--- a/scripts/bloat-o-meter
+++ b/scripts/bloat-o-meter
@@ -7,11 +7,14 @@
7# This software may be used and distributed according to the terms 7# This software may be used and distributed according to the terms
8# of the GNU General Public License, incorporated herein by reference. 8# of the GNU General Public License, incorporated herein by reference.
9 9
10import sys, os#, re 10import sys, os
11 11
12def usage(): 12def usage():
13 sys.stderr.write("usage: %s [-t] file1 file2\n" % sys.argv[0]) 13 sys.stderr.write("usage: %s [-t] file1 file2 [-- <readelf options>]\n"
14 sys.exit(-1) 14 % sys.argv[0])
15 sys.stderr.write("\t-t\tShow time spent on parsing/processing\n")
16 sys.stderr.write("\t--\tPass additional parameters to readelf\n")
17 sys.exit(1)
15 18
16f1, f2 = (None, None) 19f1, f2 = (None, None)
17flag_timing, dashes = (False, False) 20flag_timing, dashes = (False, False)
@@ -31,6 +34,8 @@ for f in sys.argv[1:]:
31 f1 = f 34 f1 = f
32 elif f2 is None: 35 elif f2 is None:
33 f2 = f 36 f2 = f
37 else:
38 usage()
34if flag_timing: 39if flag_timing:
35 import time 40 import time
36if f1 is None or f2 is None: 41if f1 is None or f2 is None:
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
index 1651390a6..38bae809a 100644
--- a/scripts/kconfig/Makefile
+++ b/scripts/kconfig/Makefile
@@ -150,7 +150,7 @@ HOSTCFLAGS_zconf.tab.o := -I$(src)
150HOSTLOADLIBES_qconf = $(KC_QT_LIBS) -ldl 150HOSTLOADLIBES_qconf = $(KC_QT_LIBS) -ldl
151HOSTCXXFLAGS_qconf.o = $(KC_QT_CFLAGS) -D LKC_DIRECT_LINK 151HOSTCXXFLAGS_qconf.o = $(KC_QT_CFLAGS) -D LKC_DIRECT_LINK
152 152
153HOSTLOADLIBES_gconf = `pkg-config --libs gtk+-2.0 gmodule-2.0 libglade-2.0` 153HOSTLOADLIBES_gconf = `pkg-config --libs gtk+-2.0 gmodule-2.0 libglade-2.0` -ldl
154HOSTCFLAGS_gconf.o = `pkg-config --cflags gtk+-2.0 gmodule-2.0 libglade-2.0` \ 154HOSTCFLAGS_gconf.o = `pkg-config --cflags gtk+-2.0 gmodule-2.0 libglade-2.0` \
155 -D LKC_DIRECT_LINK 155 -D LKC_DIRECT_LINK
156 156
diff --git a/scripts/mkconfigs b/scripts/mkconfigs
index db94fcc44..6a26fe1dd 100755
--- a/scripts/mkconfigs
+++ b/scripts/mkconfigs
@@ -65,11 +65,11 @@ static const char bbconfig_config_bz2[] ALIGN1 = {"
65 65
66grep -e '^# CONFIG_' -e '^CONFIG_' "$config" \ 66grep -e '^# CONFIG_' -e '^CONFIG_' "$config" \
67| bzip2 -1 | dd bs=2 skip=1 2>/dev/null \ 67| bzip2 -1 | dd bs=2 skip=1 2>/dev/null \
68| od -v -t x1 \ 68| od -v -b \
69| sed -e 's/^[^ ]*//' \ 69| sed -e 's/^[^ ]*//' \
70 -e 's/ //g' \ 70 -e 's/ //g' \
71 -e '/^$/d' \ 71 -e '/^$/d' \
72 -e 's/\(..\)/0x\1,/g' 72 -e 's/\(...\)/0\1,/g'
73 73
74echo "};" 74echo "};"
75echo "#endif" 75echo "#endif"
diff --git a/scripts/randomtest b/scripts/randomtest
index a102593d3..d2b26bc76 100755
--- a/scripts/randomtest
+++ b/scripts/randomtest
@@ -65,6 +65,7 @@ if test x"$LIBC" = x"uclibc"; then
65 | grep -v CONFIG_BUILD_LIBBUSYBOX \ 65 | grep -v CONFIG_BUILD_LIBBUSYBOX \
66 | grep -v CONFIG_PIE \ 66 | grep -v CONFIG_PIE \
67 \ 67 \
68 | grep -v CONFIG_FEATURE_TOUCH_NODEREF \
68 | grep -v CONFIG_FEATURE_2_4_MODULES \ 69 | grep -v CONFIG_FEATURE_2_4_MODULES \
69 >.config.new 70 >.config.new
70 mv .config.new .config 71 mv .config.new .config
@@ -72,6 +73,7 @@ if test x"$LIBC" = x"uclibc"; then
72 echo '# CONFIG_BUILD_LIBBUSYBOX is not set' >>.config 73 echo '# CONFIG_BUILD_LIBBUSYBOX is not set' >>.config
73 echo '# CONFIG_PIE is not set' >>.config 74 echo '# CONFIG_PIE is not set' >>.config
74 echo '# CONFIG_FEATURE_2_4_MODULES is not set' >>.config 75 echo '# CONFIG_FEATURE_2_4_MODULES is not set' >>.config
76 echo '# CONFIG_FEATURE_TOUCH_NODEREF is not set' >>.config
75fi 77fi
76 78
77# If STATIC, remove some things. 79# If STATIC, remove some things.
diff --git a/scripts/trylink b/scripts/trylink
index a8b0b2e03..e47169917 100755
--- a/scripts/trylink
+++ b/scripts/trylink
@@ -117,7 +117,7 @@ LDLIBS=`echo "$LDLIBS" | xargs -n1 | sort | uniq | xargs`
117# First link with all libs. If it fails, bail out 117# First link with all libs. If it fails, bail out
118echo "Trying libraries: $LDLIBS" 118echo "Trying libraries: $LDLIBS"
119# "lib1 lib2 lib3" -> "-llib1 -llib2 -llib3" 119# "lib1 lib2 lib3" -> "-llib1 -llib2 -llib3"
120l_list=`echo "$LDLIBS" | sed -e 's/ / -l/g' -e 's/^/-l/' -e 's/^-l$//'` 120l_list=`echo " $LDLIBS " | sed -e 's: \([^- ][^ ]*\): -l\1:g'`
121test "x$l_list" != "x" && l_list="$START_GROUP $l_list $END_GROUP" 121test "x$l_list" != "x" && l_list="$START_GROUP $l_list $END_GROUP"
122try $CC $CFLAGS $LDFLAGS \ 122try $CC $CFLAGS $LDFLAGS \
123 -o $EXE \ 123 -o $EXE \
@@ -141,7 +141,7 @@ while test "$LDLIBS"; do
141 for one in $LDLIBS; do 141 for one in $LDLIBS; do
142 without_one=`echo " $LDLIBS " | sed "s/ $one / /g" | xargs` 142 without_one=`echo " $LDLIBS " | sed "s/ $one / /g" | xargs`
143 # "lib1 lib2 lib3" -> "-llib1 -llib2 -llib3" 143 # "lib1 lib2 lib3" -> "-llib1 -llib2 -llib3"
144 l_list=`echo "$without_one" | sed -e 's/ / -l/g' -e 's/^/-l/' -e 's/^-l$//'` 144 l_list=`echo " $without_one " | sed -e 's: \([^- ][^ ]*\): -l\1:g'`
145 test x"$l_list" != x"" && l_list="$START_GROUP $l_list $END_GROUP" 145 test x"$l_list" != x"" && l_list="$START_GROUP $l_list $END_GROUP"
146 $debug && echo "Trying -l options: '$l_list'" 146 $debug && echo "Trying -l options: '$l_list'"
147 try $CC $CFLAGS $LDFLAGS \ 147 try $CC $CFLAGS $LDFLAGS \
@@ -172,7 +172,7 @@ done
172 172
173# Make the binary with final, minimal list of libs 173# Make the binary with final, minimal list of libs
174echo "Final link with: ${LDLIBS:-<none>}" 174echo "Final link with: ${LDLIBS:-<none>}"
175l_list=`echo "$LDLIBS" | sed -e 's/ / -l/g' -e 's/^/-l/' -e 's/^-l$//'` 175l_list=`echo " $LDLIBS " | sed -e 's: \([^- ][^ ]*\): -l\1:g'`
176test "x$l_list" != "x" && l_list="$START_GROUP $l_list $END_GROUP" 176test "x$l_list" != "x" && l_list="$START_GROUP $l_list $END_GROUP"
177# --verbose gives us gobs of info to stdout (e.g. linker script used) 177# --verbose gives us gobs of info to stdout (e.g. linker script used)
178if ! test -f busybox_ldscript; then 178if ! test -f busybox_ldscript; then