Commit Graph

511 Commits

Author SHA1 Message Date
Denys Vlasenko
015db5800c randomconfig fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-06-19 18:15:33 +02:00
Denys Vlasenko
4c8fa34417 generate_BUFSIZ.sh: yet another tweak
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-04-24 14:13:35 +02:00
Denys Vlasenko
663d1da1e6 scripts/trylink: document DATA_SEGMENT_ALIGN() hack
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-04-22 02:00:04 +02:00
Denys Vlasenko
7ff24bd5fb generate_BUFSIZ.sh: catch BUFSIZE < 1024 also on "big" builds
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-04-22 00:24:53 +02:00
Denys Vlasenko
d7b502c059 build system: fix generate_BUFSIZ.sh to not alternate 1k and malloc builds
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-04-21 23:52:35 +02:00
Denys Vlasenko
93e1aaa1c7 libbb: constify *bb_common_bufsiz1 (if it is compiled to be a pointer)
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-21 21:47:45 +02:00
Denys Vlasenko
f56fb5eb11 libbb: make "COMMON_BUFSIZE = 1024 bytes, the buffer will be malloced" work
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-04-21 21:03:51 +02:00
Denys Vlasenko
47cfbf32fd *: add most of the required setup_common_bufsiz() calls
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-04-21 18:18:48 +02:00
Denys Vlasenko
e6a2f4cc5a libbb: make bb_common_bufsiz1 1 kbyte, add capability to use bss tail for it
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-21 17:39:11 +02:00
Bjørn Forsman
d63d77a7f0 kconfig/lxdialog: get ncurses CFLAGS with pkg-config
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-03 23:59:15 -04:00
Michal Marek
935fe68236 kbuild: Make scripts executable
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-03 23:59:15 -04:00
Yann E. MORIN
d35ba8b5ed kconfig/lxdialog: rationalise the include paths where to find {.n}curses{,w}.h
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-03 23:59:15 -04:00
Justin Lecher
e62c715b3e menuconfig: optionally use pkg-config to detect ncurses libs
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-03 23:59:15 -04:00
Krzysztof Mazur
f755430d79 menuconfig: fix extended colors ncurses support
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-03 23:59:15 -04:00
Jean Delvare
8c3f943410 kbuild: Fix gcc -x syntax
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-03 23:59:15 -04:00
Yaakov Selkowitz
74f58ed48c kconfig: fix check-lxdialog for DLL platforms
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-03 23:59:15 -04:00
Yaakov Selkowitz
a0f24a06df kconfig: check ncursesw headers first in check-lxdialog
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-03 23:59:15 -04:00
Junio C Hamano
f48bd92285 kconfig: fix menuconfig on debian lenny
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-03 23:59:15 -04:00
Mike Frysinger
993dab7822 Revert "lxdialog: fix ncursesw include detection"
This reverts commit e91bc53d0c.

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-03 23:58:50 -04:00
Denys Vlasenko
056e1f558c trylink: on failure, print a hint about CONFIG_EXTRA_LDLIBS
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-04-03 15:38:53 +02:00
Mike Frysinger
77e2bde6a5 trylink: include LDFLAGS when checking linkage
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-12-01 11:25:10 -05:00
Denys Vlasenko
edcd5dcc9b typo fix
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-10-20 18:15:01 +02:00
Denys Vlasenko
58d0e20ad0 scripts/trylink: remove $CPPFLAGS
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-20 16:40:43 +02:00
Denys Vlasenko
5134010d88 scripts/trylink: fix bit-rotted linker option verification
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-20 16:16:16 +02:00
Denys Vlasenko
69c8c699aa randconfig fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-10-11 16:27:55 +02:00
Maninder Singh
0fabedf085 fix if(p)/free(p) construct
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-06-07 18:19:43 +02:00
Maninder Singh
97c6491b4e typo fixes
Signed-off-by: Maninder Singh <maninder1.s@samsung.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-05-25 13:46:36 +02:00
Mike Frysinger
6798564b9e trylink: respect compiler settings when probing features
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-16 17:47:01 -04:00
Mike Frysinger
4a08e82d44 trylink: use mktemp instead of hardcoding paths
This way we respect standard tempdir env vars and are guaranteed to
be unique.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2015-03-16 17:46:17 -04:00
Denys Vlasenko
e3366d696c trylink: emit names of linked executables
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-05-03 16:35:15 +02:00
Denys Vlasenko
5fd3ddfb24 modprobe-small: fix help messages for aliased module-related applets
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-04-19 15:04:39 +02:00
Drew Moseley
7537406edd build system: specify '-nostldlib' when linking to .o files
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-04-02 12:12:46 +02:00
Denys Vlasenko
29f3526048 build system: for "find", use POSIX not operator (!) instead of -not
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-03-16 12:05:58 +01:00
Matthias Andree
9b76f895bc build system: fix non-portable sed constructs.
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-10 11:54:37 +01:00
Denys Vlasenko
f2743a5b00 build system: stop including alloca.h, stdlib.h provides it
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-01-09 11:02:46 +01:00
Denys Vlasenko
198b02f7dd fix failures found by randomconfig builds
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-12-31 23:22:36 +01:00
Daniel Borca
c9d87bed8e build system: fix make gconfig
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-12-19 04:43:24 +01:00
Denys Vlasenko
195c436f84 build system: use od -b instead of od -t x1
od -t is not available in non-CONFIG_DESKTOPed busybox od

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-11-26 14:56:29 +01:00
Bartosz Golaszewski
28a209466f bloat-o-meter: add usage info
Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-10-16 19:18:05 +02:00
Mike Frysinger
3eab2b7675 trylink: only prefix libs with -l
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-09-28 18:40:07 -04:00
Bernhard Reutner-Fischer
9078633fee buildsys: Add helper to list suid applets
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>
2013-07-26 13:39:46 +02:00
Denys Vlasenko
225cc1327a scripts/kconfig/mconf: work on systems w/o SIGWINCH
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-09-27 15:26:40 +02:00
Bernhard Walle
9b78e14dfb build system: fix build of kconfig on Darwin
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-06-18 01:51:26 +02:00
Denys Vlasenko
8cab66730a fix build breakage found by randconfig
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-04-20 14:48:00 +02:00
Bernhard Reutner-Fischer
25dbb0743e bloat-o-meter: Remove unused code
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-30 19:50:39 +02:00
Bernhard Reutner-Fischer
b1b70969e0 bloat-o-meter: handle huge (hex) sizes.
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-03-30 19:26:40 +02:00
Paulius Zaleckas
1c7724bf2a gen_build_files.sh: exclude hidden directories
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>
2012-01-30 02:34:56 +01:00
Denys Vlasenko
4ea37d62c2 gen_build_files.sh: simplify "print everything up to INSERT line" part
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-10-19 21:17:20 +02:00
Denys Vlasenko
efd08bfa0a gen_build_files: don't pass 200k+ strings as params. Closes 4321
Also removes one grep per generated file.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-10-19 17:54:42 +02:00
Denys Vlasenko
dd1eb413f2 suppress "warning: implicit declaration of function 'alloca'"
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-09-15 10:37:04 +02:00
Lauri Kasanen
98f213ed79 bloat-o-meter: don't require that pythin is in /usr/bin.
Signed-off-by: Lauri Kasanen <curaga@operamail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-07-08 10:56:58 +02:00
Daniel Fandrich
126f2b2853 Support configuring Busybox from _defconfig files
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-07-08 07:59:16 +02:00
Steve Iribarne
ed607a87e0 pam link error with SHARED_BUSYBOX and LIBBUSYBOX enabled
Signed-off-by: Steve Iribarne <siribarne@grid-net.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-09 01:42:12 +02:00
Cristian Ionescu-Idbohrn
fcbc641fe3 get rid of several "variable 'x' set but not used" warnings
Signed-off-by: Cristian Ionescu-Idbohrn <cii@axis.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-01 14:43:53 +02:00
Denys Vlasenko
b83c970412 build fixes for scripts/kconfig
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-04-18 01:19:59 +02:00
Denys Vlasenko
08caf0900d fix another nonportable grep usage in scripts
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-04-16 19:45:33 +02:00
Denys Vlasenko
c3dadba699 gen_build_files.sh: do not use "sed --" for now
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-04-16 17:59:34 +02:00
Marek Polacek
b0b8884009 Fix double words in comments. No code changes
Signed-off-by: Marek Polacek <mpolacek@redhat.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-04-16 17:33:43 +02:00
Denys Vlasenko
bff5f3f2b4 fix bit rot in scripts/Makefile.IMA #2
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-03-06 23:48:24 +01:00
Denys Vlasenko
726ebbaa9f fix bit rot in scripts/Makefile.IMA
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-03-06 23:09:42 +01:00
Denys Vlasenko
e7212a4ce5 scripts/mkconfigs: don't use invalid basic regexp
\? are GNU extension and thus are non-standard

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-09 01:33:41 +01:00
Denys Vlasenko
5a746dcec5 scripts/kconfig/mconf.c: stop-gap fix for buffer overflow
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-07 02:19:02 +01:00
Macpaul Lin
b2fa0b6219 scripts: fix fixdep.c to let it workable in cygwin
Update retrun character detection in the fixdep.c
to let it work in cygwin.

