Patchwork [ubsan] Add -lpthread to POSTSTAGE1_LDFLAGS

login
register
mail settings
Submitter Marek Polacek
Date Aug. 14, 2013, 2:05 p.m.
Message ID <20130814140510.GT17022@redhat.com>
Download mbox | patch
Permalink /patch/267126/
State New
Headers show

Comments

Marek Polacek - Aug. 14, 2013, 2:05 p.m.
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  <polacek@redhat.com>

	* bootstrap-ubsan.mk (POSTSTAGE1_LDFLAGS): Add -lpthread.


	Marek

Patch

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