aboutsummaryrefslogtreecommitdiff
path: root/scripts
AgeCommit message (Collapse)Author
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>
2012-06-18build system: fix build of kconfig on DarwinBernhard Walle
Of course busybox cannot be used on Darwin (Mac OS X), but it can be cross-compiled for Linux there. Cross-compilation still requires kconfig to be built as native host tool. Signed-off-by: Bernhard Walle <bernhard@bwalle.de> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-04-20fix build breakage found by randconfigDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-30bloat-o-meter: Remove unused codeBernhard Reutner-Fischer
The regex matching is way slower, so remove it since it was disabled anyway. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-03-30bloat-o-meter: handle huge (hex) sizes.Bernhard Reutner-Fischer
dynamic symbols with size >99999 are printed in hex. see print_vma(psym->st_size, DEC_5) Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-01-30gen_build_files.sh: exclude hidden directoriesPaulius Zaleckas
I am using quilt to manage patches internally. Quilt creates dir .pc and stores unmodified files there. Since I made change in one of Config.src quilt made a copy in .pc/xxx.patch/xxx/Config.src. When I run make it calls gen_build_files.sh and it generates .pc/xxx.patch/xxx/Config.in. Now when I want to pop patch quilt thinks I have made changes to original xxx/Config.in. IMO the best solution is just to ignore hidden directories in gen_build_files.sh. This also results in shorter build time in case busybox is under git/svn versioning, since it avoids searching many directories for Config.src. Signed-off-by: Paulius Zaleckas <paulius.zaleckas@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-10-19gen_build_files.sh: simplify "print everything up to INSERT line" partDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-10-19gen_build_files: don't pass 200k+ strings as params. Closes 4321Denys Vlasenko
Also removes one grep per generated file. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-09-15suppress "warning: implicit declaration of function 'alloca'"Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-07-08bloat-o-meter: don't require that pythin is in /usr/bin.Lauri Kasanen
Signed-off-by: Lauri Kasanen <curaga@operamail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-07-08Support configuring Busybox from _defconfig filesDaniel Fandrich
The existing test .config files are moved to configs/ and renamed to *_defconfig. 'make xyz_defconfig' will enable the configuration in that specific file. Signed-off-by: Daniel Fandrich <dan@coneharvesters.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-09pam link error with SHARED_BUSYBOX and LIBBUSYBOX enabledSteve Iribarne
Signed-off-by: Steve Iribarne <siribarne@grid-net.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-01get rid of several "variable 'x' set but not used" warningsCristian Ionescu-Idbohrn
Signed-off-by: Cristian Ionescu-Idbohrn <cii@axis.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-04-18build fixes for scripts/kconfigDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-04-16fix another nonportable grep usage in scriptsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-04-16gen_build_files.sh: do not use "sed --" for nowDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-04-16Fix double words in comments. No code changesMarek Polacek
Signed-off-by: Marek Polacek <mpolacek@redhat.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-03-06fix bit rot in scripts/Makefile.IMA #2Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-03-06fix bit rot in scripts/Makefile.IMADenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-09scripts/mkconfigs: don't use invalid basic regexpDenys Vlasenko
\? are GNU extension and thus are non-standard Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>