2008-01-19 15:08:39 -08:00
|
|
|
# Toybox configuration file.
|
|
|
|
|
|
|
|
# This sets environment variables used by scripts/make.sh
|
|
|
|
|
|
|
|
# A synonym.
|
|
|
|
[ -z "$CROSS_COMPILE" ] && CROSS_COMPILE="$CROSS"
|
2015-02-28 10:39:16 -08:00
|
|
|
|
|
|
|
# CFLAGS and OPTIMIZE are different so you can add extra CFLAGS without
|
|
|
|
# disabling default optimizations
|
2015-05-09 15:07:22 -07:00
|
|
|
[ -z "$CFLAGS" ] && CFLAGS="-Wall -Wundef -Wno-char-subscripts"
|
2012-06-18 21:23:24 -07:00
|
|
|
# Required for our expected ABI. we're 8-bit clean thus "char" must be unsigned.
|
2008-01-19 15:08:39 -08:00
|
|
|
CFLAGS="$CFLAGS -funsigned-char"
|
2015-09-16 23:49:48 -07:00
|
|
|
[ -z "$OPTIMIZE" ] && OPTIMIZE="-Os -ffunction-sections -fdata-sections -fno-asynchronous-unwind-tables -fno-strict-aliasing"
|
2015-02-28 10:39:16 -08:00
|
|
|
|
|
|
|
# We accept LDFLAGS, but by default don't have anything in it
|
2014-08-30 15:44:07 -07:00
|
|
|
[ -z "$LDOPTIMIZE" ] && LDOPTIMIZE="-Wl,--gc-sections"
|
2015-02-28 10:39:16 -08:00
|
|
|
|
2015-10-05 18:47:49 -07:00
|
|
|
# The makefile provides defaults for these, so this only gets used if
|
|
|
|
# you call scripts/make.sh and friends directly.
|
|
|
|
|
2012-03-03 08:56:11 -08:00
|
|
|
[ -z "$CC" ] && CC=cc
|
2012-06-18 21:23:24 -07:00
|
|
|
|
2015-02-28 10:39:16 -08:00
|
|
|
# If HOSTCC needs CFLAGS or LDFLAGS, just add them to the variable
|
|
|
|
# ala HOSTCC="blah-cc --static"
|
2015-10-05 18:47:49 -07:00
|
|
|
[ -z "$HOSTCC" ] && HOSTCC=cc
|