[PATCH] Implement -fsanitize=null + new sanopt pass

Jakub Jelinek jakub@redhat.com
Sat Nov 30 12:00:00 GMT 2013


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.

	Jakub



More information about the Gcc-patches mailing list