From ef78641ba628e3f32de100e523070fdffa674b41 Mon Sep 17 00:00:00 2001 From: NicJA Date: Wed, 11 Feb 2015 13:48:29 +0000 Subject: [PATCH] allow specifying a specific binutils version to use git-svn-id: https://svn.aros.org/svn/aros/trunk/AROS@50067 fb15a70f-31f2-0310-bbcc-cdcc74a49acc --- config/target.cfg.in | 4 +++- configure | 30 +++++++++++++++++++++++++++++- configure.in | 18 +++++++++++++++++- 3 files changed, 49 insertions(+), 3 deletions(-) diff --git a/config/target.cfg.in b/config/target.cfg.in index 9967177825..8f21d2c400 100644 --- a/config/target.cfg.in +++ b/config/target.cfg.in @@ -11,10 +11,12 @@ FAMILY := @aros_target_family@ FLAVOUR := @aros_flavour@ SHARED_MOD := @aros_shared_default@ +TARGET_BINUTILS_VER := @target_binutils_version@ +TARGET_GCC_VER := @target_gcc_version@ + TARGET_CPP := @aros_target_cpp@ KERNEL_CPP := @aros_kernel_cpp@ TARGET_CC := @aros_cc_pre@ @aros_target_cc@ -TARGET_GCC_VER := @target_gcc_version@ KERNEL_CC := @aros_kernel_cc@ TARGET_CXX := @aros_target_cxx@ TARGET_AS := @aros_target_as@ diff --git a/configure b/configure index 1b0e785bbd..4fa494f965 100755 --- a/configure +++ b/configure @@ -624,6 +624,7 @@ ac_subst_vars='LTLIBOBJS aros_usb30_code java_target objc_target +target_binutils_version gcc_target_cpu ignore_undefined_symbols aros_modules_debug @@ -1640,6 +1641,8 @@ Optional Packages: name --with-aros-toolchain-install=DIR Where to install or search for cross tools binaries + --with-binutils-version=VERSION + Use gcc-VERSION for building AROS --with-gcc-version=VERSION Use gcc-VERSION for building AROS --with-cpu= Specify minumum CPU (default=$gcc_default_cpu). @@ -2754,6 +2757,10 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac +# Default version of gnu tools to use +default_gcc_version=4.6.4 +default_binutils_version=2.32.2 + # The AROS target is slightly different to the normal GNU style # format. We don't have the middle part, and we reverse the order # of the $(CPU) and $(OS) bits. @@ -8600,6 +8607,26 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AROS_CROSSTOOLSDIR" >&5 $as_echo "$AROS_CROSSTOOLSDIR" >&6; } +#----------------------------------------------------------------------------- +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what specific target binutils version to use" >&5 +$as_echo_n "checking what specific target binutils version to use... " >&6; } + +# Check whether --with-gcc-version was given. +if test "${with_gcc_version+set}" = set; then : + withval=$with_gcc_version; use_binutils_version="$withval" +else + use_binutils_version="" +fi + +if test "$use_binutils_version" = ""; then + target_binutils_version="$(default_binutils_version)" +else + target_gcc_version="$use_binutils_version" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $target_binutils_version" >&5 +$as_echo "$target_binutils_version" >&6; } + + # Helper to identify gcc version @@ -8641,7 +8668,7 @@ $as_echo "$ax_cv_gcc_version" >&6; } fi fi if test "$use_gcc_version" = ""; then - target_gcc_version="4.6.4" + target_gcc_version="$(default_gcc_version)" fi else target_gcc_version="$use_gcc_version" @@ -14612,6 +14639,7 @@ fi + #ObjC compiler related diff --git a/configure.in b/configure.in index daa91797a0..e8e453e984 100644 --- a/configure.in +++ b/configure.in @@ -22,6 +22,10 @@ AC_CONFIG_AUX_DIR(scripts/autoconf) # Note that what we call a target, Autoconf calls a host. AC_CANONICAL_HOST +# Default version of gnu tools to use +default_gcc_version=4.6.4 +default_binutils_version=2.32.2 + # The AROS target is slightly different to the normal GNU style # format. We don't have the middle part, and we reverse the order # of the $(CPU) and $(OS) bits. @@ -1541,6 +1545,17 @@ else fi AC_MSG_RESULT($AROS_CROSSTOOLSDIR) +#----------------------------------------------------------------------------- +AC_MSG_CHECKING([what specific target binutils version to use]) +AC_ARG_WITH(gcc-version,AC_HELP_STRING([--with-binutils-version=VERSION],[Use gcc-VERSION for building AROS]),use_binutils_version="$withval",use_binutils_version="") +if test "$use_binutils_version" = ""; then + target_binutils_version="$(default_binutils_version)" +else + target_gcc_version="$use_binutils_version" +fi +AC_MSG_RESULT($target_binutils_version) + + # Helper to identify gcc version AC_DEFUN([CROSS_GCC_VERSION], [ target_gcc_version="" @@ -1564,7 +1579,7 @@ if test "$use_gcc_version" = ""; then fi fi if test "$use_gcc_version" = ""; then - target_gcc_version="4.6.4" + target_gcc_version="$(default_gcc_version)" fi else target_gcc_version="$use_gcc_version" @@ -2763,6 +2778,7 @@ AC_SUBST(ignore_undefined_symbols) # C compiler related AC_SUBST(gcc_target_cpu) +AC_SUBST(target_binutils_version) AC_SUBST(target_gcc_version) #ObjC compiler related -- 2.11.4.GIT