On Fri, Nov 29, 2013 at 08:32:34PM +0100, Jakub Jelinek wrote:
> On Fri, Nov 29, 2013 at 11:22:00AM -0800, H.J. Lu wrote:
> > On Mon, Nov 18, 2013 at 6:44 AM, Marek Polacek <pola...@redhat.com> wrote:
> > > On Mon, Nov 18, 2013 at 02:51:41PM +0100, Jakub Jelinek wrote:
> > >> On Wed, Nov 13, 2013 at 12:13:48AM +0100, Marek Polacek wrote:
> > >> > --- gcc/config/bootstrap-ubsan.mk.mp        2013-11-12 
> > >> > 13:46:13.345182065 +0100
> > >> > +++ gcc/config/bootstrap-ubsan.mk   2013-11-12 13:46:49.812314016 +0100
> > >> > @@ -2,6 +2,6 @@
> > >> >
> > >> >  STAGE2_CFLAGS += -fsanitize=undefined
> > >> >  STAGE3_CFLAGS += -fsanitize=undefined
> > >> > -POSTSTAGE1_LDFLAGS += -fsanitize=undefined -static-libubsan -lpthread 
> > >> > \
> > >> > +POSTSTAGE1_LDFLAGS += -fsanitize=undefined -static-libubsan -lpthread 
> > >> > -ldl \
> > >>
> > >> Hopefully with my pending patch you can remove the -lpthread -ldl again, 
> > >> but
> > >> ok for now.
> > >
> > 
> > You shouldn't use -ldl directly.  Not all OSes have libdl.  You
> > should extract the libdl check from gcc/configure.ac and
> > set LIBDL instead by changing gcc/Makefile.in
> 
> -static-libubsan should add all the libraries needed of libubsan.a by now,
> so -lpthread -ldl should be just removed from POSTSTAGE1_LDFLAGS.

So ok to install this one?

2013-11-29  Marek Polacek  <pola...@redhat.com>

        * bootstrap-ubsan.mk (POSTSTAGE1_LDFLAGS): Remove -lpthread -ldl.

--- gcc/bootstrap-ubsan.mk.mp3  2013-11-29 20:50:04.788238860 +0100
+++ gcc/bootstrap-ubsan.mk      2013-11-29 20:50:25.870322185 +0100
@@ -2,6 +2,6 @@
 
 STAGE2_CFLAGS += -fsanitize=undefined
 STAGE3_CFLAGS += -fsanitize=undefined
-POSTSTAGE1_LDFLAGS += -fsanitize=undefined -static-libubsan -lpthread -ldl \
+POSTSTAGE1_LDFLAGS += -fsanitize=undefined -static-libubsan \
                      -B$$r/prev-$(TARGET_SUBDIR)/libsanitizer/ubsan/ \
                      -B$$r/prev-$(TARGET_SUBDIR)/libsanitizer/ubsan/.libs

        Marek

Reply via email to