diff options
author | Andrew Waterman <andrew@sifive.com> | 2017-01-20 02:09:52 -0800 |
---|---|---|
committer | Andrew Waterman <andrew@sifive.com> | 2017-01-20 02:09:52 -0800 |
commit | ee0cf248173a2482b8c0f393749edcab70e09f46 (patch) | |
tree | 9d08b748f143fb39708e7a8b039692406cb916ad | |
parent | 914224e0913c9ceab49ad9531a7fedc231f65c15 (diff) | |
download | riscv-gnu-toolchain-ee0cf248173a2482b8c0f393749edcab70e09f46.zip riscv-gnu-toolchain-ee0cf248173a2482b8c0f393749edcab70e09f46.tar.gz riscv-gnu-toolchain-ee0cf248173a2482b8c0f393749edcab70e09f46.tar.bz2 |
Rework multilibs and bump everything
-rw-r--r-- | Makefile.in | 38 | ||||
m--------- | riscv-binutils-gdb | 0 | ||||
m--------- | riscv-gcc | 0 | ||||
m--------- | riscv-glibc | 0 |
4 files changed, 19 insertions, 19 deletions
diff --git a/Makefile.in b/Makefile.in index 2c2e9bc..cc19c3f 100644 --- a/Makefile.in +++ b/Makefile.in @@ -41,7 +41,7 @@ ifneq ($(XLEN),32) endif ifeq ($(MULTILIB_NAMES),) - MULTILIB_NAMES := $(subst --with-arch=,,$(WITH_ARCH))-$(subst --with-abi=,,$(WITH_ABI)) + MULTILIB_NAMES := $(XLEN) endif CFLAGS_FOR_TARGET := $(CFLAGS_FOR_TARGET_EXTRA) @@ -101,36 +101,36 @@ stamps/build-glibc-linux-headers: $(srcdir)/riscv-glibc stamps/build-gcc-linux-s cd $(notdir $@) && CC="$(GLIBC_CC_FOR_TARGET)" $</configure \ --host=riscv$(XLEN)-unknown-linux-gnu \ --prefix=$(SYSROOT)/usr \ - libc_cv_forced_unwind=yes \ - libc_cv_c_cleanup=yes \ --enable-shared \ - --enable-__thread \ + --with-headers=$(srcdir)/linux-headers/include \ --disable-multilib \ - --enable-kernel=2.6.32 + --enable-kernel=3.0.0 $(MAKE) -C $(notdir $@) install-headers mkdir -p $(dir $@) && touch $@ stamps/build-glibc-linux-%: $(srcdir)/riscv-glibc stamps/build-gcc-linux-stage1 + $(eval $@_ARCH := $(word 4,$(subst -, ,$@))) + $(eval $@_ABI := $(word 5,$(subst -, ,$@))) + $(eval $@_LIBDIRSUFFIX := $(if $($@_ABI),$(shell echo $($@_ARCH) | sed 's/.*rv\([0-9]*\).*/\1/')/$($@_ABI),)) + $(eval $@_XLEN := $(if $($@_ABI),$(shell echo $($@_ARCH) | sed 's/.*rv\([0-9]*\).*/\1/'),$(XLEN))) + $(eval $@_CFLAGS := $(if $($@_ABI),-march=$($@_ARCH) -mabi=$($@_ABI),)) + $(eval $@_LIBDIROPTS := $(if $@_LIBDIRSUFFIX,--libdir=/usr/lib$($@_LIBDIRSUFFIX) libc_cv_slibdir=/lib$($@_LIBDIRSUFFIX) libc_cv_rtlddir=/lib,)) rm -rf $@ $(notdir $@) mkdir $(notdir $@) cd $(notdir $@) && \ - CC="$(GLIBC_CC_FOR_TARGET) -march=$(word 4,$(subst -, ,$@)) -mabi=$(word 5,$(subst -, ,$@))" \ - CFLAGS="$(CFLAGS_FOR_TARGET) -g -O2 -march=$(word 4,$(subst -, ,$@)) -mabi=$(word 5,$(subst -, ,$@))" \ - ASFLAGS="$(ASFLAGS_FOR_TARGET) -march=$(word 4,$(subst -, ,$@)) -mabi=$(word 5,$(subst -, ,$@))" \ + CC="$(GLIBC_CC_FOR_TARGET) $($@_CFLAGS)" \ + CFLAGS="$(CFLAGS_FOR_TARGET) -g -O2 $($@_CFLAGS)" \ + ASFLAGS="$(ASFLAGS_FOR_TARGET) $($@_CFLAGS)" \ $</configure \ - --host=riscv$(XLEN)-unknown-linux-gnu \ + --host=riscv$($@_XLEN)-unknown-linux-gnu \ --prefix=/usr \ - libc_cv_forced_unwind=yes \ - libc_cv_c_cleanup=yes \ --disable-werror \ --enable-shared \ - --enable-__thread \ + --with-headers=$(srcdir)/linux-headers/include \ $(MULTILIB_FLAGS) \ - --enable-kernel=2.6.32 \ + --enable-kernel=3.0.0 \ $(GLIBC_TARGET_FLAGS) \ - $(if $(filter %d,$@),,--without-fp) \ - --libdir=/usr/lib$(shell echo $(word 4,$(subst -, ,$@)) | sed 's/.*rv\([0-9]*\).*/\1/')/$(word 5,$(subst -, ,$@)) \ - libc_cv_slibdir=/lib$(shell echo $(word 4,$(subst -, ,$@)) | sed 's/.*rv\([0-9]*\).*/\1/')/$(word 5,$(subst -, ,$@)) + $($@_LIBDIROPTS) $(MAKE) -C $(notdir $@) +flock $(SYSROOT)/.lock $(MAKE) -C $(notdir $@) install install_root=$(SYSROOT) mkdir -p $(dir $@) && touch $@ @@ -208,9 +208,8 @@ src/newlib-gcc: $(srcdir)/riscv-gcc rm -rf $@ $@.tmp mkdir -p $(dir $@) cp -a $< $@.tmp - cp -a $(srcdir)/riscv-newlib/newlib $@.tmp - cp -a $(srcdir)/riscv-newlib/libgloss $@.tmp - $(srcdir)/scripts/cp_s $(srcdir)/riscv-newlib $@.tmp + cp -a $(srcdir)/riscv-newlib/. $@.tmp + cp -a $</include/. $@.tmp/include mv $@.tmp $@ stamps/build-gcc-newlib: src/newlib-gcc stamps/build-binutils-newlib @@ -219,6 +218,7 @@ stamps/build-gcc-newlib: src/newlib-gcc stamps/build-binutils-newlib cd $(notdir $@) && $(CURDIR)/$</configure \ --target=riscv$(XLEN)-unknown-elf \ --prefix=$(INSTALL_DIR) \ + --without-headers \ --disable-shared \ --disable-threads \ --enable-languages=c,c++ \ diff --git a/riscv-binutils-gdb b/riscv-binutils-gdb -Subproject 2917a9f501cf2385b5e02fffeeb36313b3d6a1d +Subproject 08219b2a1168b2f1f8bcf8c2f299aef9b06a945 diff --git a/riscv-gcc b/riscv-gcc -Subproject cd5c51b0e8cabe5cb723dee35c020122d7920eb +Subproject 9127a1d09de81718014850edc77ed3e5b8ab625 diff --git a/riscv-glibc b/riscv-glibc -Subproject e84d3a58c42e29cc162efa0446bb0a1e3554dde +Subproject b9540ab1a32ce22218ab277c296baa6b503b11e |