diff options
author | Abdoulaye Walsimou Gaye <awg@embtoolkit.org> | 2013-05-05 17:14:02 +0200 |
---|---|---|
committer | Abdoulaye Walsimou Gaye <awg@embtoolkit.org> | 2013-05-05 17:14:02 +0200 |
commit | 32e1613ce8f734d858831c228c36da70d783c0cd (patch) | |
tree | c1027539beb1cd7312e65b41032927cc89fd69ee | |
parent | b8b4ff534dc61e271ccf3a68ec6c87d9eb7da4ad (diff) | |
download | llvm-32e1613ce8f734d858831c228c36da70d783c0cd.tar.gz llvm-32e1613ce8f734d858831c228c36da70d783c0cd.tar.bz2 llvm-32e1613ce8f734d858831c228c36da70d783c0cd.tar.xz |
[Embtk] give ability to specify default FPU to use at configure time
Signed-off-by: Abdoulaye Walsimou Gaye <awg@embtoolkit.org>
-rw-r--r-- | autoconf/configure.ac | 8 | ||||
-rwxr-xr-x | configure | 18 | ||||
-rw-r--r-- | include/llvm/Config/config.h.cmake | 3 | ||||
-rw-r--r-- | include/llvm/Config/config.h.in | 3 | ||||
-rw-r--r-- | include/llvm/Config/llvm-config.h.cmake | 3 | ||||
-rw-r--r-- | include/llvm/Config/llvm-config.h.in | 3 | ||||
-rw-r--r-- | include/llvm/Support/Host.h | 8 | ||||
-rw-r--r-- | lib/Support/Unix/Host.inc | 8 | ||||
-rw-r--r-- | lib/Support/Windows/Host.inc | 8 |
9 files changed, 61 insertions, 1 deletions
diff --git a/autoconf/configure.ac b/autoconf/configure.ac index 39e1c558b5..c470de7148 100644 --- a/autoconf/configure.ac +++ b/autoconf/configure.ac @@ -460,6 +460,14 @@ AC_ARG_WITH(default-float, AC_DEFINE_UNQUOTED([LLVM_DEFAULT_TARGET_FLOAT],"$with_default_float", [Default float abi to use to all compiler invocations.]) +dnl Default FPU to use to all compiler invocations, in case of hard float +AC_ARG_WITH(default-float, + AS_HELP_STRING([--with-default-fpu], + [Default FPU to use to all compiler invocations, in case of hard float.]),, + with_default_fpu="") +AC_DEFINE_UNQUOTED([LLVM_DEFAULT_TARGET_FPU],"$with_default_fpu", + [Default FPU to use to all compiler invocations, in case of hard float.]) + dnl Check for the endianness of the target AC_C_BIGENDIAN(AC_SUBST([ENDIAN],[big]),AC_SUBST([ENDIAN],[little])) @@ -1459,6 +1459,8 @@ Optional Packages: invocations. --with-default-float Default float abi to use to all compiler invocations. + --with-default-fpu Default FPU to use to all compiler invocations, in + case of hard float. --with-optimize-option Select the compiler options to use for optimized builds --with-extra-options Specify additional options to compile LLVM with @@ -4100,6 +4102,20 @@ _ACEOF +# Check whether --with-default-float was given. +if test "${with_default_float+set}" = set; then + withval=$with_default_float; +else + with_default_fpu="" +fi + + +cat >>confdefs.h <<_ACEOF +#define LLVM_DEFAULT_TARGET_FPU "$with_default_fpu" +_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; } @@ -10558,7 +10574,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<EOF -#line 10561 "configure" +#line 10577 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/include/llvm/Config/config.h.cmake b/include/llvm/Config/config.h.cmake index c6c5dd9b45..4e33251ca4 100644 --- a/include/llvm/Config/config.h.cmake +++ b/include/llvm/Config/config.h.cmake @@ -573,6 +573,9 @@ /* Default float abi to use to all compiler invocations. */ #cmakedefine LLVM_DEFAULT_TARGET_FLOAT "${LLVM_DEFAULT_TARGET_FLOAT}" +/* Default FPU to use to all compiler invocations, in case of hard float. */ +#cmakedefine LLVM_DEFAULT_TARGET_FPU "${LLVM_DEFAULT_TARGET_FPU}" + /* Default cpu (-mcpu=cpu) to use to all compiler invocations. */ #cmakedefine LLVM_DEFAULT_TARGET_MCPU "${LLVM_DEFAULT_TARGET_MCPU}" diff --git a/include/llvm/Config/config.h.in b/include/llvm/Config/config.h.in index 9e92259122..42c6b1fe35 100644 --- a/include/llvm/Config/config.h.in +++ b/include/llvm/Config/config.h.in @@ -578,6 +578,9 @@ /* Default float abi to use to all compiler invocations. */ #undef LLVM_DEFAULT_TARGET_FLOAT +/* Default FPU to use to all compiler invocations, in case of hard float. */ +#undef LLVM_DEFAULT_TARGET_FPU + /* Default cpu (-mcpu=cpu) to use to all compiler invocations. */ #undef LLVM_DEFAULT_TARGET_MCPU diff --git a/include/llvm/Config/llvm-config.h.cmake b/include/llvm/Config/llvm-config.h.cmake index 20e67ba0fa..c2c285b21d 100644 --- a/include/llvm/Config/llvm-config.h.cmake +++ b/include/llvm/Config/llvm-config.h.cmake @@ -28,6 +28,9 @@ /* Default float abi to use to all compiler invocations. */ #cmakedefine LLVM_DEFAULT_TARGET_FLOAT "${LLVM_DEFAULT_TARGET_FLOAT}" +/* Default FPU to use to all compiler invocations, in case of hard float. */ +#cmakedefine LLVM_DEFAULT_TARGET_FPU "${LLVM_DEFAULT_TARGET_FPU}" + /* Default cpu (-mcpu=cpu) to use to all compiler invocations. */ #cmakedefine LLVM_DEFAULT_TARGET_MCPU "${LLVM_DEFAULT_TARGET_MCPU}" diff --git a/include/llvm/Config/llvm-config.h.in b/include/llvm/Config/llvm-config.h.in index 09d54cc521..5bb7398e7a 100644 --- a/include/llvm/Config/llvm-config.h.in +++ b/include/llvm/Config/llvm-config.h.in @@ -28,6 +28,9 @@ /* Default float abi to use to all compiler invocations. */ #undef LLVM_DEFAULT_TARGET_FLOAT +/* Default FPU to use to all compiler invocations, in case of hard float. */ +#undef LLVM_DEFAULT_TARGET_FPU + /* Default cpu (-mcpu=cpu) to use to all compiler invocations. */ #undef LLVM_DEFAULT_TARGET_MCPU diff --git a/include/llvm/Support/Host.h b/include/llvm/Support/Host.h index 6cca3b2acd..45566302d1 100644 --- a/include/llvm/Support/Host.h +++ b/include/llvm/Support/Host.h @@ -63,6 +63,14 @@ namespace sys { /// otherwise. bool hasDefaultTargetFloat(); + /// getDefaultTargetFpu() - Return the default target FPU for which the + /// compiler is configured to generate code for, or "" if empty. + std::string getDefaultTargetFpu(); + + /// hasDefaultTargetFpu() - Return true if the compiler was configured to + /// generate by default code for a given FPU and false otherwise. + bool hasDefaultTargetFpu(); + /// getProcessTriple() - Return an appropriate target triple for generating /// code to be loaded into the current process, e.g. when using the JIT. std::string getProcessTriple(); diff --git a/lib/Support/Unix/Host.inc b/lib/Support/Unix/Host.inc index 261a495c1b..028a0c78d7 100644 --- a/lib/Support/Unix/Host.inc +++ b/lib/Support/Unix/Host.inc @@ -77,3 +77,11 @@ std::string sys::getDefaultTargetFloat() { bool sys::hasDefaultTargetFloat() { return getDefaultTargetFloat() != ""; } + +std::string sys::getDefaultTargetFpu() { + return LLVM_DEFAULT_TARGET_FPU; +} + +bool sys::hasDefaultTargetFpu() { + return getDefaultTargetFpu() != ""; +} diff --git a/lib/Support/Windows/Host.inc b/lib/Support/Windows/Host.inc index 752c4eb28b..7552d7d166 100644 --- a/lib/Support/Windows/Host.inc +++ b/lib/Support/Windows/Host.inc @@ -36,3 +36,11 @@ std::string sys::getDefaultTargetFloat() { bool sys::hasDefaultTargetFloat() { return getDefaultTargetFloat() != ""; } + +std::string sys::getDefaultTargetFpu() { + return LLVM_DEFAULT_TARGET_FPU; +} + +bool sys::hasDefaultTargetFpu() { + return getDefaultTargetFpu() != ""; +} |