aboutsummaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2009-05-19 22:18:56 +0000
committerOwen Anderson <resistor@mac.com>2009-05-19 22:18:56 +0000
commita86037084d8c2338c305533807b3213cfdc47a3e (patch)
treecedee6e1057dcd871c41a1e150497f264ef4bffa /configure
parent6aa219a18c59a9bc0b1eeb6eece09cfabaaefabe (diff)
downloadexternal_llvm-a86037084d8c2338c305533807b3213cfdc47a3e.zip
external_llvm-a86037084d8c2338c305533807b3213cfdc47a3e.tar.gz
external_llvm-a86037084d8c2338c305533807b3213cfdc47a3e.tar.bz2
Split the ENABLE_THREADS #define in two. Now ENABLE_THREADS indicates the ability to run multiple threads at once in the JIT, and requires only
mutex support. LLVM_MULTITHREADED indicates (or will indicate) the ability to run LLVM itself across multiple threads, and requires atomics support. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72140 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure88
1 files changed, 47 insertions, 41 deletions
diff --git a/configure b/configure
index 20e3b4f..1179524 100755
--- a/configure
+++ b/configure
@@ -4870,6 +4870,11 @@ echo "$as_me: error: Invalid setting for --enable-threads. Use \"yes\" or \"no\"
{ (exit 1); exit 1; }; } ;;
esac
+cat >>confdefs.h <<_ACEOF
+#define ENABLE_THREADS $ENABLE_THREADS
+_ACEOF
+
+
# Check whether --enable-pic was given.
if test "${enable_pic+set}" = set; then
enableval=$enable_pic;
@@ -10570,7 +10575,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 10573 "configure"
+#line 10578 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -12714,7 +12719,7 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 12717 "configure"' > conftest.$ac_ext
+ echo '#line 12722 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -14432,11 +14437,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:14435: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:14440: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:14439: \$? = $ac_status" >&5
+ echo "$as_me:14444: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -14700,11 +14705,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:14703: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:14708: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:14707: \$? = $ac_status" >&5
+ echo "$as_me:14712: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -14804,11 +14809,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:14807: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:14812: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:14811: \$? = $ac_status" >&5
+ echo "$as_me:14816: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -17256,7 +17261,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 17259 "configure"
+#line 17264 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -17356,7 +17361,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 17359 "configure"
+#line 17364 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -19724,11 +19729,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:19727: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:19732: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:19731: \$? = $ac_status" >&5
+ echo "$as_me:19736: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -19828,11 +19833,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:19831: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:19836: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:19835: \$? = $ac_status" >&5
+ echo "$as_me:19840: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -21398,11 +21403,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:21401: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:21406: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:21405: \$? = $ac_status" >&5
+ echo "$as_me:21410: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -21502,11 +21507,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:21505: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:21510: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:21509: \$? = $ac_status" >&5
+ echo "$as_me:21514: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -23737,11 +23742,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:23740: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:23745: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:23744: \$? = $ac_status" >&5
+ echo "$as_me:23749: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -24005,11 +24010,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:24008: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:24013: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:24012: \$? = $ac_status" >&5
+ echo "$as_me:24017: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -24109,11 +24114,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:24112: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:24117: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:24116: \$? = $ac_status" >&5
+ echo "$as_me:24121: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -33602,21 +33607,20 @@ echo "$as_me: WARNING: mmap() of files required but not found" >&2;}
fi
fi
-if test "$ENABLE_THREADS" -eq 1 ; then
- { echo "$as_me:$LINENO: checking for GCC atomic builtins" >&5
+{ echo "$as_me:$LINENO: checking for GCC atomic builtins" >&5
echo $ECHO_N "checking for GCC atomic builtins... $ECHO_C" >&6; }
- cat >conftest.$ac_ext <<_ACEOF
+cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
int main() {
- volatile unsigned long val = 1;
- __sync_synchronize();
- __sync_val_compare_and_swap(&val, 1, 0);
- return 0;
- }
+ volatile unsigned long val = 1;
+ __sync_synchronize();
+ __sync_val_compare_and_swap(&val, 1, 0);
+ return 0;
+ }
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
@@ -33655,26 +33659,28 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(exit $ac_status); }; }; then
{ echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define LLVM_MULTITHREADED 1
+_ACEOF
+
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
{ echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
- ENABLE_THREADS=0
- { echo "$as_me:$LINENO: WARNING: Threading support disabled because atomic builtins are missing" >&5
-echo "$as_me: WARNING: Threading support disabled because atomic builtins are missing" >&2;}
+cat >>confdefs.h <<\_ACEOF
+#define LLVM_MULTITHREADED 0
+_ACEOF
+
+ { echo "$as_me:$LINENO: WARNING: LLVM will be built thread-unsafe because atomic builtins are missing" >&5
+echo "$as_me: WARNING: LLVM will be built thread-unsafe because atomic builtins are missing" >&2;}
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
-fi
-
-
-cat >>confdefs.h <<_ACEOF
-#define ENABLE_THREADS $ENABLE_THREADS
-_ACEOF