From 1da4cf10b52b888ccb9ae43c7d523d075b509331 Mon Sep 17 00:00:00 2001 From: Abdoulaye Walsimou Gaye Date: Tue, 7 May 2013 22:01:37 +0200 Subject: [Embtk]: Give ability to specify default target ABI at configure time Signed-off-by: Abdoulaye Walsimou Gaye --- autoconf/configure.ac | 8 ++++++++ configure | 18 +++++++++++++++++- include/llvm/Config/config.h.cmake | 3 +++ include/llvm/Config/config.h.in | 3 +++ include/llvm/Config/llvm-config.h.cmake | 3 +++ include/llvm/Config/llvm-config.h.in | 3 +++ include/llvm/Support/Host.h | 8 ++++++++ lib/Support/Unix/Host.inc | 8 ++++++++ lib/Support/Windows/Host.inc | 8 ++++++++ 9 files changed, 61 insertions(+), 1 deletion(-) diff --git a/autoconf/configure.ac b/autoconf/configure.ac index 7f62a66ff2..6a9718844d 100644 --- a/autoconf/configure.ac +++ b/autoconf/configure.ac @@ -503,6 +503,14 @@ fi AC_DEFINE_UNQUOTED([LLVM_DEFAULT_TARGET_HASHSTYLE],"$with_default_hash_style", [Default hash-style to use to all linker invocations.]) +dnl Default cpu (-mabi=abi) to use to all compiler invocations +AC_ARG_WITH(default-abi, + AS_HELP_STRING([--with-default-abi], + [Add by default -mabi=abi (if --with-default-abi=abi) to all compiler invocations.]),, + with_default_abi="") +AC_DEFINE_UNQUOTED([LLVM_DEFAULT_TARGET_ABI],"$with_default_abi", + [Add by default -mabi=abi to all compiler invocations.]) + dnl Check for the endianness of the target AC_C_BIGENDIAN(AC_SUBST([ENDIAN],[big]),AC_SUBST([ENDIAN],[little])) diff --git a/configure b/configure index ec4fab2de9..3d65fb18b3 100755 --- a/configure +++ b/configure @@ -1474,6 +1474,8 @@ Optional Packages: case of hard float. Default hash-style to use to all linker invocations: gnu + --with-default-abi Add by default -mabi=abi (if --with-default-abi=abi) + to all compiler invocations. --with-optimize-option Select the compiler options to use for optimized builds --with-extra-options Specify additional options to compile LLVM with @@ -4179,6 +4181,20 @@ _ACEOF +# Check whether --with-default-abi was given. +if test "${with_default_abi+set}" = set; then + withval=$with_default_abi; +else + with_default_abi="" +fi + + +cat >>confdefs.h <<_ACEOF +#define LLVM_DEFAULT_TARGET_ABI "$with_default_abi" +_ACEOF + + + { echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } @@ -10682,7 +10698,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <