summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2015-11-30 18:07:38 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2015-11-30 18:07:38 +0000
commitbb5496d546546c98b8b808253aaf74fa49695949 (patch)
tree6e1dd002f0941ab8f7cc9f2b1a7aa34024b2f04b
parent7d4b200d6533538512bd5c50ddbce00e4a20f039 (diff)
downloads6-rc-bb5496d546546c98b8b808253aaf74fa49695949.tar.xz
Easier CROSS_COMPILE support in configure
-rwxr-xr-xconfigure5
1 files changed, 3 insertions, 2 deletions
diff --git a/configure b/configure
index 4251f41..2b9a886 100755
--- a/configure
+++ b/configure
@@ -121,7 +121,7 @@ tryldflag () {
# Actual script
-CC_AUTO="$CC"
+CC_AUTO=
CFLAGS_AUTO="$CFLAGS"
CPPFLAGS_AUTO="-D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700 -O2 $CPPFLAGS"
LDFLAGS_AUTO="$LDFLAGS"
@@ -256,6 +256,7 @@ fi
# Find a C compiler to use
echo "checking for C compiler..."
+trycc ${cross}${CC}
trycc ${cross}gcc
trycc ${cross}c99
trycc ${cross}cc
@@ -365,7 +366,7 @@ SYSCLOCK_LIB := ${sysclock_lib}
TAINNOW_LIB := ${tainnow_lib}
UTIL_LIB := ${util_lib}
-CC := $CC_AUTO
+CC := ${CC_AUTO##${cross}}
CFLAGS := $CFLAGS_AUTO
CPPFLAGS := $CPPFLAGS_AUTO
LDFLAGS := $LDFLAGS_AUTO