When doing bootstrap with ubsan, some files require libpthread to be linked. This patch adds -lpthread into POSTSTAGE1_LDFLAGS for the bootstrap-ubsan.
Applying to the ubsan branch. 2013-08-14 Marek Polacek <pola...@redhat.com> * bootstrap-ubsan.mk (POSTSTAGE1_LDFLAGS): Add -lpthread. --- gcc/bootstrap-ubsan.mk.mp 2013-08-14 16:01:34.752485016 +0200 +++ gcc/bootstrap-ubsan.mk 2013-08-14 16:01:50.381541011 +0200 @@ -2,6 +2,6 @@ STAGE2_CFLAGS += -fsanitize=undefined STAGE3_CFLAGS += -fsanitize=undefined -POSTSTAGE1_LDFLAGS += -fsanitize=undefined -static-libubsan \ +POSTSTAGE1_LDFLAGS += -fsanitize=undefined -static-libubsan -lpthread \ -B$$r/prev-$(TARGET_SUBDIR)/libsanitizer/ubsan/ \ -B$$r/prev-$(TARGET_SUBDIR)/libsanitizer/ubsan/.libs Marek