and probing them in parallel makes that awkward, so if there are any
pass --start-group and --end-group to the linker so it actually
resolves crosstalk between them.
allow $VERSION override without the -DTOYBOX_VERSION=\"blah\" wrapper,
remove magic sed line ranges for dependency checking (tag lines with #d
instead), split out FILES= in generated build.sh and wordwrap it to
be more legible, make PATH= a comment for dependency checking instead of
a variable override on the target system.
Oliver Webb noticed that selecting allnoconfig then enabling just sh
(instead of "make sh" singleconfig) build breaks because test.c isn't
build but it tries to pull in test_main().
So search for files to compile using unintented USE() macros wrapping NEW()
This version runs every time (much faster), and only includes enabled
structures so the union's size is the enabled high water mark rather than
pending: scripts/probes/GLOBALS now says that ps is the largest one,
setting the sizeof(this) to 336 bytes.
and despite >& and &> being listed as synonyms in the bash man page,
>>& isn't supported even by the new ones.
Need to circle back to this and fix it another way, but unbreak macos for now.
(It's interfering with the Android build's header snapshot thing.
When we rewrite kconfig from scratch we can have it call oldconfig itself,
until then just mention that we detected the need. It works without it
often enough, and the build breaks shouldn't be subtle...)
(which comes early enough in the command line now), use shoter : ${NAME:=val}
syntax for the if-not-set-then-set variables, have CFLAGS append
to inherited instead of if-not-set (it was already doing that for
-funsigned-char so we're 8 bit clean, everything else is warnings
management and one -Werror for function with no prototype).
llvm still emits "C++ programmers do not understand C" warnings unless muzzled,
but gcc versions that die when hitting -Wno-warning-you-do-not-produce
seem to have cycled out.
Oddly, gcc will still spuriously warn about unknown -Wno-thingy when generating
OTHER warnings, which seems both useless and indecisive. (If you typo a
-Wno-thingy so it doesn't suppress the warning, you presumably notice that
the warning it just generated did not get suppressed. It wasn't worth telling
you about before, so why tack on some noise to the other output?)
On a desktop or server the difference between the realtime and monotonic
clocks doesn't matter much, but we've seen cases on Android where
something's run under timeout(1) but killed before it's had a chance to
do anything because the device went into sleep shortly afterwards and by
the time it came back, the timeout had elapsed (as far as the realtime
clock is concerned) but the process had only had a tiny fraction of the
timeout where the system wasn't suspended.
This patch also adds an xparsetimespec() function; at this point the
only remaining users of xparsetime() are in lib, so maybe that should
become static, at least until we have another need for it?
A bigger question is whether timeout(1) needs to offer the user a choice
between the two different clocks? Although monotonic is usally the right
default choice on Android, and I don't have a specific counter-example
to hand, I can imagine that someone might actually mean "wall clock time"
rather than "cpu clock time" when setting a timeout...
Luckily, timer_create() lets us trivially choose between both clocks
if so.
(No guarantee children complete in the order they're launched. Ability to
wait for "next" was added in bash 4.3 which shipped Feb 2014, now over the
7 year horizon.)
the first google hit for "android toybox"), and want toybox --help to
mention it. I was referred to https://github.com/landley/toybox/issues/50
So add a URL to toybox --help. While I was there, make unrecognized commands
(like toybox -?) suggest "toybox --help", move the install instructions
to the FAQ page (with a second link from toybox --help), and generally
tighten up the help text. Also, "toybox -*" is no longer a synonym for --long.
Oh, and I fixed some build dependencies when Config.in changes.
Just use `ASAN=1 make test_grep` or whatever.
You'll probably want to set $ASAN_SYMBOLIZER_PATH to point to
llvm-symbolizer, but Debian makes that annoying by calling the
symbolizer /usr/bin/llvm-symbolizer-4.0 or whatever, and ASan refuses to
use it:
==43370==ERROR: External symbolizer path is set to
'/usr/bin/llvm-symbolizer-4.0' which isn't a known symbolizer. Please
set the path to the llvm-symbolizer binary or other known tool.
My usual workaround for this is to drop an llvm-symbolizer symlink in
the current directory, and I'm happy to automate that in the script to
make it require no knowledge of any of this nonsense, but haven't done
so in this initial patch.
I tested that this is actually working by reverting the grep fix and
running `ASAN=1 make test_grep`.
I know that you are working on toysh which I'm looking forward to. In the
meantime below is a patch to improve compatibility with older/odd versions
of bash. This fixed a minor build issue I was having on MacOS (which was
using zsh in emulated bash mode) as well as an oddball embedded SDK using
a non-gnu version of bash. I believe these changes are minimal and should
be safe to apply, if not I wanted to at least get them on the mailing list
in case others ran into these issues.