diff options
author | echristo <echristo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-07-05 17:32:41 +0000 |
---|---|---|
committer | echristo <echristo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-07-05 17:32:41 +0000 |
commit | 536f65bbf6b444a34423e3fc38300123925629d6 (patch) | |
tree | 3c8d77b4fd64c8cc02c2aeba5c9441d922dfe107 /libgomp/configure.ac | |
parent | 547f0055a2707b6a090402431ae34322280ebc4b (diff) | |
download | ppe42-gcc-536f65bbf6b444a34423e3fc38300123925629d6.tar.gz ppe42-gcc-536f65bbf6b444a34423e3fc38300123925629d6.zip |
2006-07-05 Eric Christopher <echristo@apple.com>
* configure.ac: Depend addition of -pthread on host OS.
* configure: Regenerate.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@115205 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgomp/configure.ac')
-rw-r--r-- | libgomp/configure.ac | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/libgomp/configure.ac b/libgomp/configure.ac index f653b70422d..5d11982b157 100644 --- a/libgomp/configure.ac +++ b/libgomp/configure.ac @@ -145,13 +145,20 @@ GCC_HEADER_STDINT(gstdint.h) # Check to see if -pthread or -lpthread is needed. Prefer the former. # In case the pthread.h system header is not found, this test will fail. XPCFLAGS="" -CFLAGS="$CFLAGS -pthread" + +# Darwin doesn't need the -pthread option since threads are in libSystem AC_LINK_IFELSE( [AC_LANG_PROGRAM( [#include <pthread.h> void *g(void *d) { return NULL; }], [pthread_t t; pthread_create(&t,NULL,g,NULL);])], - [XPCFLAGS=" -Wc,-pthread"], + [case $host in + *-darwin*) + ;; + default) + XPCFLAGS=" -Wc,-pthread" + ;; + esac], [CFLAGS="$save_CFLAGS" LIBS="-lpthread $LIBS" AC_LINK_IFELSE( [AC_LANG_PROGRAM( |