[PATCH] nptl_version & gcc 3.4.

Martin Schwidefsky schwidefsky@de.ibm.com
Mon Mar 15 09:43:00 GMT 2004


Hi,
Uli discovered a small problem with nptl, gdb and gcc 3.4. If the nptl is
compiled with gcc 3.4 the gdb won't recognize the thread library because
the nptl_version string is missing. gcc 3.4 likes to remove unused static
variables...

blue skies,
  Martin.

2004-03-15  Ulrich Weigand  <uweigand@de.ibm.com>

	* init.c (nptl_version): Add __attribute_used__ to nptl_version.

diff -urN libc/nptl/init.c libc-gcc34/nptl/init.c
--- libc/nptl/init.c	2004-01-19 14:02:29.000000000 +0100
+++ libc-gcc34/nptl/init.c	2004-03-11 11:00:48.000000000 +0100
@@ -62,7 +62,7 @@
 size_t __static_tls_align_m1;
 
 /* Version of the library, used in libthread_db to detect mismatches.  */
-static const char nptl_version[] = VERSION;
+static const char __attribute_used__ nptl_version[] = VERSION;
 
 
 #if defined USE_TLS && !defined SHARED



More information about the Libc-alpha mailing list