Signed-off-by: Macpaul Lin <macpaul@andestech.com>
Signed-off-by: Greentime <green.hu@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-12-18 01:46:38 +01:00
Denys Vlasenko
e06884208a Revert "scripts: fix fixdep.c to let it workable in cygwin"
This reverts commit 10c36b8657.
2010-12-18 01:46:04 +01:00
Greentime
10c36b8657 scripts: fix fixdep.c to let it workable in cygwin
Update return character detection in the fixdep.c
to let it workable in cygwin.

Signed-off-by: Macpaul Lin <macpaul@andestech.com>
Signed-off-by: Greentime <green.hu@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-12-18 01:45:14 +01:00
Denys Vlasenko
7a3f8e2fe1 gen_build_files.sh: better comment
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-11-25 06:55:18 +01:00
Denys Vlasenko
749e305d36 build system: fix for dash
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-11-24 15:06:49 +01:00
Denys Vlasenko
26777aa1c6 fixes for bugs discovered by randomconfig builds and tests
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-11-22 23:49:10 +01:00
Denys Vlasenko
f9d091316d gen_build_files.sh: restore deleted comment
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-11-21 22:10:07 +01:00
Mike Frysinger
f718e3a0db gen_build_files.sh: rewrite with sed
The shell parsing of files is incredibly slow on many systems.  With
one report, the process was taking a minute or two which made people
thing the build was hung.  So rewrite the craziness with sed and proper
shell functions.  On an idle system, this cut the runtime by half.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-11-16 09:01:54 -05:00
Denys Vlasenko
f595d8ed46 typo fix
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-11-06 22:17:30 +01:00
Denys Vlasenko
833d4e7f84 rename archival/libunarchive -> archival/libarchive; move bz/ into it
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-11-03 02:38:31 +01:00
Denys Vlasenko
1642d02710 scripts/mkdiff_obj: show "size OBJFILE" too
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-10-29 19:06:20 +02:00
Marek Polacek
8410ac1a07 bloat-o-meter: make it python3 compliant
Python 3 doesn't support the iterkeys() method anymore.  Use
iter(foo.keys()) instead of foo.iterkeys().

