comparison configure @ 1706:2d5e3e345c14 draft

Add LDFLAGS and STRIP=no support.
author Rob Landley <rob@landley.net>
date Sat, 28 Feb 2015 12:39:16 -0600
parents 5f9fbf75ad34
children 0bf35904cabc
comparison
equal deleted inserted replaced
1705:e618a873a946 1706:2d5e3e345c14
2 2
3 # This sets environment variables used by scripts/make.sh 3 # This sets environment variables used by scripts/make.sh
4 4
5 # A synonym. 5 # A synonym.
6 [ -z "$CROSS_COMPILE" ] && CROSS_COMPILE="$CROSS" 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
7 [ -z "$CFLAGS" ] && CFLAGS="-Wall -Wundef -Wno-char-subscripts" 10 [ -z "$CFLAGS" ] && CFLAGS="-Wall -Wundef -Wno-char-subscripts"
8 # Required for our expected ABI. we're 8-bit clean thus "char" must be unsigned. 11 # Required for our expected ABI. we're 8-bit clean thus "char" must be unsigned.
9 CFLAGS="$CFLAGS -funsigned-char" 12 CFLAGS="$CFLAGS -funsigned-char"
13 [ -z "$OPTIMIZE" ] && OPTIMIZE="-Os -ffunction-sections -fdata-sections -fno-asynchronous-unwind-tables"
10 14
11 [ -z "$OPTIMIZE" ] && OPTIMIZE="-Os -ffunction-sections -fdata-sections -fno-asynchronous-unwind-tables" 15 # We accept LDFLAGS, but by default don't have anything in it
12 [ -z "$LDOPTIMIZE" ] && LDOPTIMIZE="-Wl,--gc-sections" 16 [ -z "$LDOPTIMIZE" ] && LDOPTIMIZE="-Wl,--gc-sections"
17
13 [ -z "$CC" ] && CC=cc 18 [ -z "$CC" ] && CC=cc
14 [ -z "$STRIP" ] && STRIP=strip 19 [ -z "$STRIP" ] && STRIP=strip # set STRIP=no to skip stripping entirely
15 20
16 # If HOSTCC needs CFLAGS, add them to the variable ala HOSTCC="blah-cc --static" 21 # If HOSTCC needs CFLAGS or LDFLAGS, just add them to the variable
22 # ala HOSTCC="blah-cc --static"
17 [ -z "$HOSTCC" ] && HOSTCC=gcc 23 [ -z "$HOSTCC" ] && HOSTCC=gcc