Rob Landley | 2896480 | 2008-01-19 17:08:39 -0600 | [diff] [blame] | 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" |
Rob Landley | bccb6db | 2013-01-13 13:48:25 -0600 | [diff] [blame] | 7 | [ -z "$CFLAGS" ] && CFLAGS="-Wall -Wundef -Wno-char-subscripts" |
Rob Landley | 97abd4a | 2012-06-18 23:23:24 -0500 | [diff] [blame] | 8 | # Required for our expected ABI. we're 8-bit clean thus "char" must be unsigned. |
Rob Landley | 2896480 | 2008-01-19 17:08:39 -0600 | [diff] [blame] | 9 | CFLAGS="$CFLAGS -funsigned-char" |
Rob Landley | 97abd4a | 2012-06-18 23:23:24 -0500 | [diff] [blame] | 10 | |
Rob Landley | 0d74ad3 | 2013-08-13 03:22:44 -0500 | [diff] [blame] | 11 | [ -z "$OPTIMIZE" ] && OPTIMIZE="-Os -ffunction-sections -fdata-sections -Wl,--gc-sections -fno-asynchronous-unwind-tables" |
Rob Landley | 344c267 | 2012-03-03 10:56:11 -0600 | [diff] [blame] | 12 | [ -z "$CC" ] && CC=cc |
| 13 | [ -z "$STRIP" ] && STRIP=strip |
Rob Landley | 97abd4a | 2012-06-18 23:23:24 -0500 | [diff] [blame] | 14 | |
| 15 | # If HOSTCC needs CFLAGS, add them to the variable ala HOSTCC="blah-cc --static" |
Rob Landley | 2896480 | 2008-01-19 17:08:39 -0600 | [diff] [blame] | 16 | [ -z "$HOSTCC" ] && HOSTCC=gcc |