diff options
author | Kito Cheng <kito.cheng@sifive.com> | 2022-02-11 15:24:33 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-11 15:24:33 +0800 |
commit | 217e7f3debe424d61374d31e33a091a630535937 (patch) | |
tree | d866a500194ab83e5d9e3b632381d38286c66420 | |
parent | 75b82e1f0b4fc8537305da7e5c6059cb8c73d54f (diff) | |
parent | b83ee522a712a60dabb6587130788add87cf3c49 (diff) | |
download | riscv-gnu-toolchain-2022.02.12.zip riscv-gnu-toolchain-2022.02.12.tar.gz riscv-gnu-toolchain-2022.02.12.tar.bz2 |
Merge pull request #1023 from cmuellner/riscv-mainline2022.02.12
Allow source-override for QEMU
-rw-r--r-- | Makefile.in | 9 | ||||
-rw-r--r-- | README.md | 1 | ||||
-rwxr-xr-x | configure | 22 | ||||
-rw-r--r-- | configure.ac | 1 |
4 files changed, 32 insertions, 1 deletions
diff --git a/Makefile.in b/Makefile.in index ede8573..3fe302d 100644 --- a/Makefile.in +++ b/Makefile.in @@ -9,6 +9,7 @@ GLIBC_SRCDIR := @with_glibc_src@ MUSL_SRCDIR := @with_musl_src@ LINUX_HEADERS_SRCDIR := @with_linux_headers_src@ GDB_SRCDIR := @with_gdb_src@ +QEMU_SRCDIR := @with_qemu_src@ SIM:=qemu @@ -243,6 +244,12 @@ else GLIBC_SRC_GIT := endif +ifeq ($(findstring $(srcdir),$(QEMU_SRCDIR)),$(srcdir)) +QEMU_SRC_GIT := $(QEMU_SRCDIR)/.git +else +QEMU_SRC_GIT := +endif + ifneq ("$(wildcard $(GCC_SRCDIR)/.git)","") GCCPKGVER := g$(shell git -C $(GCC_SRCDIR) describe --always --dirty --exclude '*') else @@ -820,7 +827,7 @@ stamps/build-pk64: pk-src stamps/build-gcc-newlib-stage2 mkdir -p $(dir $@) date > $@ -stamps/build-qemu: $(srcdir)/qemu $(srcdir)/qemu/.git +stamps/build-qemu: $(QEMU_SRCDIR) $(QEMU_SRC_GIT) rm -rf $@ $(notdir $@) mkdir $(notdir $@) cd $(notdir $@) && $</configure \ @@ -240,4 +240,5 @@ Here is the list of configure option for specify source tree: --with-musl-src --with-gdb-src --with-linux-headers-src + --with-qemu-src @@ -585,6 +585,7 @@ PACKAGE_URL='' ac_subst_vars='LTLIBOBJS LIBOBJS with_linux_headers_src +with_qemu_src with_gdb_src with_musl_src with_glibc_src @@ -686,6 +687,7 @@ with_newlib_src with_glibc_src with_musl_src with_gdb_src +with_qemu_src with_linux_headers_src ' ac_precious_vars='build_alias @@ -1352,6 +1354,7 @@ Optional Packages: --with-glibc-src Set glibc source path, use builtin source by default --with-musl-src Set musl source path, use builtin source by default --with-gdb-src Set gdb source path, use builtin source by default + --with-qemu-src Set qemu source path, use builtin source by default --with-linux-headers-src Set linux-headers source path, use builtin source by default @@ -3617,6 +3620,25 @@ else fi } +{ + +# Check whether --with-qemu-src was given. +if test "${with_qemu_src+set}" = set; then : + withval=$with_qemu_src; +else + with_qemu_src=default + +fi + + if test "x$with_qemu_src" != xdefault; then : + with_qemu_src=$with_qemu_src + +else + with_qemu_src="\$(srcdir)/riscv-qemu" + +fi + + } # Check whether --with-linux-headers-src was given. diff --git a/configure.ac b/configure.ac index 00d0372..ba7dc0e 100644 --- a/configure.ac +++ b/configure.ac @@ -221,6 +221,7 @@ AX_ARG_WITH_SRC(newlib) AX_ARG_WITH_SRC(glibc) AX_ARG_WITH_SRC(musl) AX_ARG_WITH_SRC(gdb) +AX_ARG_WITH_SRC(qemu) AC_ARG_WITH(linux-headers-src, [AC_HELP_STRING([--with-linux-headers-src], |