diff options
Diffstat (limited to 'sysdeps/generic/libc-start.c')
-rw-r--r-- | sysdeps/generic/libc-start.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sysdeps/generic/libc-start.c b/sysdeps/generic/libc-start.c index 600136dae5..8d523e6836 100644 --- a/sysdeps/generic/libc-start.c +++ b/sysdeps/generic/libc-start.c @@ -30,7 +30,12 @@ extern int __libc_multiple_libcs; extern void *__libc_stack_end; #ifndef SHARED -extern void __pthread_initialize_minimal (void) __attribute__ ((weak)); +# include <tls.h> +extern void __pthread_initialize_minimal (void) +# if !(USE_TLS - 0) + __attribute__ ((weak)) +# endif + ; #endif @@ -91,7 +96,7 @@ BP_SYM (__libc_start_main) (int (*main) (int, char **, char **), we need to setup errno. If there is no thread library and we handle TLS the function is defined in the libc to initialized the TLS handling. */ -# ifndef TLS +# if !(USE_TLS - 0) if (__pthread_initialize_minimal) # endif __pthread_initialize_minimal (); |