I attached the config I am currently using. It enables most of library features, except for some glibc-compatibility and obsolete stuff.

I was doing native compilation on a Debian 12 system (gcc 12.2, binutils 2.40), but I was using Linux headers v6.14 for the build.

Compilation fails with the following diagnostic:

```
libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:122:3: error: #error "not supported.  %rcx and %rdi must be preserved"
122 | # error "not supported.  %rcx and %rdi must be preserve
         |   ^~~~~

```

As I have mentioned, including tls.h from this file seems to fix the issue.

- Kirill Makurin


From: Waldemar Brodkorb <wbx@openadk.org>
Sent: Monday, May 26, 2025 3:34 PM
To: Kirill Makurin <maiddaisuki@outlook.com>
Cc: devel@uclibc-ng.org <devel@uclibc-ng.org>
Subject: Re: [uclibc-ng-devel] build error for x86_64 with NPTL
 
Hi,
Kirill Makurin wrote,

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

Did you cross-compile or native? What version of binutils,gcc and
Linux are you using? Can you attach your .config?
What is the exact build error you get?
 
 best regards
  Waldemar