X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=Makefile.tpl;h=3233a788d8d3c012263d856fd41770e8920ae6f4;hb=480c696bb0f3253c9a53d9c2be2e29e1e5dffdc6;hp=2573eee8f6a1639216632db4c99bbf1b0ba224f9;hpb=33ad93b9f4cb21a19b8cf60c77344bc1c9bdff6d;p=gcc.git diff --git a/Makefile.tpl b/Makefile.tpl index 2573eee8f6a..3233a788d8d 100644 --- a/Makefile.tpl +++ b/Makefile.tpl @@ -238,7 +238,7 @@ POSTSTAGE1_CXX_EXPORT = \ @if target-libstdc++-v3-bootstrap # Override the above if we're bootstrapping C++. POSTSTAGE1_CXX_EXPORT = \ - CXX="$(STAGE_CC_WRAPPER) $$r/$(HOST_SUBDIR)/prev-gcc/g++$(exeext) \ + CXX="$(STAGE_CC_WRAPPER) $$r/$(HOST_SUBDIR)/prev-gcc/xg++$(exeext) \ -B$$r/$(HOST_SUBDIR)/prev-gcc/ -B$(build_tooldir)/bin/ -nostdinc++ \ -B$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/src/.libs \ -B$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/libsupc++/.libs \ @@ -367,7 +367,7 @@ BUILD_PREFIX_1 = @BUILD_PREFIX_1@ # here so that they can be overridden by Makefile fragments. BOOT_CFLAGS= -g -O2 BOOT_LDFLAGS= -BOOT_ADAFLAGS=-gnatpg -gnata +BOOT_ADAFLAGS= -gnatpg AWK = @AWK@ SED = @SED@ @@ -423,7 +423,6 @@ TFLAGS = STAGE_CFLAGS = $(BOOT_CFLAGS) STAGE_TFLAGS = $(TFLAGS) STAGE_CONFIGURE_FLAGS=@stage2_werror_flag@ -POSTSTAGE1_CONFIGURE_FLAGS = @POSTSTAGE1_CONFIGURE_FLAGS@ [+ FOR bootstrap-stage +] # Defaults for stage [+id+]; some are overridden below. @@ -434,10 +433,7 @@ STAGE[+id+]_CXXFLAGS = $(CXXFLAGS) STAGE[+id+]_CXXFLAGS = $(STAGE[+id+]_CFLAGS) @endif target-libstdc++-v3-bootstrap STAGE[+id+]_TFLAGS = $(STAGE_TFLAGS) -# STAGE1_CONFIGURE_FLAGS overridden below, so we can use -# POSTSTAGE1_CONFIGURE_FLAGS here. -STAGE[+id+]_CONFIGURE_FLAGS = \ - $(STAGE_CONFIGURE_FLAGS) $(POSTSTAGE1_CONFIGURE_FLAGS) +STAGE[+id+]_CONFIGURE_FLAGS = $(STAGE_CONFIGURE_FLAGS) [+ ENDFOR bootstrap-stage +] # Only build the C compiler for stage1, because that is the only one that @@ -455,9 +451,6 @@ STAGE1_LANGUAGES = @stage1_languages@ # the last argument when conflicting --enable arguments are passed. # * Likewise, we force-disable coverage flags, since the installed # compiler probably has never heard of them. -# * Don't remove this, because above we added -# POSTSTAGE1_CONFIGURE_FLAGS to STAGE[+id+]_CONFIGURE_FLAGS, which -# we don't want for STAGE1_CONFIGURE_FLAGS. STAGE1_CONFIGURE_FLAGS = --disable-intermodule $(STAGE1_CHECKING) \ --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)" @@ -622,6 +615,12 @@ EXTRA_HOST_FLAGS = \ FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) +# Flags to pass to stage1 or when not bootstrapping. + +STAGE1_FLAGS_TO_PASS = \ + LDFLAGS="$${LDFLAGS}" \ + HOST_LIBS="$${HOST_LIBS}" + # Flags to pass to stage2 and later makes. POSTSTAGE1_FLAGS_TO_PASS = \ @@ -1083,7 +1082,7 @@ all-[+prefix+][+module+]: configure-[+prefix+][+module+][+ IF bootstrap +][+ ELS s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ [+exports+] [+extra_exports+] \ (cd [+subdir+]/[+module+] && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) [+args+] [+extra_make_flags+] \ + $(MAKE) $(BASE_FLAGS_TO_PASS) [+args+] [+stage1_args+] [+extra_make_flags+] \ $(TARGET-[+prefix+][+module+])) @endif [+prefix+][+module+] @@ -1116,9 +1115,8 @@ all-stage[+id+]-[+prefix+][+module+]: configure-stage[+id+]-[+prefix+][+module+] CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \ CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \ LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \ - [+args+] [+ - IF prev +][+poststage1_args+][+ ENDIF prev - +] [+extra_make_flags+] \ + [+args+] [+IF prev +][+poststage1_args+][+ ELSE prev +] \ + [+stage1_args+][+ ENDIF prev +] [+extra_make_flags+] \ TFLAGS="$(STAGE[+id+]_TFLAGS)" \ $(TARGET-stage[+id+]-[+prefix+][+module+]) @@ -1132,9 +1130,8 @@ clean-stage[+id+]-[+prefix+][+module+]: $(MAKE) stage[+id+]-start; \ fi; \ cd [+subdir+]/[+module+] && \ - $(MAKE) [+args+] [+ IF prev +] \ - [+poststage1_args+] [+ ENDIF prev +] \ - [+extra_make_flags+] clean + $(MAKE) [+args+] [+ IF prev +][+poststage1_args+][+ ELSE prev +] \ + [+stage1_args+][+ ENDIF prev +] [+extra_make_flags+] clean @endif [+prefix+][+module+]-bootstrap [+ ENDFOR bootstrap_stage +] @@ -1169,6 +1166,7 @@ clean-stage[+id+]-[+prefix+][+module+]: exports="$(HOST_EXPORTS)" poststage1_exports="$(POSTSTAGE1_HOST_EXPORTS)" args="$(EXTRA_HOST_FLAGS)" + stage1_args="$(STAGE1_FLAGS_TO_PASS)" poststage1_args="$(POSTSTAGE1_FLAGS_TO_PASS)" +] .PHONY: check-[+module+] maybe-check-[+module+]