This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc 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]

[PATCH] nptl_version & gcc 3.4.


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


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