This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
make gthread routines non-weak on Darwin
- From: gkeating at apple dot com (Geoffrey Keating)
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 27 Oct 2004 14:02:50 -0700 (PDT)
- Subject: make gthread routines non-weak on Darwin
It's annoying to have weak symbols in libgcc, because 10.1 doesn't
support them, and the linker complains about it if you have magic
environment variables set to the right (or wrong?) values.
Bootstrapped & tested on powerpc-darwin.
--
- Geoffrey Keating <geoffk@apple.com>
===File ~/patches/gcc-darwin-nonweakgthread.patch===========
2004-10-27 Geoffrey Keating <geoffk@apple.com>
* config/darwin.h (GTHREAD_USE_WEAK): Define.
Index: config/darwin.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/darwin.h,v
retrieving revision 1.100
diff -u -p -u -p -r1.100 darwin.h
--- config/darwin.h 26 Oct 2004 06:08:41 -0000 1.100
+++ config/darwin.h 27 Oct 2004 21:01:02 -0000
@@ -393,6 +393,10 @@ extern const char *darwin_fix_and_contin
fputc ('\n', FILE); \
} while (0)
+/* Darwin has the pthread routines in libSystem, which every program
+ links to, so there's no need for weak-ness for that. */
+#define GTHREAD_USE_WEAK 0
+
/* We support hidden visibility */
#undef TARGET_SUPPORTS_HIDDEN
#define TARGET_SUPPORTS_HIDDEN 1
============================================================