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