Changeset: a06afa30eeea for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a06afa30eeea
Modified Files:
        configure.ag
Branch: Jan2014
Log Message:

configure.ag: with clang, disable -pthread as compiler option
(but keep it as linker option)

background is that on Mac OSX Mavericks,
"Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)"
complains about
"error: argument unused during compilation: -pthread".

Also clang 3.3 on fedora 20 appears to work fine without
-pthread as compiler option (but requires it as linker option).


diffs (23 lines):

diff --git a/configure.ag b/configure.ag
--- a/configure.ag
+++ b/configure.ag
@@ -1862,8 +1862,17 @@ if test "x$have_pthread" != xno; then
 
        save_LIBS="$LIBS"
        save_CPPFLAGS="$CPPFLAGS"
-       case $GCC-$have_pthread in
-               yes-auto|yes-yes)
+       case $GCC-$have_pthread-$CC_ver in
+               yes-auto-clang-*|yes-yes-clang-*)
+                       # clang does not seem to have / require -pthread as
+                       # compiler option; in fact, on Mac OSX Mavericks,
+                       # "Apple LLVM version 5.0 (clang-500.2.79) (based on
+                       # LLVM 3.3svn)" complains about "error: argument
+                       # unused during compilation: '-pthread'"
+                       PTHREAD_LIBS="-pthread"
+                       LIBS="$LIBS $PTHREAD_LIBS"
+               ;;
+               yes-auto-*|yes-yes-*)
                        # use GCC's knowledge about the target platform, sets 
flags
                        # for both the preprocessor as well as the linker
                        PTHREAD_INCS="-pthread"
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to