Signed-off-by: Marek Polacek <mmpolacek@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-28 21:39:40 +02:00
Denys Vlasenko
02788ac7e2 scripts: remove bitrotted scripts/individual
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-28 20:45:37 +02:00
Thomas Chou
ef6c6d8cfe mkmakefile: make 3.82 fix
Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-10-19 12:49:51 +02:00
Denys Vlasenko
d493e9361f remove stray debugging stuff
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-08-29 14:39:45 +02:00
Denys Vlasenko
9ce07e778f bbconfig: add COMPRESS_BBCONFIG option
function                                             old     new   delta
bbconfig_config_bz2                                    -    4905   +4905
bbconfig_main                                         13      70     +57
bbconfig_config                                    21811       -  -21811
------------------------------------------------------------------------------
(add/remove: 1/1 grow/shrink: 1/0 up/down: 4962/-21811)    Total: -16849 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-08-29 14:36:11 +02:00
Denys Vlasenko
0ef64bdb40 *: make GNU licensing statement forms more regular
This change retains "or later" state! No licensing _changes_ here,
only form is adjusted (article, space between "GPL" and "v2" and so on).

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-08-16 20:14:46 +02:00
Waldemar Brodkorb
95b83ba4f8 OpenBSD compatibility
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-08-06 09:17:26 +02:00
Denys Vlasenko
6e06da5efd update _shipped file with hurd fix
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-08-02 02:17:25 +02:00
Bernhard Reutner-Fischer
3d615b8a41 find_stray_empty_lines: make it work
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-07-28 21:29:19 +02:00
Javier Viguera
a3f71001c3 find_stray_empty_lines: fix tail "invalid context" error
"tail -1" works only with one input file. Using it with multiple input
files throws following error on Ubuntu systems:

