diff options
-rw-r--r-- | autoconf/configure.ac | 15 | ||||
-rwxr-xr-x | configure | 30 | ||||
-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, 80 insertions, 1 deletions
diff --git a/autoconf/configure.ac b/autoconf/configure.ac index 2fc17f86af..7f62a66ff2 100644 --- a/autoconf/configure.ac +++ b/autoconf/configure.ac @@ -488,6 +488,21 @@ AC_ARG_WITH(default-float, AC_DEFINE_UNQUOTED([LLVM_DEFAULT_TARGET_FPU],"$with_default_fpu", [Default FPU to use to all compiler invocations, in case of hard float.]) +dnl Default hash-style to use to all linker invocations. +AC_ARG_WITH(default-hash-style, + AC_ARG_WITH(default-hash-style, + [Default hash-style to use to all linker invocations: gnu, sysv or both.]),, + with_default_hash_style="") +if test "x$with_default_hash_style" != "x" ; then + case "$with_default_hash_style" in + gnu|sysv|both);; + *) + AC_MSG_ERROR([Invalid --with-default-hash-style. Use "sysv", "gnu" or "both"]);; + esac +fi +AC_DEFINE_UNQUOTED([LLVM_DEFAULT_TARGET_HASHSTYLE],"$with_default_hash_style", + [Default hash-style to use to all linker invocations.]) + dnl Check for the endianness of the target AC_C_BIGENDIAN(AC_SUBST([ENDIAN],[big]),AC_SUBST([ENDIAN],[little])) @@ -1472,6 +1472,8 @@ Optional Packages: invocations. --with-default-fpu Default FPU to use to all compiler invocations, in case of hard float. + +Default hash-style to use to all linker invocations: gnu --with-optimize-option Select the compiler options to use for optimized builds --with-extra-options Specify additional options to compile LLVM with @@ -4151,6 +4153,32 @@ _ACEOF +# Check whether --with-default-hash-style was given. +if test "${with_default_hash_style+set}" = set; then + withval=$with_default_hash_style; sysv or both. +# Check whether --with-default-hash-style was given. +if test "${with_default_hash_style+set}" = set; then + withval=$with_default_hash_style; +fi + +fi + +if test "x$with_default_hash_style" != "x" ; then + case "$with_default_hash_style" in + gnu|sysv|both);; + *) + { { echo "$as_me:$LINENO: error: Invalid --with-default-hash-style. Use \"sysv\", \"gnu\" or \"both\"" >&5 +echo "$as_me: error: Invalid --with-default-hash-style. Use \"sysv\", \"gnu\" or \"both\"" >&2;} + { (exit 1); exit 1; }; };; + esac +fi + +cat >>confdefs.h <<_ACEOF +#define LLVM_DEFAULT_TARGET_HASHSTYLE "$with_default_hash_style" +_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; } @@ -10654,7 +10682,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<EOF -#line 10657 "configure" +#line 10685 "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 6967c8af16..ff1de7f484 100644 --- a/include/llvm/Config/config.h.cmake +++ b/include/llvm/Config/config.h.cmake @@ -510,6 +510,9 @@ /* Default FPU to use to all compiler invocations, in case of hard float. */ #cmakedefine LLVM_DEFAULT_TARGET_FPU "${LLVM_DEFAULT_TARGET_FPU}" +/* Default hash-style to use to all linker invocations. */ +#cmakedefine LLVM_DEFAULT_TARGET_HASHSTYLE "${LLVM_DEFAULT_TARGET_HASHSTYLE}" + /* 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 d61e099c47..2a5917123c 100644 --- a/include/llvm/Config/config.h.in +++ b/include/llvm/Config/config.h.in @@ -545,6 +545,9 @@ /* Default FPU to use to all compiler invocations, in case of hard float. */ #undef LLVM_DEFAULT_TARGET_FPU +/* Default hash-style to use to all linker invocations. */ +#undef LLVM_DEFAULT_TARGET_HASHSTYLE + /* 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 a1101d3604..bb66f01bd7 100644 --- a/include/llvm/Config/llvm-config.h.cmake +++ b/include/llvm/Config/llvm-config.h.cmake @@ -31,6 +31,9 @@ /* Default FPU to use to all compiler invocations, in case of hard float. */ #cmakedefine LLVM_DEFAULT_TARGET_FPU "${LLVM_DEFAULT_TARGET_FPU}" +/* Default hash-style to use to all linker invocations. */ +#cmakedefine LLVM_DEFAULT_TARGET_HASHSTYLE "${LLVM_DEFAULT_TARGET_HASHSTYLE}" + /* 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 04c1664d3e..8515e5ba57 100644 --- a/include/llvm/Config/llvm-config.h.in +++ b/include/llvm/Config/llvm-config.h.in @@ -31,6 +31,9 @@ /* Default FPU to use to all compiler invocations, in case of hard float. */ #undef LLVM_DEFAULT_TARGET_FPU +/* Default hash-style to use to all linker invocations. */ +#undef LLVM_DEFAULT_TARGET_HASHSTYLE + /* 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 637d8139e7..ceb44ce6f3 100644 --- a/include/llvm/Support/Host.h +++ b/include/llvm/Support/Host.h @@ -71,6 +71,14 @@ namespace sys { /// generate by default code for a given FPU and false otherwise. bool hasDefaultTargetFpu(); + /// getDefaultTargetHashStyle() - Return the default target hash-style for + /// which the compiler is configured to generated for, or "" if empty. + std::string getDefaultTargetHashStyle(); + + /// hasDefaultTargetHashStyle() - Return true if the compiler was configured + /// to generate by default code with a given hash-style and false otherwise. + bool hasDefaultTargetHashStyle(); + /// 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 028a0c78d7..5b55b4f0e9 100644 --- a/lib/Support/Unix/Host.inc +++ b/lib/Support/Unix/Host.inc @@ -85,3 +85,11 @@ std::string sys::getDefaultTargetFpu() { bool sys::hasDefaultTargetFpu() { return getDefaultTargetFpu() != ""; } + +std::string sys::getDefaultTargetHashStyle() { + return LLVM_DEFAULT_TARGET_HASHSTYLE; +} + +bool sys::hasDefaultTargetHashStyle() { + return getDefaultTargetHashStyle() != ""; +} diff --git a/lib/Support/Windows/Host.inc b/lib/Support/Windows/Host.inc index 606e95707d..e48021ef6d 100644 --- a/lib/Support/Windows/Host.inc +++ b/lib/Support/Windows/Host.inc @@ -44,3 +44,11 @@ std::string sys::getDefaultTargetFpu() { bool sys::hasDefaultTargetFpu() { return getDefaultTargetFpu() != ""; } + +std::string sys::getDefaultTargetHashStyle() { + return LLVM_DEFAULT_TARGET_HASHSTYLE; +} + +bool sys::hasDefaultTargetHashStyle() { + return getDefaultTargetHashStyle() != ""; +} |