Hello,

I recently tried to build uclibc-ng configured with NPTL posix threads 
implementation for x86_64 system. Build fails, which I believe is a bug.

The error occurs when compiling 
`libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S`, it takes the false 
branch in

```
#if USE___THREAD
...
#else
...
#endif
```

which contains #error preprocessor directive.

I tried to understand why it happens. Turns out the `USE___THREAD` macro is not 
defined when compiling this file and false branch in always taken. This macro 
is defined in tls.h, however this header files in not included directly or 
indirectly.

This issue should affect all assembler code in 
`libpthread/nptl/sysdeps/unix/sysv/linux/x86_64` since it all have preprocessor 
conditions depending on `USE___THREAD` macro.

Directly including tls.h fixes the build error.

- Kirill Makurin
_______________________________________________
devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to