tail: option used in invalid context

Adding "-n" makes it work on all cases.

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-07-28 21:01:55 +02:00
Denys Vlasenko
b4d035165f *: s/spaces/tabs/
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-26 12:47:36 +02:00
Denys Vlasenko
ba2dcccd79 *: trailing empty lines removed
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-26 01:49:12 +02:00
Denys Vlasenko
0f8960542f *: more empty lines removed. no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-26 01:35:44 +02:00
Alexander Shishkin
daf286cda5 Fix out-of-tree build's recursion
While doing O=build build I've noticed that it was getting gradually
slower with each invocation. The reason turned out to be that the build
directory was inside the source tree and got recreated inside itself
with all its subdirectories.

This patch changes the behavior so that only the directories with
Kbuild.src or Config.src in them are created in the out-of-tree build
directory. A quick rebuild from scratch revealed no problems with this.

Signed-off-by: Alexander Shishkin <virtuoso@slind.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-18 23:57:49 +02:00
Denys Vlasenko
1883cb1746 fix make O=dir build
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-09 01:25:36 +02:00
Denys Vlasenko
3e5fa43b2f scripts/randomtest: update to pass testsuite with Rob's toolchain
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-06 02:26:35 +02:00
Pascal Bellard
926031b764 *: introduce and use xfork() and xvfork()
function                                             old     new   delta
launch_helper                                        170     169      -1
setup_heredoc                                        312     302     -10
handle_dir_common                                    367     354     -13
expand_vars_to_list                                 2456    2443     -13
open_transformer                                      89      74     -15
data_extract_to_command                              439     423     -16
do_ipaddr                                           1406    1389     -17
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/7 up/down: 0/-85)             Total: -85 bytes

Signed-off-by: Pascal Bellard <pascal.bellard@ads-lu.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-04 15:32:38 +02:00
Denys Vlasenko
1d72d43940 gen_build_files.sh is an order prerequisite only for autoconf.h
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-25 13:30:59 +02:00
Denys Vlasenko
134d0eb114 cosmetics on top of Dan's patches
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-19 20:07:23 +02:00
Dan Fandrich
ebeac1685a Define GNU-specific link options in one place
This makes them easier to change to support a non-GNU toolchain.

Signed-off-by: Dan Fandrich <dan@coneharvesters.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-19 20:03:21 +02:00
Denys Vlasenko
2f41e7ea57 fix extra bogus files generation in include/config/*
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-17 20:20:24 +02:00
Denys Vlasenko
da3a956dda scripts/echo.c: remove bb-ism
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-14 14:27:26 +02:00
Bernhard Reutner-Fischer
aa30efcc07 check-lxdialog.sh: fix helptext
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-06-11 15:31:54 +02:00
Denys Vlasenko
729ecb87bf bbconfig: make it independent from printf functions
function                                             old     new   delta
full_write2_str                                        -      25     +25
full_write1_str                                        -      25     +25
clear_main                                            21      20      -1
telnet_main                                         1488    1477     -11
getty_main                                          1932    1918     -14
full_write22_str                                      25       -     -25
------------------------------------------------------------------------------
(add/remove: 2/1 grow/shrink: 0/3 up/down: 50/-51)             Total: -1 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-07 14:14:26 +02:00
Denys Vlasenko
2f32bf8be6 remove defconfig. Now "make defconfig" simply uses defaults from Config.in
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-06 04:14:28 +02:00
Denys Vlasenko
f0f9470061 make it possible to keep usage texts in .c files
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-06 01:53:38 +02:00
Denys Vlasenko
6c5bf0d347 make it possible to have include/applets.h-esque entries in .c files
As an example, bunzip2 and bzcat is changed to use it.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-06 00:53:45 +02:00