This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] remove warning from libgomp under darwin
- From: Eric Christopher <echristo at apple dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sat, 01 Jul 2006 00:01:51 -0700
- Subject: [patch] remove warning from libgomp under darwin
Fairly obvious patch here. Since darwin has all of the thread libraries
already linked into libSystem we don't need to specify it on the command
line. I'm not sure why this doesn't pay attention to GOMP_SELF_SPECS,
but there we are.
Tested on x86-darwin and x86-linux. Still builds, no warnings on
building libgomp anymore.
OK?
-eric
2006-06-30 Eric Christopher <echristo@apple.com>
* configure.ac: Depend addition of -pthread on
host OS.
* configure: Regenerate.
Index: configure.ac
===================================================================
--- configure.ac (revision 115076)
+++ configure.ac (working copy)
@@ -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(