Mercurial > hg > toybox
annotate configure @ 1776:7bf68329eb3b draft default tip
Repository switched to git at https://github.com/landley/toybox
author | Rob Landley <rob@landley.net> |
---|---|
date | Thu, 09 Apr 2015 02:28:32 -0500 |
parents | c21fe4bc2249 |
children |
rev | line source |
---|---|
233
d4176f3f3835
Zap toys/Config.in and instead create generated/Config.in from contents of
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
1 # Toybox configuration file. |
d4176f3f3835
Zap toys/Config.in and instead create generated/Config.in from contents of
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
2 |
d4176f3f3835
Zap toys/Config.in and instead create generated/Config.in from contents of
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
3 # This sets environment variables used by scripts/make.sh |
d4176f3f3835
Zap toys/Config.in and instead create generated/Config.in from contents of
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
4 |
d4176f3f3835
Zap toys/Config.in and instead create generated/Config.in from contents of
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
5 # A synonym. |
d4176f3f3835
Zap toys/Config.in and instead create generated/Config.in from contents of
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
6 [ -z "$CROSS_COMPILE" ] && CROSS_COMPILE="$CROSS" |
1706
2d5e3e345c14
Add LDFLAGS and STRIP=no support.
Rob Landley <rob@landley.net>
parents:
1451
diff
changeset
|
7 |
2d5e3e345c14
Add LDFLAGS and STRIP=no support.
Rob Landley <rob@landley.net>
parents:
1451
diff
changeset
|
8 # CFLAGS and OPTIMIZE are different so you can add extra CFLAGS without |
2d5e3e345c14
Add LDFLAGS and STRIP=no support.
Rob Landley <rob@landley.net>
parents:
1451
diff
changeset
|
9 # disabling default optimizations |
1760
c21fe4bc2249
Flag to make llvm shut up about a broken warning.
Rob Landley <rob@landley.net>
parents:
1722
diff
changeset
|
10 [ -z "$CFLAGS" ] && CFLAGS="-Wall -Wundef -Wno-char-subscripts -Wno-string-plus-int" |
603
150a6d81bd02
Replace CCFLAGS with description of how to add flags to HOSTCC.
Rob Landley <rob@landley.net>
parents:
512
diff
changeset
|
11 # Required for our expected ABI. we're 8-bit clean thus "char" must be unsigned. |
150a6d81bd02
Replace CCFLAGS with description of how to add flags to HOSTCC.
Rob Landley <rob@landley.net>
parents:
512
diff
changeset
|
12 CFLAGS="$CFLAGS -funsigned-char" |
1706
2d5e3e345c14
Add LDFLAGS and STRIP=no support.
Rob Landley <rob@landley.net>
parents:
1451
diff
changeset
|
13 [ -z "$OPTIMIZE" ] && OPTIMIZE="-Os -ffunction-sections -fdata-sections -fno-asynchronous-unwind-tables" |
233
d4176f3f3835
Zap toys/Config.in and instead create generated/Config.in from contents of
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
14 |
1706
2d5e3e345c14
Add LDFLAGS and STRIP=no support.
Rob Landley <rob@landley.net>
parents:
1451
diff
changeset
|
15 # We accept LDFLAGS, but by default don't have anything in it |
1451
5f9fbf75ad34
Old compilers complain about linker options passed with -c, so split out $LDOPTIMIZE.
Rob Landley <rob@landley.net>
parents:
1003
diff
changeset
|
16 [ -z "$LDOPTIMIZE" ] && LDOPTIMIZE="-Wl,--gc-sections" |
1706
2d5e3e345c14
Add LDFLAGS and STRIP=no support.
Rob Landley <rob@landley.net>
parents:
1451
diff
changeset
|
17 |
512
9bcc288a1c54
Fix from Georgi Chorbadzhiyski to make cross compiling more robust.
Rob Landley <rob@landley.net>
parents:
358
diff
changeset
|
18 [ -z "$CC" ] && CC=cc |
603
150a6d81bd02
Replace CCFLAGS with description of how to add flags to HOSTCC.
Rob Landley <rob@landley.net>
parents:
512
diff
changeset
|
19 |
1706
2d5e3e345c14
Add LDFLAGS and STRIP=no support.
Rob Landley <rob@landley.net>
parents:
1451
diff
changeset
|
20 # If HOSTCC needs CFLAGS or LDFLAGS, just add them to the variable |
2d5e3e345c14
Add LDFLAGS and STRIP=no support.
Rob Landley <rob@landley.net>
parents:
1451
diff
changeset
|
21 # ala HOSTCC="blah-cc --static" |
233
d4176f3f3835
Zap toys/Config.in and instead create generated/Config.in from contents of
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
22 [ -z "$HOSTCC" ] && HOSTCC=gcc |