From: Chris Packham <chris.packham@alliedtelesis.co.nz>
Date: Thu, 7 Sep 2023 19:26:49 +1200
Subject: [PATCH] libgcc: Exclude UCLIBC from GLIBC thread check
UBLIBC defines __GLIBC__ but also marks __pthread_key_create() as
protected. Leading to link errors with newer binutils such as:
ld.bfd: isl_test_cpp17.o: non-canonical reference to canonical protected function `__pthread_key_create' in x86_64-multilib-linux-uclibc/sysroot/lib64/libc.so.1
ld.bfd: failed to set dynamic section sizes: bad value
Add a condition on !__UCLIBC__ when selecting a symbol to detect pthread
usage so it picks the intended pthread_cancel().
Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>