Skip to content
Snippets Groups Projects
Commit 60a658d5 authored by Eric Vidal's avatar Eric Vidal :speech_balloon:
Browse files

fix cross compilation

parent b79b5700
No related branches found
No related tags found
No related merge requests found
#!/bin/sh
cd `dirname "$0"`
. package/info
usage () {
......@@ -368,7 +369,22 @@ else
cross=
fi
echo "checking for C compiler..."
trycc ${cross}${CC}
trycc ${CC}
if test -n "$CC_AUTO" ; then
b=`basename "$CC"`
adjust_cross=false
if test "$b" != "$CC" ; then
adjust_cross=true
echo "$0: warning: compiler $CC is declared with its own path. If it's not accessible via PATH, you will need to pass AR, RANLIB and STRIP make variables to the make invocation." 1>&2
fi
if test -n "$cross" ; then
if test "$b" = "${b##$cross}" ; then
echo "$0: warning: compiler $CC is declared as a cross-compiler for target $target but does not start with prefix ${cross}" 1>&2
elif $adjust_cross ; then
cross=`dirname "$CC"`/"$cross"
fi
fi
fi
trycc ${cross}gcc
trycc ${cross}clang
trycc ${cross}cc
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment