This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Implement -fsanitize=null + new sanopt pass
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Marek Polacek <polacek at redhat dot com>, Binutils <binutils at sourceware dot org>
- Cc: Jakub Jelinek <jakub at redhat dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 29 Nov 2013 13:35:13 -0800
- Subject: Re: [PATCH] Implement -fsanitize=null + new sanopt pass
- Authentication-results: sourceware.org; auth=none
- References: <20131112231348 dot GU30062 at redhat dot com> <20131118135141 dot GC892 at tucnak dot redhat dot com> <20131118144455 dot GB30062 at redhat dot com> <CAMe9rOo44zKgbxikhig1SiCFmRyAZS2C3Y=4g9Ma6fJK__yCXQ at mail dot gmail dot com> <20131129193234 dot GE892 at tucnak dot redhat dot com> <20131129195526 dot GK31608 at redhat dot com> <20131129195723 dot GF892 at tucnak dot redhat dot com> <20131129200246 dot GL31608 at redhat dot com>
On Fri, Nov 29, 2013 at 12:02 PM, Marek Polacek <polacek@redhat.com> wrote:
> On Fri, Nov 29, 2013 at 08:57:23PM +0100, Jakub Jelinek wrote:
>> On Fri, Nov 29, 2013 at 08:55:26PM +0100, Marek Polacek wrote:
>> > 2013-11-29 Marek Polacek <polacek@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
>>
>> Please add -B$$r/prev-$(TARGET_SUBDIR)/libsanitizer/ too, so that
>> it is able to find libsanitizer.spec. Ok with that change.
>
> Thanks, will apply the following then.
>
> 2013-11-29 Marek Polacek <polacek@redhat.com>
>
> * bootstrap-ubsan.mk (POSTSTAGE1_LDFLAGS): Remove -lpthread -ldl.
> Add -B$$r/prev-$(TARGET_SUBDIR)/libsanitizer/.
>
> --- gcc/bootstrap-ubsan.mk.mp3 2013-11-29 20:50:04.788238860 +0100
> +++ gcc/bootstrap-ubsan.mk 2013-11-29 20:58:23.322131822 +0100
> @@ -2,6 +2,7 @@
>
> 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/ \
> -B$$r/prev-$(TARGET_SUBDIR)/libsanitizer/ubsan/ \
> -B$$r/prev-$(TARGET_SUBDIR)/libsanitizer/ubsan/.libs
>
> Marek
I pushed it to binutils-gdb.
--
H.J.