blob: 21d56f38731424f00c7efd50ec683f97e52ea347 [file] [log] [blame]
Rob Landley28964802008-01-19 17:08:39 -06001# 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"
Rob Landley57f93c82015-02-28 12:39:16 -06007
8# CFLAGS and OPTIMIZE are different so you can add extra CFLAGS without
9# disabling default optimizations
Rob Landleya913d922015-05-09 17:07:22 -050010[ -z "$CFLAGS" ] && CFLAGS="-Wall -Wundef -Wno-char-subscripts"
Rob Landley97abd4a2012-06-18 23:23:24 -050011# Required for our expected ABI. we're 8-bit clean thus "char" must be unsigned.
Rob Landley28964802008-01-19 17:08:39 -060012CFLAGS="$CFLAGS -funsigned-char"
Rob Landley96146202014-08-30 17:44:07 -050013[ -z "$OPTIMIZE" ] && OPTIMIZE="-Os -ffunction-sections -fdata-sections -fno-asynchronous-unwind-tables"
Rob Landley97abd4a2012-06-18 23:23:24 -050014
Rob Landley57f93c82015-02-28 12:39:16 -060015# We accept LDFLAGS, but by default don't have anything in it
16[ -z "$LDOPTIMIZE" ] && LDOPTIMIZE="-Wl,--gc-sections"
17
18[ -z "$CC" ] && CC=cc
Rob Landley57f93c82015-02-28 12:39:16 -060019
20# If HOSTCC needs CFLAGS or LDFLAGS, just add them to the variable
21# ala HOSTCC="blah-cc --static"
Rob Landley28964802008-01-19 17:08:39 -060022[ -z "$HOSTCC" ] && HOSTCC=gcc