Browse Source

Add "--with-base-isa" support to autoconf

This allows someone to build a RV32I toolchain without going in and
messing with the Makefile directly.
pull/54/head
Palmer Dabbelt 11 years ago
parent
commit
0ddf033f72
  1. 10
      Makefile.in
  2. 7
      configure.ac

10
Makefile.in

@ -16,6 +16,7 @@ glibc_url := $(GNU_MIRROR)/glibc/glibc-$(glibc_version).tar.gz
newlib_url := ftp://sourceware.org/pub/newlib/newlib-$(newlib_version).tar.gz
XLEN ?= @XLEN@
BASE_ISA ?= @BASE_ISA@
SYSROOT := $(INSTALL_DIR)/sysroot
SHELL := /bin/sh
@ -159,7 +160,8 @@ stamps/build-gcc-linux-stage1: src/gcc stamps/build-binutils-linux \
--disable-libgomp \
--disable-nls \
$(MULTILIB_FLAGS) \
--disable-bootstrap
--disable-bootstrap \
--with-arch=RV$(XLEN)$(BASE_ISA)
$(MAKE) -C $(notdir $@) inhibit-libc=true all-gcc
$(MAKE) -C $(notdir $@) inhibit-libc=true install-gcc
$(MAKE) -C $(notdir $@) inhibit-libc=true all-target-libgcc
@ -182,7 +184,8 @@ stamps/build-gcc-linux-stage2: src/gcc stamps/build-glibc-linux$(XLEN) \
--disable-libquadmath \
--disable-nls \
$(MULTILIB_FLAGS) \
--disable-bootstrap
--disable-bootstrap \
--with-arch=RV$(XLEN)$(BASE_ISA)
$(MAKE) -C $(notdir $@)
$(MAKE) -C $(notdir $@) install
mkdir -p $(dir $@) && touch $@
@ -222,7 +225,8 @@ stamps/build-gcc-newlib: src/newlib-gcc stamps/build-binutils-newlib
--disable-libssp \
--disable-libquadmath \
--disable-libgomp \
--disable-nls
--disable-nls \
--with-arch=RV$(XLEN)$(BASE_ISA)
$(MAKE) -C $(notdir $@) inhibit-libc=true
$(MAKE) -C $(notdir $@) install
mkdir -p $(dir $@) && touch $@

7
configure.ac

@ -56,6 +56,13 @@ AC_ARG_WITH(xlen,
AC_SUBST(XLEN, 64)
)
AC_ARG_WITH(base-isa,
[AS_HELP_STRING([--with-base-isa=G/I],
[Sets the base RISC-V ISA to either G or I, defaults to G])],
AC_SUBST(BASE_ISA, $withval),
AC_SUBST(BASE_ISA, G)
)
AC_ARG_ENABLE(atomic,
[AS_HELP_STRING([--disable-atomic],
[disable use of atomic memory instructions in glibc @<:@--enable-atomic@:>@])],

Loading…
Cancel
Save