From a916c810ba2499b7d4963d51a4408b3c665488c6 Mon Sep 17 00:00:00 2001 From: NicJA Date: Tue, 3 Feb 2015 22:33:57 +0000 Subject: [PATCH] corrections to raspi cpu configuration. use sysroot for external tool chains. git-svn-id: https://svn.aros.org/svn/aros/trunk/AROS@50002 fb15a70f-31f2-0310-bbcc-cdcc74a49acc --- configure | 29 ++++++++++++----------------- configure.in | 25 ++++++++++--------------- 2 files changed, 22 insertions(+), 32 deletions(-) diff --git a/configure b/configure index 5a039d55a5..eb93939bf9 100755 --- a/configure +++ b/configure @@ -8332,17 +8332,6 @@ case "$target_os" in gcc_default_cpu="armv6" gcc_default_cpu_tune="arm1176jzf-s" - case "$target_cpu" in - *armhf*) - gcc_default_float_abi="hard" - ;; - *arm*) - gcc_default_float_abi="softfp" - ;; - *) - as_fn_error $? "\"Unknown CPU for RasPi $target_cpu\"" "$LINENO" 5 - ;; - esac aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Darm" aros_config_cflags="$aros_config_cflags -marm -Wno-error -fno-asynchronous-unwind-tables -fno-exceptions" @@ -8559,8 +8548,12 @@ if test "${with_aros_toolchain+set}" = set; then : crosstools_guess="no" fi -if test "$aros_tool_prefix" = "yes" ; then - aros_tool_prefix=$aros_target_cpu-aros- +if test "$aros_tool_prefix" != "no" ; then + if test "$aros_tool_prefix" = "yes" ; then + aros_tool_prefix=$aros_target_cpu-aros- + fi + aros_config_cflags="--sysroot $AROS_BUILDDIR_UNIX/bin/${aros_target_arch}-${aros_target_cpu}${aros_target_suffix}/AROS/Development $aros_config_cflags" + aros_config_ldflags="--sysroot $AROS_BUILDDIR_UNIX/bin/${aros_target_arch}-${aros_target_cpu}${aros_target_suffix}/AROS/Development $aros_config_ldflags" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $aros_tool_prefix" >&5 $as_echo "$aros_tool_prefix" >&6; } @@ -8602,8 +8595,6 @@ if test "x$aros_toolchain_install" = "x"; then else AROS_CROSSTOOLSDIR="$aros_toolchain_install" PATH="$AROS_CROSSTOOLSDIR:$PATH" - aros_config_ldflags="$aros_config_ldflags -L$AROS_BUILDDIR_UNIX/bin/${aros_target_arch}-${aros_target_cpu}${aros_target_suffix}/AROS/Development/lib" - aros_config_cflags="$aros_config_cflags -isystem$AROS_BUILDDIR_UNIX/bin/${aros_target_arch}-${aros_target_cpu}${aros_target_suffix}/AROS/Development/include" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AROS_CROSSTOOLSDIR" >&5 $as_echo "$AROS_CROSSTOOLSDIR" >&6; } @@ -8699,7 +8690,7 @@ case "$aros_target_cpu" in *x86_64*) spec_obj_format="%{!m32:-m elf_x86_64} %{m32:-m elf_i386}" ;; -arm) +arm*) if test "$gcc_default_cpu" = ""; then gcc_default_cpu="armv6" fi @@ -8707,7 +8698,11 @@ arm) gcc_default_fpu="vfp" fi if test "$gcc_default_float_abi" = ""; then - gcc_default_float_abi="softfp" + if test "$target_cpu" = "armhf"; then + gcc_default_float_abi="hard" + else + gcc_default_float_abi="softfp" + fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking Which minimum CPU to use" >&5 diff --git a/configure.in b/configure.in index a066b53983..862f6ad08d 100644 --- a/configure.in +++ b/configure.in @@ -1314,17 +1314,6 @@ case "$target_os" in gcc_default_cpu="armv6" gcc_default_cpu_tune="arm1176jzf-s" - case "$target_cpu" in - *armhf*) - gcc_default_float_abi="hard" - ;; - *arm*) - gcc_default_float_abi="softfp" - ;; - *) - AC_MSG_ERROR("Unknown CPU for RasPi $target_cpu") - ;; - esac aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Darm" aros_config_cflags="$aros_config_cflags -marm -Wno-error -fno-asynchronous-unwind-tables -fno-exceptions" @@ -1545,8 +1534,10 @@ if test "x$aros_toolchain_install" = "x"; then else AROS_CROSSTOOLSDIR="$aros_toolchain_install" PATH="$AROS_CROSSTOOLSDIR:$PATH" - aros_config_ldflags="$aros_config_ldflags -L$AROS_BUILDDIR_UNIX/bin/${aros_target_arch}-${aros_target_cpu}${aros_target_suffix}/AROS/Development/lib" - aros_config_cflags="$aros_config_cflags -isystem$AROS_BUILDDIR_UNIX/bin/${aros_target_arch}-${aros_target_cpu}${aros_target_suffix}/AROS/Development/include" + if test "$aros_tool_prefix" = "yes" ; then + aros_config_cflags="--sysroot $AROS_BUILDDIR_UNIX/bin/${aros_target_arch}-${aros_target_cpu}${aros_target_suffix}/AROS/Development $aros_config_cflags" + aros_config_ldflags="--sysroot $AROS_BUILDDIR_UNIX/bin/${aros_target_arch}-${aros_target_cpu}${aros_target_suffix}/AROS/Development $aros_config_ldflags" + fi fi AC_MSG_RESULT($AROS_CROSSTOOLSDIR) @@ -1607,7 +1598,7 @@ case "$aros_target_cpu" in dnl x86_64 can build 32 or 64bit code spec_obj_format="%{!m32:-m elf_x86_64} %{m32:-m elf_i386}" ;; -arm) +arm*) dnl ARM defaults are: armv6 + vfp (unless overriden in per-target section above) if test "$gcc_default_cpu" = ""; then gcc_default_cpu="armv6" @@ -1616,7 +1607,11 @@ arm) gcc_default_fpu="vfp" fi if test "$gcc_default_float_abi" = ""; then - gcc_default_float_abi="softfp" + if test "$target_cpu" = "armhf"; then + gcc_default_float_abi="hard" + else + gcc_default_float_abi="softfp" + fi fi AC_MSG_CHECKING([Which minimum CPU to use]) -- 2.11.4.GIT