update aclocal. detect the correct tool versions for llvm-based host toolchains.

git-svn-id: https://svn.aros.org/svn/aros/trunk/AROS@56250 fb15a70f-31f2-0310-bbcc-cdcc74a49acc
This commit is contained in:
NicJA 2019-04-14 18:20:14 +00:00
parent f5725c799b
commit 477723711b
4 changed files with 509 additions and 141 deletions

View File

@ -37,17 +37,24 @@ AC_DEFUN([AROS_BUILDCMD],
fi
fi])
dnl AROS_TOOL_CCPATH(var,prog)
dnl AROS_TOOL_CCPATH(var,prog,override)
dnl This will first look for the tool in the CC path and then in the
dnl normal path (CC path only supported for gcc at the moment)
AC_DEFUN([AROS_TOOL_CCPATH],
[if test "$GCC" = "yes"; then
aros_gcc_[$2]=`$CC -print-prog-name=[$2]`
[
if test "$3" = ""; then
ac_tool_[$2]=[$2]
else
ac_tool_[$2]=[$3]
fi
if test "$GCC" = "yes"; then
aros_gcc_[$2]=`$CC -print-prog-name=$ac_tool_[$2]`
AC_PATH_PROG([$1], [`basename $aros_gcc_[$2]`], , [`dirname $aros_gcc_[$2]`])
fi
if test "$[$1]" = ""; then
AC_PATH_PROG([$1],[$2])
fi])
AC_PATH_PROGS([$1],[$ac_tool_[$2]])
fi
])
dnl AROS_TOOL_TARGET(var,prog,override)
dnl This is effectively the same as AROS_PROG, but adds the appropriate

11
aclocal.m4 vendored
View File

@ -1,6 +1,6 @@
# generated automatically by aclocal 1.13.4 -*- Autoconf -*-
# generated automatically by aclocal 1.15.1 -*- Autoconf -*-
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
# Copyright (C) 1996-2017 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -198,7 +198,7 @@ int main(int argc, char *argv[])
rm -f conf.sdltest
])
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
# Copyright (C) 1999-2017 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -231,8 +231,9 @@ AC_DEFUN([AM_PATH_PYTHON],
[
dnl Find a Python interpreter. Python versions prior to 2.0 are not
dnl supported. (2.0 was released on October 16, 2000).
dnl FIXME: Remove the need to hard-code Python versions here.
m4_define_default([_AM_PYTHON_INTERPRETER_LIST],
[python python2 python3 python3.3 python3.2 python3.1 python3.0 python2.7 dnl
[python python2 python3 python3.8 python3.7 python3.6 python3.5 python3.4 python3.3 python3.2 python3.1 python3.0 python2.7 dnl
python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0])
AC_ARG_VAR([PYTHON], [the Python interpreter])
@ -433,7 +434,7 @@ for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[[i]]
sys.exit(sys.hexversion < minverhex)"
AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])])
# Copyright (C) 2001-2013 Free Software Foundation, Inc.
# Copyright (C) 2001-2017 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,

