diff options
author | Palmer Dabbelt <palmer@dabbelt.com> | 2017-09-14 14:12:01 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-14 14:12:01 -0700 |
commit | 2a67766d9e5d167bb5a5d4543766578a4ddd15a2 (patch) | |
tree | 20030c79db1ba8c4885ecb32beeca762f7142de2 | |
parent | 829f362368782c6b131e678671d3d4d0d16556ef (diff) | |
parent | 421c17b6afbe792d8120df85b234b00bbcbea5ba (diff) | |
download | riscv-gnu-toolchain-2a67766d9e5d167bb5a5d4543766578a4ddd15a2.zip riscv-gnu-toolchain-2a67766d9e5d167bb5a5d4543766578a4ddd15a2.tar.gz riscv-gnu-toolchain-2a67766d9e5d167bb5a5d4543766578a4ddd15a2.tar.bz2 |
Merge pull request #278 from austinharris/native-toolchain
Build native toolchain
-rw-r--r-- | Makefile.in | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/Makefile.in b/Makefile.in index 145ad88..661a68e 100644 --- a/Makefile.in +++ b/Makefile.in @@ -58,6 +58,7 @@ CONFIGURE_HOST = @configure_host@ all: @default_target@ newlib: stamps/build-gcc-newlib-stage2 linux: stamps/build-gcc-linux-stage2 +linux-native: stamps/build-gcc-linux-native .PHONY: build-binutils build-gcc1 build-libc build-gcc2 build-qemu build-binutils: stamps/build-binutils-@default_target@ @@ -227,6 +228,51 @@ stamps/build-gcc-linux-stage2: $(srcdir)/riscv-gcc $(addprefix stamps/build-glib cp -a $(INSTALL_DIR)/$(LINUX_TUPLE)/lib* $(SYSROOT) mkdir -p $(dir $@) && touch $@ +stamps/build-binutils-linux-native: $(srcdir)/riscv-binutils-gdb stamps/build-gcc-linux-stage2 + rm -rf $@ $(notdir $@) + mkdir $(notdir $@) + cd $(notdir $@) && $</configure \ + --host=$(LINUX_TUPLE) \ + --target=$(LINUX_TUPLE) \ + $(CONFIGURE_HOST) \ + --prefix=$(INSTALL_DIR)/native \ + $(MULTILIB_FLAGS) \ + @with_guile@ \ + --disable-werror \ + --disable-nls \ + @enable_gdb@ + $(MAKE) -C $(notdir $@) + $(MAKE) -C $(notdir $@) install + mkdir -p $(dir $@) && touch $@ + +stamps/build-gcc-linux-native: $(srcdir)/riscv-gcc stamps/build-gcc-linux-stage2 stamps/build-binutils-linux-native + if test -f $</contrib/download_prerequisites; then cd $< && ./contrib/download_prerequisites; fi + rm -rf $@ $(notdir $@) + mkdir $(notdir $@) + cd $(notdir $@) && $</configure \ + --host=$(LINUX_TUPLE) \ + --target=$(LINUX_TUPLE) \ + $(CONFIGURE_HOST) \ + --prefix=$(INSTALL_DIR)/native \ + --without-system-zlib \ + --enable-shared \ + --enable-tls \ + --enable-languages=c,c++,fortran \ + --disable-libmudflap \ + --disable-libssp \ + --disable-libquadmath \ + --disable-nls \ + --disable-bootstrap \ + --with-native-system-header-dir=$(INSTALL_DIR)/native/include \ + $(GCC_CHECKING_FLAGS) \ + $(MULTILIB_FLAGS) \ + $(WITH_ABI) \ + $(WITH_ARCH) + $(MAKE) -C $(notdir $@) + $(MAKE) -C $(notdir $@) install + cp -a $(INSTALL_DIR)/$(LINUX_TUPLE)/lib* $(SYSROOT) + mkdir -p $(dir $@) && touch $@ + stamps/build-binutils-newlib: $(srcdir)/riscv-binutils-gdb rm -rf $@ $(notdir $@) mkdir $(notdir $@) |