(Debian testing amd64, GCC 10.2.1, binutils 2.35.2) % mkdir -p out/bfd % ../../configure --prefix=/tmp/glibc/bfd --enable-static-pie % make -j 20 % make -j 20 check # many failures due to libgcc_s.so.1 must be installed for pthread_cancel to work % ./testrun.sh nptl/tst-cancel1 libgcc_s.so.1 must be installed for pthread_cancel to work Didn't expect signal from child: got `Aborted' Copying the system libgcc_s.so.1 to $prefix/lib/ can fix the failures. % cp /usr/lib/x86_64-linux-gnu/libgcc_s.so.1 /tmp/glibc/bfd/lib/ % ./testrun.sh nptl/tst-cancel1 # succeeded
Forgot `cd out/bfd` below `mkdir -p out/bfd` `make install` before `make check` doesn't work. In ./testrun.sh, /usr/lib/x86_64-linux-gnu/libgcc_s.so.1 is not in `search path` (LD_DEBUG=libs). So a manual copy is needed.
Please talk to Debian or Ubuntu about upstreaming their multiarch patches. The upstream toolchain is consistent in this area. The issue only happens if you try to do glibc development on a system that has these custom downstream patches in its system toolchain. (Just to be clear, I would like to see these patches upstreamed, it's just not something I'm sure I can do due to the licensing aspects involved.)
Reported a Debian bug on https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=991861