aboutsummaryrefslogtreecommitdiff
path: root/scripts/make.sh
AgeCommit message (Collapse)Author
2021-07-04make.sh: remove bashisms, change shebang to shEthan Sommer
2020-08-07People have been having trouble finding the toybox web page (despite beingRob Landley
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.
2020-02-22Make ASAN=1 affect the HOSTCC-built tools too.Elliott Hughes
Bug: https://github.com/landley/toybox/issues/169
2019-09-20ASAN=1 implies NOSTRIP=1, and don't say strip failed for NOSTRIP.Rob Landley
2019-09-06Add cross.sh to cross compile for one or more targets, and tweak make.sh toRob Landley
produce different output names for different ${TARGET}s.
2019-07-29Add ASAN=1 to the build system.Elliott Hughes
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`.
2019-06-29Bash Compatibility PatchEric Molitor
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.
2019-06-09Inverted test.Rob Landley
2019-06-05macOS build parallelism.Elliott Hughes
Macs are slow enough without crippling them further!
2019-04-23Remove librt, which is pulling in libpthread.Rob Landley
It hasn't been needed (for clock_gettime) since glibc 2.17 came out in December 2012 (which is more or less our 7 year support horizon) and Devuan 2.0 is not eliminating this with --as-needed (presumably due to some weak symbol nonsense), so... fix that bug.
2019-03-21Test for compiler existence when sourcing portability.sh.Rob Landley
2019-03-09Cosmetic tweak.Rob Landley
2019-01-31Tweak build dependencies: rebuild toys/*/*.c when .o newer than .config.Rob Landley
2019-01-19Factor out scripts/portability.sh and have genconfig.sh use it to find sed/gsed.Rob Landley
2018-12-05macOS: iconv(1) needs libiconv on the mac.Elliott Hughes
2018-11-30macOS: Apple's ancient linker doesn't have --as-needed or --gc-sections.Elliott Hughes
2018-11-01Discard harmless error messages.Rob Landley
genbuild() is a bunch of echo statements, and with enough parallelism piping its output to "head" can close the pipe before all the echo statements have run, then they complain about writing to a closed pipe. (We're intentionally discarding the output, it's not an error, so...)
2018-10-27Don't unnecessarily recalculate library list.Rob Landley
2018-10-27Fix "make distclean defconfig toybox" all on one line (good of $CROSS_COMPILERRob Landley
changed), better error message when .config missing.
2018-10-27Allow unstripped build to overwrite read-only output file.Rob Landley
(Output file is read only because broken installs that write to the old filename will truncate+overwrite toybox binary otherwise.)
2018-10-06Check for cross compiler before creating any generated/* files w/probed vals.Rob Landley
2018-10-05getconf: fix glibc NPROCESSORS_ONLN.Elliott Hughes
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).
2018-08-03Don't include toys.h and lib/*.c in config2help.c, the host vs cross compilerRob Landley
build context (probes for portability.h) is too fiddly to keep stright, just copy the parts we need into the host tool.
2018-06-03call strip as $STRIPFrancesco Valla
This is useful e.g. for cross toolchains that define $CC and $STRIP instead of $CROSS_COMPILE.
2018-04-13Add getconf.Rob Landley
2018-04-02Library probes need $LDFLAGS (for --static)Rob Landley
2017-08-06Check for .git before setting GITHASH.Rob Landley
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.
2017-08-05Allow GITHASH to be set on the command line, to work around a yocto bug.Rob Landley
2017-05-14Minor tweaks to install.sh.Rob Landley
2017-04-30Android needs -llog to link.Elliott Hughes
2017-04-30Implement zlib-based gzip/gunzip/zcat.Elliott Hughes
2017-03-20Add TOYBOX_PEDANTIC_ARGS to check arguments when there are no arguments,Rob Landley
and make uptime use it.
2016-12-08Workaround for Centos' "which" complaining if it can't find the commandRob Landley
(instead of just producing no output on stdout like everybody else).
2016-12-07Change error test to actually exit if first attempt to use .config fails.Rob Landley
2016-12-07People keep wanting to cross-compile from macs, where the stock sed is broken.Rob Landley
So use $SED to indicate the sed to use, and set it to 'gsed' if available.
2016-10-20Always regenerate config.h for now, so make single and make don't clash.Rob Landley
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.
2016-07-15Add optional openssl accelerated versions of hash functions, loosely based onRob Landley
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.
2016-07-05Fix generated/make.sh. (Quotes in TOYBOX_VERSION need to wind up inRob Landley
resulting macro.)
2016-05-20Make build dependencies more granular. This should fix the problem whereRob Landley
"make top; make ps" produces a ps that can't do -A because generated/obj/ps.o didn't get rebuilt.
2016-03-23Redo build stuff in response to Andy Chu's suggestions.Rob Landley
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!)
2016-03-01Use shell builtins instead of calling wc/awk/sed. (Fewer forks in build loop.)Rob Landley
Based on suggestions from Nicholas Boichat.
2016-02-26Switch to $! for make.sh process enumeration.Rob Landley
2016-02-07Add "make ls" and friends targets, with "make working" and "make pending" lists.Rob Landley
2016-02-07Add a warning when building commands out of pending.Rob Landley
2016-01-10Make cursor left/right change sort type in iotop.Rob Landley
2015-12-27Add scan_key_getsize() doing the ANSI probe, switch scan_key() to TAGGED_ARRAY,Rob Landley
and add test_scankey.
2015-12-13Start of TAGGED_ARRAY() infrastructure.Rob Landley
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.
2015-11-02Don't pass target $CFLAGS to host builds (telling x86 compiler to be big-endianRob Landley
seldom ends well). Instead add -DBUILD_FOR_HOST to $HOSTCC and wrap #ifdefs around problematic (smack) includes from toys.h.
2015-10-29Tweak permissions of toybox binary.Rob Landley
2015-10-14make.sh: missing cflags for config2helpAlejandro Joya
config2help might require extra parameters to be passed to the compiler. For example it might need an additional header path.