minips is a pure alias to ps, just in case someone needs 100% klibc-utils compat.
nuke is a primitive version of "rm -rf" without options and error checks. ~30 bytes.
resume is a tool for initramfs which resumes from a given block device.
function old new delta
resume_main - 582 +582
packed_usage 31640 31712 +72
nuke_main - 28 +28
xstrtoull - 24 +24
applet_names 2646 2665 +19
applet_main 1532 1544 +12
applet_suid 96 97 +1
applet_install_loc 192 193 +1
applet_flags 96 97 +1
------------------------------------------------------------------------------
(add/remove: 5/0 grow/shrink: 6/0 up/down: 740/0) Total: 740 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>