Mercurial > hg > toybox
changeset 603:150a6d81bd02
Replace CCFLAGS with description of how to add flags to HOSTCC.
author | Rob Landley <rob@landley.net> |
---|---|
date | Mon, 18 Jun 2012 23:23:24 -0500 |
parents | 12eddd9a1fe4 |
children | 90d6026c36c3 |
files | Makefile configure scripts/install.sh |
diffstat | 3 files changed, 7 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/Makefile Mon Jun 18 23:22:08 2012 -0500 +++ b/Makefile Mon Jun 18 23:23:24 2012 -0500 @@ -25,7 +25,7 @@ @scripts/bloatcheck toybox_old toybox_unstripped instlist: toybox - $(HOSTCC) $(CCFLAGS) -I . scripts/install.c -o instlist + $(HOSTCC) -I . scripts/install.c -o instlist install_flat: instlist scripts/install.sh --symlink --force
--- a/configure Mon Jun 18 23:22:08 2012 -0500 +++ b/configure Mon Jun 18 23:23:24 2012 -0500 @@ -4,10 +4,13 @@ # A synonym. [ -z "$CROSS_COMPILE" ] && CROSS_COMPILE="$CROSS" +[ -z "$CFLAGS" ] && CFLAGS="-Wall -Wundef -Wno-char-subscripts" +# Required for our expected ABI. we're 8-bit clean thus "char" must be unsigned. +CFLAGS="$CFLAGS -funsigned-char" -[ -z "$CFLAGS" ] && CFLAGS="-Wall -Wundef -Wno-char-subscripts" -CFLAGS="$CFLAGS -funsigned-char" [ -z "$OPTIMIZE" ] && OPTIMIZE="-Os -ffunction-sections -fdata-sections -Wl,--gc-sections" [ -z "$CC" ] && CC=cc [ -z "$STRIP" ] && STRIP=strip + +# If HOSTCC needs CFLAGS, add them to the variable ala HOSTCC="blah-cc --static" [ -z "$HOSTCC" ] && HOSTCC=gcc
--- a/scripts/install.sh Mon Jun 18 23:22:08 2012 -0500 +++ b/scripts/install.sh Mon Jun 18 23:23:24 2012 -0500 @@ -35,7 +35,7 @@ echo "Compile instlist..." -$DEBUG $HOSTCC $CCFLAGS -I . scripts/install.c -o instlist || exit 1 +$DEBUG $HOSTCC -I . scripts/install.c -o instlist || exit 1 COMMANDS="$(./instlist $LONG_PATH)" echo "Install commands..."