Browse Source

Merge pull request #54 from palmer-dabbelt/with-base-isa

Add "--with-base-isa" to configure
pull/55/head
Andrew Waterman 11 years ago
parent
commit
7c06819d01
  1. 10
      Makefile.in
  2. 16
      configure
  3. 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 newlib_url := ftp://sourceware.org/pub/newlib/newlib-$(newlib_version).tar.gz
XLEN ?= @XLEN@ XLEN ?= @XLEN@
BASE_ISA ?= @BASE_ISA@
SYSROOT := $(INSTALL_DIR)/sysroot SYSROOT := $(INSTALL_DIR)/sysroot
SHELL := /bin/sh SHELL := /bin/sh
@ -159,7 +160,8 @@ stamps/build-gcc-linux-stage1: src/gcc stamps/build-binutils-linux \
--disable-libgomp \ --disable-libgomp \
--disable-nls \ --disable-nls \
$(MULTILIB_FLAGS) \ $(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 all-gcc
$(MAKE) -C $(notdir $@) inhibit-libc=true install-gcc $(MAKE) -C $(notdir $@) inhibit-libc=true install-gcc
$(MAKE) -C $(notdir $@) inhibit-libc=true all-target-libgcc $(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-libquadmath \
--disable-nls \ --disable-nls \
$(MULTILIB_FLAGS) \ $(MULTILIB_FLAGS) \
--disable-bootstrap --disable-bootstrap \
--with-arch=RV$(XLEN)$(BASE_ISA)
$(MAKE) -C $(notdir $@) $(MAKE) -C $(notdir $@)
$(MAKE) -C $(notdir $@) install $(MAKE) -C $(notdir $@) install
mkdir -p $(dir $@) && touch $@ mkdir -p $(dir $@) && touch $@
@ -222,7 +225,8 @@ stamps/build-gcc-newlib: src/newlib-gcc stamps/build-binutils-newlib
--disable-libssp \ --disable-libssp \
--disable-libquadmath \ --disable-libquadmath \
--disable-libgomp \ --disable-libgomp \
--disable-nls --disable-nls \
--with-arch=RV$(XLEN)$(BASE_ISA)
$(MAKE) -C $(notdir $@) inhibit-libc=true $(MAKE) -C $(notdir $@) inhibit-libc=true
$(MAKE) -C $(notdir $@) install $(MAKE) -C $(notdir $@) install
mkdir -p $(dir $@) && touch $@ mkdir -p $(dir $@) && touch $@

16
configure

@ -589,6 +589,7 @@ glibc_configure_flags
float_asflags float_asflags
float_cflags float_cflags
atomic_cflags atomic_cflags
BASE_ISA
XLEN XLEN
default_target default_target
FETCHER FETCHER
@ -651,6 +652,7 @@ ac_user_opts='
enable_option_checking enable_option_checking
enable_linux enable_linux
with_xlen with_xlen
with_base_isa
enable_atomic enable_atomic
enable_float enable_float
enable_multilib enable_multilib
@ -1285,6 +1287,8 @@ Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-xlen=XLEN Set XLEN, the X-register bit width (default is 64) --with-xlen=XLEN Set XLEN, the X-register bit width (default is 64)
--with-base-isa=G/I Sets the base RISC-V ISA to either G or I, defaults
to G
Some influential environment variables: Some influential environment variables:
CC C compiler command CC C compiler command
@ -3147,6 +3151,18 @@ else
fi fi
# Check whether --with-base-isa was given.
if test "${with_base_isa+set}" = set; then :
withval=$with_base_isa; BASE_ISA=$withval
else
BASE_ISA=G
fi
# Check whether --enable-atomic was given. # Check whether --enable-atomic was given.
if test "${enable_atomic+set}" = set; then : if test "${enable_atomic+set}" = set; then :
enableval=$enable_atomic; enableval=$enable_atomic;

7
configure.ac

@ -56,6 +56,13 @@ AC_ARG_WITH(xlen,
AC_SUBST(XLEN, 64) 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, AC_ARG_ENABLE(atomic,
[AS_HELP_STRING([--disable-atomic], [AS_HELP_STRING([--disable-atomic],
[disable use of atomic memory instructions in glibc @<:@--enable-atomic@:>@])], [disable use of atomic memory instructions in glibc @<:@--enable-atomic@:>@])],

Loading…
Cancel
Save