summaryrefslogtreecommitdiff
path: root/scripts
AgeCommit message (Collapse)Author
2017-07-03fixes for bugs found by make_single_applets.shDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-07-03scripts/randomtest: update things which can't be tested on uclibcDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-01-24remove "local" bashism from a few scriptsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-12-12randomconfig fixesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-07-12trylink: use "mktemp tmp.XXXXXXXXXX" to placate OS XDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-06-29build system: make CONFIG_FEATURE_USE_BSS_TAIL less funkyDenys Vlasenko
CONFIG_FEATURE_USE_BSS_TAIL code was aliasing bb_common_bufsiz1 to _end. This is unreliable: _end may be not sufficiently aligned. Change code to simply enlarge COMMON_BUFSIZE when we detect that _end has significant amount of space to the end of page. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-06-20scripts/trylink: libbusybox fixDenys Vlasenko
gcc 6.1.1 can emit empty line with spaces Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-06-19randomconfig fixes 2Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-06-19randomconfig fixesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-04-24generate_BUFSIZ.sh: yet another tweakDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-04-22scripts/trylink: document DATA_SEGMENT_ALIGN() hackDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-04-22generate_BUFSIZ.sh: catch BUFSIZE < 1024 also on "big" buildsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-04-21build system: fix generate_BUFSIZ.sh to not alternate 1k and malloc buildsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-04-21libbb: constify *bb_common_bufsiz1 (if it is compiled to be a pointer)Denys Vlasenko
This lets gcc optimize much better: text data bss dec hex filename 922846 910 13056 936812 e4b6c busybox_unstripped.nonconst 920255 910 13056 934221 e414d busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-04-21libbb: make "COMMON_BUFSIZE = 1024 bytes, the buffer will be malloced" workDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-04-21*: add most of the required setup_common_bufsiz() callsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-04-21libbb: make bb_common_bufsiz1 1 kbyte, add capability to use bss tail for itDenys Vlasenko
The config item is FEATURE_USE_BSS_TAIL. When it is off (default): function old new delta read_config 210 228 +18 doCommands 2279 2294 +15 ipneigh_list_or_flush 763 772 +9 ipaddr_list_or_flush 1256 1261 +5 display_process_list 1301 1306 +5 conspy_main 1378 1383 +5 do_lzo_compress 352 355 +3 do_lzo_decompress 565 567 +2 push 46 44 -2 inetd_main 2136 2134 -2 uevent_main 421 418 -3 addLines 97 92 -5 bb_common_bufsiz1 8193 1024 -7169 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 8/5 up/down: 62/-7181) Total: -7119 bytes text data bss dec hex filename 829850 4086 9080 843016 cdd08 busybox_old 829901 4086 1904 835891 cc133 busybox_unstripped FEATURE_USE_BSS_TAIL=y: read_config 210 228 +18 doCommands 2279 2294 +15 ipneigh_list_or_flush 763 772 +9 ipaddr_list_or_flush 1256 1261 +5 display_process_list 1301 1306 +5 conspy_main 1378 1383 +5 do_lzo_compress 352 355 +3 do_lzo_decompress 565 567 +2 inetd_main 2136 2134 -2 bb_common_bufsiz1 8193 - -8193 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 8/1 up/down: 62/-8195) Total: -8133 bytes text data bss dec hex filename 829850 4086 9080 843016 cdd08 busybox_old 829911 4086 880 834877 cbd3d busybox_unstripped FIXME: setup_common_bufsiz() calls are missing. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-04-03kconfig/lxdialog: get ncurses CFLAGS with pkg-configBjørn Forsman
This makes "make menuconfig" also work on systems where ncurses is not installed in a standard location (such as on NixOS). This patch changes ccflags() so that it tries pkg-config first, and only if pkg-config fails does it go back to the fallback/manual checks. This is the same algorithm that ldflags() already uses. Signed-off-by: Bjørn Forsman <bjorn.forsman@gmail.com> Signed-off-by: Michal Marek <mmarek@suse.cz> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2016-04-03kbuild: Make scripts executableMichal Marek
The Makefiles call the respective interpreter explicitly, but this makes it easier to use the scripts manually. Signed-off-by: Michal Marek <mmarek@suse.cz> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2016-04-03kconfig/lxdialog: rationalise the include paths where to find {.n}curses{,w}.hYann E. MORIN
The current code does this: if [ -f /usr/include/ncursesw/curses.h ]; then echo '-I/usr/include/ncursesw -DCURSES_LOC="<ncursesw/curses.h>"' elif [ -f /usr/include/ncurses/ncurses.h ]; then echo '-I/usr/include/ncurses -DCURSES_LOC="<ncurses.h>"' elif [ -f /usr/include/ncurses/curses.h ]; then echo '-I/usr/include/ncurses -DCURSES_LOC="<ncurses/curses.h>"' [...] This is merely inconsistent: - adding the full path to the directory in the -I directive, - especially since that path is already a sub-path of the system include path, - and then repeating the sub-path in the #include directive. Rationalise each include directive: - only use the filename in the #include directive, - keep the -I directives: they are always searched for before the system include path; this ensures the correct header is used. Using the -I directives and the filename-only in #include is more in line with how pkg-config behaves, eg.: $ pkg-config --cflags ncursesw -I/usr/include/ncursesw This paves the way for using pkg-config for CFLAGS, too, now we use it to find the libraries. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2016-04-03menuconfig: optionally use pkg-config to detect ncurses libsJustin Lecher
When building ncurses with --with-termlib several symbols get moved from libncurses.so to libtinfo.so. Thus when linking with libncurses.so, one additionally needs to link with libtinfo.so. The ncurses pkg-config module will be used to detect the necessary libs for linking. If not available the old heuristic for detection of the ncurses libs will be used. Signed-off-by: Justin Lecher <jlec@gentoo.org> Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2016-04-03menuconfig: fix extended colors ncurses supportKrzysztof Mazur
The ncurses library allows for extended colors. The support for extended colors support depends on wide-character support. ncurses headers enable extended colors (NCURSES_EXT_COLORS) only when wide-character support is enabled (NCURSES_WIDECHAR). The "make menuconfig" uses wide-character ncursesw library, which can be compiled with wide-character support, but does not define NCURSES_WIDECHAR and it's using headers without wide-character (and extended colors) support. This fixes problems with colors on systems with enabled extended colors (like PLD Linux). Without this patch "make menuconfig" is hard to use. Signed-off-by: Krzysztof Mazur <krzysiek@podlesie.net> Signed-off-by: Michal Marek <mmarek@suse.cz> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2016-04-03kbuild: Fix gcc -x syntaxJean Delvare
The correct syntax for gcc -x is "gcc -x assembler", not "gcc -xassembler". Even though the latter happens to work, the former is what is documented in the manual page and thus what gcc wrappers such as icecream do expect. This isn't a cosmetic change. The missing space prevents icecream from recognizing compilation tasks it can't handle, leading to silent kernel miscompilations. Besides me, credits go to Michael Matz and Dirk Mueller for investigating the miscompilation issue and tracking it down to this incorrect -x parameter syntax. Signed-off-by: Jean Delvare <jdelvare@suse.de> Acked-by: Ingo Molnar <mingo@kernel.org> Cc: stable@vger.kernel.org Cc: Bernhard Walle <bernhard@bwalle.de> Cc: Michal Marek <mmarek@suse.cz> Cc: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Michal Marek <mmarek@suse.cz> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2016-04-03kconfig: fix check-lxdialog for DLL platformsYaakov Selkowitz
Import libraries on Cygwin and MinGW/MSYS use the .dll.a suffix, so checking this suffix is necessary to make sure ncurses will still be found when built without static libraries. Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Signed-off-by: Michal Marek <mmarek@suse.cz> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2016-04-03kconfig: check ncursesw headers first in check-lxdialogYaakov Selkowitz
Commit 8c41e5e363db55d91aa3b1cdce4ab02ad9821de7 added a check for ncursesw/curses.h for the case where ncurses and ncursesw are build separately but only one is installed. But if both are installed, the headers ncurses/curses.h and ncursesw/curses.h differ, and since libncursesw will be found first, so should ncursesw/curses.h. Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Signed-off-by: Michal Marek <mmarek@suse.cz> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2016-04-03kconfig: fix menuconfig on debian lennyJunio C Hamano
In 60f33b8 (kconfig: get rid of stray a.o, support ncursesw, 2006-01-15), support to link menuconfig with ncursesw library was added. To compute the linker command option -l, we check "libncursesw.{so,a,dylib}" to allow ncursesw to be used as a replacement ncurses. However, when checking what header file to include, we do not check /usr/include/ncursesw directory. Add /usr/include/ncursesw to the list of directories that are checked. With this patch, on my Debian Lenny box with libncursesw5-dev package but not libncurses5-dev package, I can say "make menuconfig". Signed-off-by: Junio C Hamano <gitster@pobox.com> Acked-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Michal Marek <mmarek@suse.cz> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2016-04-03Revert "lxdialog: fix ncursesw include detection"Mike Frysinger
This reverts commit e91bc53d0c2e8de7dc4fbdb888ab0a4923c2b475. Let's get back to a state that matches upstream so we can pull in all of their fixes from the last few years. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2016-04-03trylink: on failure, print a hint about CONFIG_EXTRA_LDLIBSDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-12-01trylink: include LDFLAGS when checking linkageMike Frysinger
The user might be including options in their LDFLAGS (like -fuse-ld=gold) that change the behavior of the linker and thus change the results of the flag tests. Make sure we include the user's LDFLAGS when running these tests so we filter out flags that will fail when used later on. URL: https://bugs.gentoo.org/499712 Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2015-10-20typo fixDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-10-20scripts/trylink: remove $CPPFLAGSDenys Vlasenko
We don't use it in final link, should not use it in check_FOO then. This uncovered a logic bug in glibc check... Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-10-20scripts/trylink: fix bit-rotted linker option verificationDenys Vlasenko
To that end, *make it complain* when check_cc fails on options we usually want to succeed. text data bss dec hex filename 929697 932 17692 948321 e7861 busybox-1.23.2/busybox 915361 911 17484 933756 e3f7c busybox-1.23.2.fixed/busybox 927725 932 17448 946105 e6fb9 busybox-1.24.0/busybox 913630 911 17240 931781 e37c5 busybox-1.24.0.fixed/busybox Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-10-11randconfig fixesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-06-07fix if(p)/free(p) constructManinder Singh
No need of explicit NULL check before free. Signed-off-by: Maninder Singh <maninder1.s@samsung.com> Signed-off-by: Akhilesh Kumar <akhilesh.k@samsung.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-05-25typo fixesManinder Singh
Signed-off-by: Maninder Singh <maninder1.s@samsung.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-03-16trylink: respect compiler settings when probing featuresMike Frysinger
The CPPFLAGS/CFLAGS settings might have features that matter, so make sure we utilize them when testing the compiler. URL: https://bugs.gentoo.org/471118 Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2015-03-16trylink: use mktemp instead of hardcoding pathsMike Frysinger
This way we respect standard tempdir env vars and are guaranteed to be unique. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2014-05-03trylink: emit names of linked executablesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-04-19modprobe-small: fix help messages for aliased module-related appletsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-04-02build system: specify '-nostldlib' when linking to .o filesDrew Moseley
For certain cross build scenarios the LD variable is overridden to use the gcc executive to ensure all the target tuning parameters are used. In these cases, the executive errors out as shown below but since this step is only linking to a .o file the standard libs are not needed. $ make LD=gcc applets/built-in.o LD applets/built-in.o /usr/bin/ld: cannot find -lgcc_s /usr/bin/ld: cannot find -lgcc_s collect2: ld returned 1 exit status make[1]: *** [applets/built-in.o] Error 1 make: *** [applets_dir] Error 2 Signed-off-by: Drew Moseley <drew_moseley@mentor.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-03-16build system: for "find", use POSIX not operator (!) instead of -notDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-01-10build system: fix non-portable sed constructs.Matthias Andree
This includes proper line breaks for labels and closing braces, and removing non-portable \n and \t in s/// functions. Signed-off-by: Matthias Andree <matthias.andree@gmx.de> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-01-09build system: stop including alloca.h, stdlib.h provides itDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-12-31fix failures found by randomconfig buildsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-12-19build system: fix make gconfigDaniel Borca
Was getting "undefined reference to symbol 'dlsym@@GLIBC_2.2.5'". Signed-off-by: Daniel Borca <dborca@yahoo.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-11-26build system: use od -b instead of od -t x1Denys Vlasenko
od -t is not available in non-CONFIG_DESKTOPed busybox od Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-10-16bloat-o-meter: add usage infoBartosz Golaszewski
Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-09-28trylink: only prefix libs with -lMike Frysinger
If our pkg-config queries pass back a flag like -pthread, the trylink script will expand that to -l-pthread. So change trylink to only add the -l prefix to a value that doesn't have a - prefix already. Reported-by: thaehaid@incognitomail.org Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2013-07-26buildsys: Add helper to list suid appletsBernhard Reutner-Fischer
Add a helper script that lists all applets that - do or may require SUID provileges (busybox.cfg.suid) - do not require SUID provileges (busybox.cfg.nosuid) Some setups prefer to build two busybox binaries, one that is suid which contains all applets that do or may require suid privileges, and a second one for all the rest (which drops suid). To ease splitting these two binaries, generate a list of CONFIG_ items for the suid binary. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-09-27scripts/kconfig/mconf: work on systems w/o SIGWINCHDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>