autoconf-archive-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[patch #8186] ax_pthread adds -pthread when it should not on OSX when co


From: Brian Aker
Subject: [patch #8186] ax_pthread adds -pthread when it should not on OSX when compiling with clang
Date: Fri, 18 Oct 2013 06:41:53 +0000
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_5) AppleWebKit/536.30.1 (KHTML, like Gecko) Version/6.0.5 Safari/536.30.1

Follow-up Comment #6, patch #8186 (project autoconf-archive):

Hi!

Sorry about not logging in when I left the original bug report, I was in a
hurry working over someone's shoulder and just copy and pasted what I had done
:)

This patch works if you call clang via "clang" but if you call it via CC it
will fail. I took what you all did in trunk and applied the following:


diff --git a/m4/ax_pthread.m4 b/m4/ax_pthread.m4
index 4537934..ebea7fb 100644
--- a/m4/ax_pthread.m4
+++ b/m4/ax_pthread.m4
@@ -123,7 +123,7 @@ fi
 # which indicates that we try without any flags at all, and "pthread-config"
 # which is a program returning the flags for the Pth emulation library.
 
-ax_pthread_flags="none pthreads -Kthread -kthread lthread -pthread -pthreads
-mthreads pthread --thread-safe -mt pthread-config"
+ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads
-mthreads pthread --thread-safe -mt pthread-config"
 
 # The ordering *is* (sometimes) important.  Some notes on the
 # individual items follow:
@@ -160,7 +160,7 @@ case ${host_os} in
         ;;
 
         darwin*)
-        ax_pthread_flags="-pthread $ax_pthread_flags"
+        ax_pthread_flags="none -pthread $ax_pthread_flags"
         ;;
 esac
 
Cheers,
    -Brian

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/patch/?8186>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]