Age | Commit message (Collapse) | Author |
|
changed), better error message when .config missing.
|
|
(Output file is read only because broken installs that write to the old filename
will truncate+overwrite toybox binary otherwise.)
|
|
|
|
glibc doesn't have _XOPEN_UUCP (though bionic does), which meant that the
generated array of values was out of sync with the hand-written array of
names.
This patch removes that by using a unified array and the preprocessor.
A side benefit of this for me is that it makes toybox easier to integrate
in the AOSP build system (the less shell script magic, the better).
|
|
build context (probes for portability.h) is too fiddly to keep stright,
just copy the parts we need into the host tool.
|
|
This is useful e.g. for cross toolchains that define $CC and $STRIP
instead of $CROSS_COMPILE.
|
|
|
|
|
|
The GITHASH problem was building a tarball version under an existing git repo,
where git describe found ../../../../.git so only call git if we have a .git
directory in the source.
|
|
|
|
|
|
|
|
|
|
and make uptime use it.
|
|
(instead of just producing no output on stdout like everybody else).
|
|
|
|
So use $SED to indicate the sed to use, and set it to 'gsed' if available.
|
|
The problem is that .config and .singleconfig produce the same header file,
so checking that the header is newer than the .config file won't help if
it was last generated from the other file.
|
|
a patch from Elliott Hughes, who said:
[PATCH] Add support for libcrypto for MD5/SHA.
Orders of magnitude faster (for architectures where OpenSSL/BoringSSL
has optimized assembler).
Also adds sha224sum, sha256sum, sha384sum, and sha512sum for folks
building with libcrypto.
The fallback portable C implementations could easily be refactored
to be API-compatible, but I don't know whether they'd stay here or
move to lib/ so I've left that part alone for now.
|
|
resulting macro.)
|
|
"make top; make ps" produces a ps that can't do -A because generated/obj/ps.o
didn't get rebuilt.
|
|
Toybox single binaries are now made directly with the new name instead of
stomping toybox and getting renamed.
Unstripped files now live in generated/unstripped.
Target to run all tests is now "make tests" to avoid conflict with "make test".
.singleconfig now has .PHONY: entries for all test_$NAME targets.
Default install location changed to /usr/toybox, code.html now says how
to change it (set $PREFIX).
scripts/install.sh --uninstall works now. (And you get to keep the pieces!)
|
|
Based on suggestions from Nicholas Boichat.
|
|
|
|
|
|
|
|
|
|
and add test_scankey.
|
|
This lets you have struct arrays with a string as the first member, ala:
struct {char *name; int x, y} blah thingy[] = TAGGED_ARRAY(BLAH,
{"one", 1, 2}, {"two", 3, 4}, {"three", 5, 6}
);
And it produces #defines for the array index of each, ala:
#define BLAH_one 0
#define BLAH_two 1
#define BLAH_three 2
So you can use thingy[BLAH_two].x and still reorder the elements at will.
Note: if you screw up the array initializers, temporarily replace
TAGGED_ARRAY(BLAH, with { and the ); with }; and the compiler will give you
better error messages. (With the macro the compiler reports errors on the
TAGGED_ARRAY line, not where the comma is missing in its contents.)
Currently the TAGGED_ARRAY( and ); must be on their own lines, and the
{ and start of each attached string must be on the same line.
|
|
seldom ends well). Instead add -DBUILD_FOR_HOST to $HOSTCC and wrap #ifdefs
around problematic (smack) includes from toys.h.
|
|
|
|
config2help might require extra parameters to be passed to the compiler.
For example it might need an additional header path.
|
|
tempfile.
|
|
add NOSTRIP variable to force skipping strip, and save intermediate flag
data in generated/flags.raw and have mkflags.c error message point to that.
|
|
LLVM has its own nuts warnings about things that aren't wrong, but disabling
them with the relevant -Wno-* warning disabling command line option drives
gcc nuts because it's a command line option it doesn't recognize. (gcc 4.2.1
dies with an error. gcc 4.6 warns about it _only_ if it's warning about
something else. (PICK ONE, either you warn about this or you don't, distract
people from actual problems with noise about something clearly unrelated to
what just changed is extra-stupid.)
So just probe for it, and add the flag only if it doesn't complain about it
while we're producing an unrelated warning.
|
|
|
|
|
|
|
|
|
|
switched on.
|
|
macros for a disabled command (needed when multiple commands share infrastructure with a common set of flags).
This means the flag space is no longer packed, but leaves gaps where the zeroes
go. (Actual flag bit positions are the same for all configs.) Since the
option parsing needs to know where the holes are, the OPTSTR values are
now generated as part of flags.h with ascii 1 values for the disabled values.
(So generated/oldflags.h went away.)
This also means that the option string argument for OLDTOY() went away, it now
uses the same arguments as the NEWTOY() it references.
|
|
'traceroute' keep swapping places. self-inflicted, yes, but not much i
can do about it :-(
|
|
including that. (Worked until I did a "make clean".)
|
|
(it also adds a feature, -R, because toybox makes that so easy.)
you'll probably want fancier configuration here because although the
--as-needed works okay, a typical Ubuntu box will have the .so but not
the .h files. i did consider adding a toys/selinux/ directory, but
given that existing tools like ls and id will want -Z SELinux options,
i wasn't sure whether you'd think it was worth segregating the
SELinux-only toys.
note that this won't help the tizen smack users (and patch for smack
won't help SELinux users). so you might want to think about where
you'd like us to be aiming: #if USE_SELINUX/USE_SMACK in all the
relevant places, or a toys/selinux and a toys/smack (though we'd still
need #if in at least ls and id), or a lib/security.c that concentrates
all the differences into one file?
|
|
to finish before exiting.)
|
|
ones (in the "change" subdirectory), and tweak scripts/make.sh to avoid redundant work when rebuilding.
|
|
just remove the "generated" directory entirely.
|
|
|
|
try to keep large SMP machines busy (each compiler invocation is short so they exit almost as fast as we launch them).
|
|
the toybox_unstripped binary using the existing generated/*.h files.
This way we can snapshot the generated/*.{h,sh} from a defconfig build into
a "shipped" directory or something, and then people can maybe build on crazy
crippled environments like pcbsd that haven't got gmake and put bash under
/usr/local so none of the #!/scripts can find it. This solves at least
part of the "toybox can build with itself but you need to build toybox first
to have the tools to run the build scripts" problem.
Next up: work out the minimal config to provide the build tools needed
to run an actual build. (This should, eventually, include a "make" command
if freebsd's kernel is going to refuse to build with netbsd's "make" and
we don't just write off the whole thing as crazy. But it probably shouldn't
include commands that #include <linux/*.h> if we are trying to make that work.)
|