From c4397b2b02f58ad779af102c6e623f94a251648b Mon Sep 17 00:00:00 2001 From: grischka Date: Thu, 14 Feb 2013 21:15:56 +0100 Subject: configure: detect ARM variants Using gnu make's variable variable-names. --- configure | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'configure') diff --git a/configure b/configure index 8e6782c..6a7fae5 100755 --- a/configure +++ b/configure @@ -44,6 +44,7 @@ tcc_libpaths="" tcc_crtprefix="" tcc_elfinterp="" tcc_lddir= +confvars= cpu=`uname -m` @@ -304,6 +305,17 @@ if test -z "$cross_prefix" ; then tcc_lddir="lib64" fi + if test "$cpu" = "armv4l" ; then + if test "${triplet%eabihf}" != "$triplet" ; then + confvars="$confvars arm_eabihf" + elif test "${triplet%eabi}" != "$triplet" ; then + confvars="$confvars arm_eabi" + fi + if grep -s -q "^Features.* \(vfp\|iwmmxt\) " /proc/cpuinfo ; then + confvars="$confvars arm_vfp" + fi + fi + # multiarch_triplet=${libc_dir#*/} # multiarch_triplet=${multiarch_triplet%/} # tcc_lddir="${libc_dir%%/*}" @@ -311,6 +323,9 @@ if test -z "$cross_prefix" ; then # tcc_lddir="$tcc_lddir/$multiarch_triplet" # fi + if test -f "/lib/ld-uClibc.so.0" ; then + confvars="$confvars uClibc" + fi # gr: maybe for after the release: # tcc_elfinterp="$(ldd $CONFTEST | grep 'ld.*.so' | sed 's,\s*\(\S\+\).*,\1,')" # echo "elfinterp $tcc_elfinterp" @@ -424,6 +439,9 @@ fi echo "TARGETOS=$targetos" >> config.mak +for v in $confvars ; do + echo "CONFIG_$v=yes" >> config.mak +done if test "$noldl" = "yes" ; then echo "CONFIG_NOLDL=yes" >> config.mak fi -- cgit v1.3.1