diff options
-rw-r--r-- | Makefile.in | 22 | ||||
-rw-r--r-- | README.md | 11 | ||||
-rwxr-xr-x | configure | 16 | ||||
-rw-r--r-- | configure.ac | 8 |
4 files changed, 52 insertions, 5 deletions
diff --git a/Makefile.in b/Makefile.in index 61acd88..41fe4c5 100644 --- a/Makefile.in +++ b/Makefile.in @@ -33,6 +33,7 @@ endif WITH_ARCH ?= @WITH_ARCH@ WITH_ABI ?= @WITH_ABI@ WITH_TUNE ?= @WITH_TUNE@ +WITH_ISA_SPEC ?= @WITH_ISA_SPEC@ SYSROOT := $(INSTALL_DIR)/sysroot SHELL := /bin/sh @@ -288,7 +289,8 @@ stamps/build-binutils-linux: $(BINUTILS_SRCDIR) $(BINUTILS_SRC_GIT) stamps/check --disable-gdb \ --disable-sim \ --disable-libdecnumber \ - --disable-readline + --disable-readline \ + $(WITH_ISA_SPEC) $(MAKE) -C $(notdir $@) $(MAKE) -C $(notdir $@) install mkdir -p $(dir $@) && touch $@ @@ -395,6 +397,7 @@ stamps/build-gcc-linux-stage1: $(GCC_SRCDIR) $(GCC_SRC_GIT) stamps/build-binutil $(WITH_ABI) \ $(WITH_ARCH) \ $(WITH_TUNE) \ + $(WITH_ISA_SPEC) \ CFLAGS_FOR_TARGET="-O2 $(CFLAGS_FOR_TARGET)" \ CXXFLAGS_FOR_TARGET="-O2 $(CXXFLAGS_FOR_TARGET)" $(MAKE) -C $(notdir $@) inhibit-libc=true all-gcc @@ -432,6 +435,7 @@ stamps/build-gcc-linux-stage2: $(GCC_SRCDIR) $(GCC_SRC_GIT) $(addprefix stamps/b $(WITH_ABI) \ $(WITH_ARCH) \ $(WITH_TUNE) \ + $(WITH_ISA_SPEC) \ CFLAGS_FOR_TARGET="-O2 $(CFLAGS_FOR_TARGET)" \ CXXFLAGS_FOR_TARGET="-O2 $(CXXFLAGS_FOR_TARGET)" $(MAKE) -C $(notdir $@) @@ -455,7 +459,8 @@ stamps/build-binutils-linux-native: $(BINUTILS_SRCDIR) $(BINUTILS_SRC_GIT) stamp --disable-gdb \ --disable-sim \ --disable-libdecnumber \ - --disable-readline + --disable-readline \ + $(WITH_ISA_SPEC) $(MAKE) -C $(notdir $@) $(MAKE) -C $(notdir $@) install mkdir -p $(dir $@) && touch $@ @@ -483,7 +488,8 @@ stamps/build-gcc-linux-native: $(GCC_SRCDIR) $(GCC_SRC_GIT) stamps/build-gcc-lin $(MULTILIB_FLAGS) \ $(WITH_ABI) \ $(WITH_ARCH) \ - $(WITH_TUNE) + $(WITH_TUNE) \ + $(WITH_ISA_SPEC) \ $(MAKE) -C $(notdir $@) $(MAKE) -C $(notdir $@) install cp -a $(INSTALL_DIR)/$(LINUX_TUPLE)/lib* $(SYSROOT) @@ -507,7 +513,8 @@ stamps/build-binutils-newlib: $(BINUTILS_SRCDIR) $(BINUTILS_SRC_GIT) stamps/chec --disable-gdb \ --disable-sim \ --disable-libdecnumber \ - --disable-readline + --disable-readline \ + $(WITH_ISA_SPEC) $(MAKE) -C $(notdir $@) $(MAKE) -C $(notdir $@) install mkdir -p $(dir $@) && touch $@ @@ -560,6 +567,7 @@ stamps/build-gcc-newlib-stage1: $(GCC_SRCDIR) $(GCC_SRC_GIT) stamps/build-binuti $(WITH_ABI) \ $(WITH_ARCH) \ $(WITH_TUNE) \ + $(WITH_ISA_SPEC) \ CFLAGS_FOR_TARGET="-Os $(CFLAGS_FOR_TARGET)" \ CXXFLAGS_FOR_TARGET="-Os $(CXXFLAGS_FOR_TARGET)" $(MAKE) -C $(notdir $@) all-gcc @@ -659,6 +667,7 @@ stamps/build-gcc-newlib-stage2: $(GCC_SRCDIR) $(GCC_SRC_GIT) stamps/build-newlib $(WITH_ABI) \ $(WITH_ARCH) \ $(WITH_TUNE) \ + $(WITH_ISA_SPEC) \ CFLAGS_FOR_TARGET="-Os $(CFLAGS_FOR_TARGET)" \ CXXFLAGS_FOR_TARGET="-Os $(CXXFLAGS_FOR_TARGET)" $(MAKE) -C $(notdir $@) @@ -686,7 +695,8 @@ stamps/build-binutils-musl: $(BINUTILS_SRCDIR) $(BINUTILS_SRC_GIT) stamps/check- --disable-gdb \ --disable-sim \ --disable-libdecnumber \ - --disable-readline + --disable-readline \ + $(WITH_ISA_SPEC) $(MAKE) -C $(notdir $@) $(MAKE) -C $(notdir $@) install mkdir -p $(dir $@) && touch $@ @@ -719,6 +729,7 @@ stamps/build-gcc-musl-stage1: $(GCC_SRCDIR) $(GCC_SRC_GIT) stamps/build-binutils $(WITH_ABI) \ $(WITH_ARCH) \ $(WITH_TUNE) \ + $(WITH_ISA_SPEC) \ CFLAGS_FOR_TARGET="-O2 $(CFLAGS_FOR_TARGET)" \ CXXFLAGS_FOR_TARGET="-O2 $(CXXFLAGS_FOR_TARGET)" $(MAKE) -C $(notdir $@) inhibit-libc=true all-gcc @@ -786,6 +797,7 @@ stamps/build-gcc-musl-stage2: $(GCC_SRCDIR) $(GCC_SRC_GIT) stamps/build-musl-lin $(WITH_ABI) \ $(WITH_ARCH) \ $(WITH_TUNE) \ + $(WITH_ISA_SPEC) \ CFLAGS_FOR_TARGET="-O2 $(CFLAGS_FOR_TARGET)" \ CXXFLAGS_FOR_TARGET="-O2 $(CXXFLAGS_FOR_TARGET)" $(MAKE) -C $(notdir $@) @@ -137,6 +137,17 @@ devtoolset-7 works. There are a number of additional options that may be passed to configure. See './configure --help' for more details. +#### Set default ISA spec version + +`--with-isa-spec=` can specify the default version of the RISC-V Unprivileged +(formerly User-Level) ISA specification. + +Possible options are: `2.2`, `20190608` and `20191213`. + +The default version is `2.2`. + +More details about this option you can refer this post [RISC-V GNU toolchain bumping default ISA spec to 20191213](https://groups.google.com/a/groups.riscv.org/g/sw-dev/c/aE1ZeHHCYf4). + #### Build with customized multi-lib configure. `--with-multilib-generator=` can specify what multilibs to build. The argument @@ -604,6 +604,7 @@ newlib_multilib_names glibc_multilib_names multilib_flags multilib_gen +WITH_ISA_SPEC WITH_TUNE WITH_ABI WITH_ARCH @@ -671,6 +672,7 @@ enable_linux with_arch with_abi with_tune +with_isa_spec enable_multilib with_multilib_generator enable_gcc_checking @@ -1333,6 +1335,8 @@ Optional Packages: --with-arch=rv64imafdc Sets the base RISC-V ISA, defaults to rv64imafdc --with-abi=lp64d Sets the base RISC-V ABI, defaults to lp64d --with-tune=rocket Set the base RISC-V CPU, defaults to rocket + --with-isa-spec=2.2 Set the default ISA spec version, default to 2.2, + available options: 2.2, 20190608, 20191213 --with-multilib-generator Multi-libs configuration string, only supported for bare-metal/elf toolchaih, this option implied @@ -3301,6 +3305,16 @@ else fi + +# Check whether --with-isa-spec was given. +if test "${with_isa_spec+set}" = set; then : + withval=$with_isa_spec; +else + with_isa_spec=2.2 + +fi + + if test "x$with_abi" = xdefault; then : case $with_arch in #( *rv64g* | *rv64*d*) : @@ -3329,6 +3343,8 @@ WITH_ABI=--with-abi=$with_abi WITH_TUNE=--with-tune=$with_tune +WITH_ISA_SPEC=--with-isa-spec=$with_isa_spec + # Check whether --enable-multilib was given. if test "${enable_multilib+set}" = set; then : diff --git a/configure.ac b/configure.ac index 78095a9..55c719e 100644 --- a/configure.ac +++ b/configure.ac @@ -71,6 +71,13 @@ AC_ARG_WITH(tune, [with_tune=rocket] ) +AC_ARG_WITH(isa-spec, + [AS_HELP_STRING([--with-isa-spec=2.2], + [Set the default ISA spec version, default to 2.2, available options: 2.2, 20190608, 20191213])], + [], + [with_isa_spec=2.2] + ) + AS_IF([test "x$with_abi" = xdefault], [AS_CASE([$with_arch], [*rv64g* | *rv64*d*], [with_abi=lp64d], @@ -86,6 +93,7 @@ AS_IF([test "x$with_abi" = xdefault], AC_SUBST(WITH_ARCH, --with-arch=$with_arch) AC_SUBST(WITH_ABI, --with-abi=$with_abi) AC_SUBST(WITH_TUNE, --with-tune=$with_tune) +AC_SUBST(WITH_ISA_SPEC, --with-isa-spec=$with_isa_spec) AC_ARG_ENABLE(multilib, [AS_HELP_STRING([--enable-multilib], |