summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2015-11-30 17:52:15 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2015-11-30 17:52:15 +0000
commit9f09128cb1a46e72ae8d8d5998229f1fb5ab8e1c (patch)
tree6010dfd6e607b4aa5b806bacf5e3367226235faa /configure
parent73bea8ab25859ca8a3e43c008087dd34a9d0b945 (diff)
downloads6-linux-init-9f09128cb1a46e72ae8d8d5998229f1fb5ab8e1c.tar.xz
Easier CROSS_COMPILE support in configure
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure5
1 files changed, 3 insertions, 2 deletions
diff --git a/configure b/configure
index 1f9b16e..1fa12db 100755
--- a/configure
+++ b/configure
@@ -120,7 +120,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"
@@ -253,6 +253,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
@@ -362,7 +363,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