android_external_toybox/configure
Rob Landley f492273712 Move -Wno-string-plus-int to portability.sh and have it only apply to clang.
On gcc that spurious warning isn't generated so the -W to suppress it
isn't recognized. It doesn't complain an unknown -Wno-blah unless it's
producing other warnings, but when it does there's always an extra line
of noise, so fix it.
2022-09-14 02:43:39 -05:00

24 lines
905 B
Bash
Executable File

#!/bin/bash
# set environment variables used by scripts/make.sh
# People run ./configure out of habit, so do "defconfig" for them.
if [ "$(basename "$0")" == configure ]
then
echo "Assuming you want 'make defconfig', but you should probably check the README."
make defconfig
exit $?
fi
# Warn about stuff, disable stupid warnings, be 8-bit clean for utf8.
[ "${CFLAGS/-funsigned-char//}" == "$CFLAGS" ] &&
CFLAGS+=" -Wall -Wundef -Werror=implicit-function-declaration -Wno-char-subscripts -Wno-pointer-sign -funsigned-char"
# Set default values if variable not already set
: ${CC:=cc} ${HOSTCC:=cc} ${GENDIR:=generated} ${KCONFIG_CONFIG:=.config}
: ${UNSTRIPPED:=$GENDIR/unstripped} ${OUTNAME:=toybox${TARGET:+-$TARGET}}
: ${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