This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


On 2013.11.13 at 00:13 +0100, Marek Polacek wrote:
> 2) bootstrap-ubsan almost passes, but the bootstrap fails when building
>    all-fixincludes.  The problem here is that libiberty.a is built
>    with -fsanitize=undefined, but fixincludes, when linking,
>    don't link libubsan in.  My attemps to tweak
>    FIXINC_CFLAGS/LDFLAGS/BOOT_LDFLAGS and whatnot weren't successfull.

I'm using the following patch locally as a part to enable
slim-lto-bootstrap. Maybe it helps in your case, too?

diff --git a/Makefile.in b/Makefile.in
index f9e8e0d5cb79..5db913fa0b8d 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -2930,6 +2930,7 @@ configure-build-fixincludes:
 	test ! -f $(BUILD_SUBDIR)/fixincludes/Makefile || exit 0; \
 	$(SHELL) $(srcdir)/mkinstalldirs $(BUILD_SUBDIR)/fixincludes ; \
 	$(BUILD_EXPORTS)  \
+	CFLAGS="$(STAGE_CFLAGS)"; export CFLAGS; \
 	echo Configuring in $(BUILD_SUBDIR)/fixincludes; \
 	cd "$(BUILD_SUBDIR)/fixincludes" || exit 1; \
 	case $(srcdir) in \
@@ -2965,6 +2966,7 @@ all-build-fixincludes: configure-build-fixincludes
 	$(BUILD_EXPORTS)  \
 	(cd $(BUILD_SUBDIR)/fixincludes && \
 	  $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_BUILD_FLAGS)   \
+		CFLAGS="$(STAGE_CFLAGS)" \
 		$(TARGET-build-fixincludes))
 @endif build-fixincludes
 
@@ -7813,6 +7815,7 @@ configure-fixincludes:
 	test ! -f $(HOST_SUBDIR)/fixincludes/Makefile || exit 0; \
 	$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/fixincludes ; \
 	$(HOST_EXPORTS)  \
+	CFLAGS="$(STAGE_CFLAGS)"; export CFLAGS; \
 	echo Configuring in $(HOST_SUBDIR)/fixincludes; \
 	cd "$(HOST_SUBDIR)/fixincludes" || exit 1; \
 	case $(srcdir) in \
@@ -7847,6 +7850,7 @@ all-fixincludes: configure-fixincludes
 	$(HOST_EXPORTS)  \
 	(cd $(HOST_SUBDIR)/fixincludes && \
 	  $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(STAGE1_FLAGS_TO_PASS)  \
+		CFLAGS="$(STAGE_CFLAGS)" \
 		$(TARGET-fixincludes))
 @endif fixincludes
 

-- 
Markus


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]