aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2015-10-05 20:47:49 -0500
committerRob Landley <rob@landley.net>2015-10-05 20:47:49 -0500
commit1223578c94c1d409af481dd7af2fb84261c20c62 (patch)
treeadd880cc5613c02a5793f38b9ef54dc84fa9ab31
parent5b39d5c58cc3c43580a9114355b0763c171926b6 (diff)
downloadtoybox-1223578c94c1d409af481dd7af2fb84261c20c62.tar.gz
Fix allnoconfig. (Exporting HOSTCC before HOSTCC?=cc caused a problem.)
-rw-r--r--Makefile5
-rw-r--r--configure5
2 files changed, 7 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 38b4120e..5422efed 100644
--- a/Makefile
+++ b/Makefile
@@ -4,6 +4,9 @@
# If people set these on the make command line, use 'em
# Note that CC defaults to "cc" so the one in configure doesn't get
# used when scripts/make.sh and care called through "make".
+
+HOSTCC?=cc
+
export CROSS_COMPILE CFLAGS OPTIMIZE LDOPTIMIZE CC HOSTCC V
all: toybox
@@ -25,8 +28,6 @@ $(KCONFIG_TOP): generated/Config.in
generated/Config.in: toys/*/*.c scripts/genconfig.sh
scripts/genconfig.sh
-HOSTCC?=cc
-
# Development targets
baseline: toybox_unstripped
@cp toybox_unstripped toybox_old
diff --git a/configure b/configure
index fe5f659d..7b10f6e5 100644
--- a/configure
+++ b/configure
@@ -15,8 +15,11 @@ CFLAGS="$CFLAGS -funsigned-char"
# We accept LDFLAGS, but by default don't have anything in it
[ -z "$LDOPTIMIZE" ] && LDOPTIMIZE="-Wl,--gc-sections"
+# The makefile provides defaults for these, so this only gets used if
+# you call scripts/make.sh and friends directly.
+
[ -z "$CC" ] && CC=cc
# If HOSTCC needs CFLAGS or LDFLAGS, just add them to the variable
# ala HOSTCC="blah-cc --static"
-[ -z "$HOSTCC" ] && HOSTCC=gcc
+[ -z "$HOSTCC" ] && HOSTCC=cc