https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118009
--- Comment #10 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to Jonathan Wakely from comment #8) > To put it another way: the obsolete fixincludes rule creates an unnecessary > and extremely fragile dependency from GCC to some Glibc internal details. If > we just remove that unnecessary dependency, users won't need to know how to > use mkheaders because GCC won't care about changes to those Glibc internals. Oh wow, it's even worse than I thought. The line we're "fixing" in GCC isn't even used by GCC: #if __GNUC_PREREQ (11, 0) extern int __REDIRECT_NTHNL (__sigsetjmp_cancel, (struct __cancel_jmp_buf_tag __env[1], int __savemask), __sigsetjmp) __attribute_returns_twice__; #else # define __sigsetjmp_cancel(env, savemask) \ __sigsetjmp ((struct __jmp_buf_tag *) (void *) (env), (savemask)) extern int __sigsetjmp (struct __jmp_buf_tag __env[1], int __savemask) __THROWNL; #endif We "fix" the declaration that is only used for GCC 10 and older. So we create a fragile copy of pthread.h that couples GCC to Glibc internals, and then don't even compile the line that we "fixed".