X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=Makefile.tpl;h=f9bbbdeaa549840982a7b857163f3886e177d0bb;hb=c8f89a3423101b25e57bc8fd55b060ce2ac45a55;hp=f2c3f48b7d22abfe1a957af1ab7fbc4fc06ccfc3;hpb=7ec59b9efafe625e0794f2844d99c9b7dea4c56a;p=deliverable%2Fbinutils-gdb.git diff --git a/Makefile.tpl b/Makefile.tpl index f2c3f48b7d..f9bbbdeaa5 100644 --- a/Makefile.tpl +++ b/Makefile.tpl @@ -169,7 +169,7 @@ BUILD_EXPORTS = \ WINDMC="$(WINDMC_FOR_BUILD)"; export WINDMC; # These variables must be set on the make command line for directories -# built for the build system to override those in BASE_FLAGS_TO_PASSS. +# built for the build system to override those in BASE_FLAGS_TO_PASS. EXTRA_BUILD_FLAGS = \ CFLAGS="$(CFLAGS_FOR_BUILD)" \ LDFLAGS="$(LDFLAGS_FOR_BUILD)" @@ -216,6 +216,7 @@ HOST_EXPORTS = \ LD_FOR_TARGET="$(LD_FOR_TARGET)"; export LD_FOR_TARGET; \ NM_FOR_TARGET="$(NM_FOR_TARGET)"; export NM_FOR_TARGET; \ OBJDUMP_FOR_TARGET="$(OBJDUMP_FOR_TARGET)"; export OBJDUMP_FOR_TARGET; \ + OBJCOPY_FOR_TARGET="$(OBJCOPY_FOR_TARGET)"; export OBJCOPY_FOR_TARGET; \ RANLIB_FOR_TARGET="$(RANLIB_FOR_TARGET)"; export RANLIB_FOR_TARGET; \ READELF_FOR_TARGET="$(READELF_FOR_TARGET)"; export READELF_FOR_TARGET; \ TOPLEVEL_CONFIGURE_ARGUMENTS="$(TOPLEVEL_CONFIGURE_ARGUMENTS)"; export TOPLEVEL_CONFIGURE_ARGUMENTS; \ @@ -238,13 +239,13 @@ 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 \ - -I$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/include/$(TARGET_SUBDIR) \ - -I$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/include \ - -I$$s/libstdc++-v3/libsupc++ \ + `if $(LEAN); then echo ' -isystem '; else echo ' -I'; fi`$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/include/$(TARGET_SUBDIR) \ + `if $(LEAN); then echo ' -isystem '; else echo ' -I'; fi`$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/include \ + `if $(LEAN); then echo ' -isystem '; else echo ' -I'; fi`$$s/libstdc++-v3/libsupc++ \ -L$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/src/.libs \ -L$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/libsupc++/.libs"; \ export CXX; \ @@ -288,6 +289,7 @@ BASE_TARGET_EXPORTS = \ LIPO="$(LIPO_FOR_TARGET)"; export LIPO; \ NM="$(COMPILER_NM_FOR_TARGET)"; export NM; \ OBJDUMP="$(OBJDUMP_FOR_TARGET)"; export OBJDUMP; \ + OBJCOPY="$(OBJCOPY_FOR_TARGET)"; export OBJCOPY; \ RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ READELF="$(READELF_FOR_TARGET)"; export READELF; \ STRIP="$(STRIP_FOR_TARGET)"; export STRIP; \ @@ -367,7 +369,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@ @@ -451,8 +453,10 @@ 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. +# * We also disable -Wformat, since older GCCs don't understand newer %s. STAGE1_CONFIGURE_FLAGS = --disable-intermodule $(STAGE1_CHECKING) \ - --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)" + --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)" \ + --disable-build-format-warnings STAGEprofile_CFLAGS = $(STAGE2_CFLAGS) -fprofile-generate STAGEprofile_TFLAGS = $(STAGE2_TFLAGS) @@ -487,6 +491,7 @@ LD_FOR_TARGET=@LD_FOR_TARGET@ LIPO_FOR_TARGET=@LIPO_FOR_TARGET@ NM_FOR_TARGET=@NM_FOR_TARGET@ OBJDUMP_FOR_TARGET=@OBJDUMP_FOR_TARGET@ +OBJCOPY_FOR_TARGET=@OBJCOPY_FOR_TARGET@ RANLIB_FOR_TARGET=@RANLIB_FOR_TARGET@ READELF_FOR_TARGET=@READELF_FOR_TARGET@ STRIP_FOR_TARGET=@STRIP_FOR_TARGET@ @@ -615,6 +620,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 = \ @@ -648,6 +659,7 @@ EXTRA_TARGET_FLAGS = \ 'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \ 'NM=$(COMPILER_NM_FOR_TARGET)' \ 'OBJDUMP=$$(OBJDUMP_FOR_TARGET)' \ + 'OBJCOPY=$$(OBJCOPY_FOR_TARGET)' \ 'RANLIB=$$(RANLIB_FOR_TARGET)' \ 'READELF=$$(READELF_FOR_TARGET)' \ 'WINDRES=$$(WINDRES_FOR_TARGET)' \ @@ -1076,7 +1088,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+] @@ -1109,9 +1121,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+]) @@ -1125,9 +1136,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 +] @@ -1162,6 +1172,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+] @@ -1399,13 +1410,6 @@ ENDIF raw_cxx +] [+ ENDFOR recursive_targets +] [+ ENDFOR target_modules +] -@if target-libmudflap -.PHONY: check-target-libmudflap-c++ -check-target-libmudflap-c++: - $(MAKE) RUNTESTFLAGS="$(RUNTESTFLAGS) c++frags.exp" check-target-libmudflap - -@endif target-libmudflap - @if target-libgomp .PHONY: check-target-libgomp-c++ check-target-libgomp-c++: