android_external_toybox/configure
Rob Landley 85ffccb38e Implicit function declarations are an error, not a warning.
(The switch to 64 bits screwed up varargs: everything used to be promoted to 32
bits, but now it's 32 bits or 64 bits depending on type declarations, so you
need the type declarations. Because promoting "char" arguments to 32 bits back
when a megabyte was a lot of memory was ok, but promoting everything to 64 bits
now that you can get 2 gigabytes of ram in a phone is unacceptable.)
2017-01-04 14:19:06 -06:00

26 lines
992 B
Plaintext

# Toybox configuration file.
# This sets environment variables used by scripts/make.sh
# A synonym.
[ -z "$CROSS_COMPILE" ] && CROSS_COMPILE="$CROSS"
# CFLAGS and OPTIMIZE are different so you can add extra CFLAGS without
# disabling default optimizations
[ -z "$CFLAGS" ] && CFLAGS="-Wall -Wundef -Wno-char-subscripts -Werror=implicit-function-declaration"
# Required for our expected ABI. we're 8-bit clean thus "char" must be unsigned.
CFLAGS="$CFLAGS -funsigned-char"
[ -z "$OPTIMIZE" ] && OPTIMIZE="-Os -ffunction-sections -fdata-sections -fno-asynchronous-unwind-tables -fno-strict-aliasing"
# We accept LDFLAGS, but by default don't have anything in it
[ -z "$LDOPTIMIZE" ] && LDOPTIMIZE="-Wl,--gc-sections"
# The makefile provides defaults for these, so this only gets used if
# you call scripts/make.sh and friends directly.
[ -z "$CC" ] && CC=cc
# If HOSTCC needs CFLAGS or LDFLAGS, just add them to the variable
# ala HOSTCC="blah-cc --static"
[ -z "$HOSTCC" ] && HOSTCC=cc