summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--autoconf/configure.ac8
-rwxr-xr-xconfigure18
-rw-r--r--include/llvm/Config/config.h.cmake3
-rw-r--r--include/llvm/Config/config.h.in3
-rw-r--r--include/llvm/Config/llvm-config.h.cmake3
-rw-r--r--include/llvm/Config/llvm-config.h.in3
-rw-r--r--include/llvm/Support/Host.h8
-rw-r--r--lib/Support/Unix/Host.inc8
-rw-r--r--lib/Support/Windows/Host.inc8
9 files changed, 61 insertions, 1 deletions
diff --git a/autoconf/configure.ac b/autoconf/configure.ac
index 2da5a19aeb..2fc17f86af 100644
--- a/autoconf/configure.ac
+++ b/autoconf/configure.ac
@@ -480,6 +480,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]))
diff --git a/configure b/configure
index 46bb6110f7..82fde0127e 100755
--- a/configure
+++ b/configure
@@ -1470,6 +1470,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
@@ -4135,6 +4137,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; }
@@ -10638,7 +10654,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 10641 "configure"
+#line 10657 "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 2e724af328..6967c8af16 100644
--- a/include/llvm/Config/config.h.cmake
+++ b/include/llvm/Config/config.h.cmake
@@ -507,6 +507,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 e262e6ca32..d61e099c47 100644
--- a/include/llvm/Config/config.h.in
+++ b/include/llvm/Config/config.h.in
@@ -542,6 +542,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 8a30abf8a7..a1101d3604 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 4e066e8421..04c1664d3e 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 9a17fb89e6..637d8139e7 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 e2a1c64c70..606e95707d 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() != "";
+}