This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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
============================================================


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]