500
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -131,16 +131,19 @@ fi
IS_SUN_COMPILER=`echo $HOST_COMPILER_VERSION | grep -i -c -E 'Sun C\+\+'`
if test "$IS_SUN_COMPILER" -ne "0"; then
HOST_TOOLCHAIN_PREFIX=
HOST_TOOLCHAIN_SUFFIX=
HOST_TOOLCHAIN_FAMILY=sun
fi
IS_LLVM_COMPILER=`echo $HOST_COMPILER_VERSION | grep -i -c -E 'LLVM'`
IS_LLVM_COMPILER=`echo $HOST_COMPILER_VERSION | grep -i -c -E 'LLVM|clang'`
if test "$IS_LLVM_COMPILER" -ne "0"; then
HOST_TOOLCHAIN_PREFIX=llvm-
HOST_TOOLCHAIN_SUFFIX="`echo $CC | sed -e \"s|clang||g\"`"
HOST_TOOLCHAIN_FAMILY=llvm
fi
IS_GNU_COMPILER=`echo $HOST_COMPILER_VERSION | grep -i -c -E 'gcc'`
if test "$IS_GNU_COMPILER" -ne "0"; then
HOST_TOOLCHAIN_PREFIX=
HOST_TOOLCHAIN_SUFFIX=
HOST_TOOLCHAIN_FAMILY=gnu
fi
if test x"$HOST_TOOLCHAIN_FAMILY" = "x"; then
@ -160,7 +163,11 @@ aros_build_host=$host
aros_host_cpp="$CPP"
aros_host_cc="$CC"
aros_host_cxx="$CXX"
AROS_TOOL_CCPATH(aros_host_ld,ld)
base_ld_name=["${HOST_TOOLCHAIN_PREFIX}ld${HOST_TOOLCHAIN_SUFFIX}"]
if test "$HOST_TOOLCHAIN_FAMILY" = "llvm"; then
base_ld_name=["ld.lld${HOST_TOOLCHAIN_SUFFIX}"]
fi
AROS_TOOL_CCPATH(aros_host_ld,ld,$base_ld_name)
AROS_REQUIRED(ld,$aros_host_ld)
aros_host_make="make"
aros_host_cflags="$CFLAGS"
@ -491,9 +498,11 @@ re-running configure])])
;;
esac
AROS_PROG(aros_host_ar,[ar],[cr])
base_ar_name=${HOST_TOOLCHAIN_PREFIX}ar${HOST_TOOLCHAIN_SUFFIX}
AROS_PROG(aros_host_ar,$base_ar_name,[cr])
AROS_REQUIRED(ar,$aros_host_ar)
AROS_PROG(aros_host_ranlib,ranlib)
base_ranlib_name=${HOST_TOOLCHAIN_PREFIX}ranlib${HOST_TOOLCHAIN_SUFFIX}
AROS_PROG(aros_host_ranlib,$base_ranlib_name)
AROS_REQUIRED(ranlib,$aros_host_ranlib)
AROS_PROG(aros_host_strip,strip)
AROS_REQUIRED(strip,$aros_host_strip)
@ -1359,12 +1368,12 @@ case "$target_os" in
aros_kernel_cflags="-m64"
aros_kernel_ldflags="-m64"
aros_nominal_depth=8
aros_kernel_ar="ar"
aros_kernel_rs="$AR"
aros_kernel_ar_flags="-cr"
aros_kernel_ld="ld"
aros_kernel_as="as"
aros_kernel_ranlib="ranlib"
aros_kernel_nm="nm"
aros_kernel_ld="$LD"
aros_kernel_as="$AS"
aros_kernel_ranlib="$RANLIB"
aros_kernel_nm="$NM"
aros_kernel_strip="strip"
kernel_tool_prefix="i686-apple-darwin10-"
;;
@ -1376,12 +1385,12 @@ case "$target_os" in
aros_macosx_version="10.0"
aros_nominal_depth=8
gcc_target_cpu="ppc"
aros_kernel_ar="ar"
aros_kernel_rs="$AR"
aros_kernel_ar_flags="-cr"
aros_kernel_ld="ld -arch ppc"
aros_kernel_as="as -arch ppc"
aros_kernel_ranlib="ranlib -arch ppc"
aros_kernel_nm="nm -arch ppc"
aros_kernel_ld="$LD -arch ppc"
aros_kernel_as="$AS -arch ppc"
aros_kernel_ranlib="$RANLIB -arch ppc"
aros_kernel_nm="$NM -arch ppc"
aros_kernel_strip="strip -arch ppc"
kernel_tool_prefix="powerpc-apple-darwin10-"
;;
@ -1393,10 +1402,10 @@ case "$target_os" in
aros_c_libs="$aros_c_libs -laeabi"
aros_nominal_depth=8
gcc_target_cpu="arm"
aros_kernel_ar="ar"
aros_kernel_rs="$AR"
aros_kernel_ar_flags="-cr"
aros_kernel_ld="ld -arch arm"
aros_kernel_ranlib="ranlib -arch arm"
aros_kernel_ld="$LD -arch arm"
aros_kernel_ranlib="$RANLIB -arch arm"
kernel_tool_prefix="arm-apple-darwin10-"
export PATH="$aros_xcode_path/Platforms/$aros_ios_platform.platform/Developer/usr/bin:$PATH"
;;
@ -2309,14 +2318,35 @@ else
if test "x$aros_kernel_cxx" != "x" ; then
AROS_REQUIRED(cxx,$aros_kernel_cxx)
fi
if test "x$aros_kernel_ld" = "x"; then
aros_kernel_ld=$aros_host_ld
fi
AROS_TOOL_KERNEL(aros_kernel_ld,ld,$aros_kernel_ld)
AROS_REQUIRED(ld,$aros_kernel_ld)
if test "x$aros_kernel_as" = "x"; then
aros_kernel_as=$aros_host_as
if test "x$aros_kernel_as" = "x"; then
aros_kernel_as=${HOST_TOOLCHAIN_PREFIX}as${HOST_TOOLCHAIN_SUFFIX}
fi
fi
AROS_TOOL_KERNEL(aros_kernel_as,as,$aros_kernel_as)
AROS_REQUIRED(as,$aros_kernel_as)
if test "x$aros_kernel_ar" = "x"; then
aros_kernel_ar=$aros_host_ar
fi
AROS_TOOL_KERNEL(aros_kernel_ar,ar,$aros_kernel_ar)
AROS_REQUIRED(ar,$aros_kernel_ar)
if test "x$aros_kernel_ranlib" = "x"; then
aros_kernel_ranlib=$aros_host_ranlib
fi
AROS_TOOL_KERNEL(aros_kernel_ranlib,ranlib,$aros_kernel_ranlib)
AROS_REQUIRED(ranlib,$aros_kernel_ranlib)
if test "x$aros_kernel_nm" = "x"; then
aros_kernel_nm=$aros_host_nm
if test "x$aros_kernel_nm" = "x"; then
aros_kernel_nm=${HOST_TOOLCHAIN_PREFIX}nm${HOST_TOOLCHAIN_SUFFIX}
fi
fi
AROS_TOOL_KERNEL(aros_kernel_nm,nm,$aros_kernel_nm)
AROS_REQUIRED(nm,$aros_kernel_nm)
AROS_TOOL_KERNEL(aros_kernel_strip,strip,$aros_kernel_strip)
@ -2325,7 +2355,19 @@ else
# Objcopy and objdump are not required for the kernel
# toolchain on many architectures.
# So we'll look for them, but not make them strictly required.
if test "x$aros_kernel_objcopy" = "x"; then
aros_kernel_objcopy=$aros_host_objcopy
if test "x$aros_kernel_objcopy" = "x"; then
aros_kernel_objcopy=${HOST_TOOLCHAIN_PREFIX}objcopy${HOST_TOOLCHAIN_SUFFIX}
fi
fi
AROS_TOOL_KERNEL(aros_kernel_objcopy,objcopy,$aros_kernel_objcopy)
if test "x$aros_kernel_objdump" = "x"; then
aros_kernel_objdump=$aros_host_objdump
if test "x$aros_kernel_objdump" = "x"; then
aros_kernel_objdump=${HOST_TOOLCHAIN_PREFIX}objdump${HOST_TOOLCHAIN_SUFFIX}
fi
fi
AROS_TOOL_KERNEL(aros_kernel_objdump,objdump,$aros_kernel_objdump)
if test "x${crosstools}" != "xyes" ; then
AROS_REQUIRED(objcopy,$aros_kernel_objcopy)
@ -2518,7 +2560,7 @@ AC_HELP_STRING([--enable-includes=dir],[Alternative system include directory]),
if test "x$aros_target_incl" = "xno"; then
if test "x$test_kernel_cc" != "xno"; then
aros_target_incl=`$aros_kernel_cc -print-sysroot`/`$aros_kernel_cc --print-sysroot-headers-suffix 2>/dev/null || echo usr/include`
aros_target_incl=`$aros_kernel_cc -print-sysroot 2>/dev/null`/`$aros_kernel_cc --print-sysroot-headers-suffix 2>/dev/null || echo usr/include`
else
aros_target_incl=
fi