Allow source-override for QEMU
This patch introduces a configure-time source-dir override for QEMU similar to the existing overrides for the other toolchain sources. Signed-off-by: Christoph Muellner <cmuellner@linux.com>
This commit is contained in:
parent
75b82e1f0b
commit
b83ee522a7
|
@ -9,6 +9,7 @@ GLIBC_SRCDIR := @with_glibc_src@
|
||||||
MUSL_SRCDIR := @with_musl_src@
|
MUSL_SRCDIR := @with_musl_src@
|
||||||
LINUX_HEADERS_SRCDIR := @with_linux_headers_src@
|
LINUX_HEADERS_SRCDIR := @with_linux_headers_src@
|
||||||
GDB_SRCDIR := @with_gdb_src@
|
GDB_SRCDIR := @with_gdb_src@
|
||||||
|
QEMU_SRCDIR := @with_qemu_src@
|
||||||
|
|
||||||
SIM:=qemu
|
SIM:=qemu
|
||||||
|
|
||||||
|
@ -243,6 +244,12 @@ else
|
||||||
GLIBC_SRC_GIT :=
|
GLIBC_SRC_GIT :=
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(findstring $(srcdir),$(QEMU_SRCDIR)),$(srcdir))
|
||||||
|
QEMU_SRC_GIT := $(QEMU_SRCDIR)/.git
|
||||||
|
else
|
||||||
|
QEMU_SRC_GIT :=
|
||||||
|
endif
|
||||||
|
|
||||||
ifneq ("$(wildcard $(GCC_SRCDIR)/.git)","")
|
ifneq ("$(wildcard $(GCC_SRCDIR)/.git)","")
|
||||||
GCCPKGVER := g$(shell git -C $(GCC_SRCDIR) describe --always --dirty --exclude '*')
|
GCCPKGVER := g$(shell git -C $(GCC_SRCDIR) describe --always --dirty --exclude '*')
|
||||||
else
|
else
|
||||||
|
@ -820,7 +827,7 @@ stamps/build-pk64: pk-src stamps/build-gcc-newlib-stage2
|
||||||
mkdir -p $(dir $@)
|
mkdir -p $(dir $@)
|
||||||
date > $@
|
date > $@
|
||||||
|
|
||||||
stamps/build-qemu: $(srcdir)/qemu $(srcdir)/qemu/.git
|
stamps/build-qemu: $(QEMU_SRCDIR) $(QEMU_SRC_GIT)
|
||||||
rm -rf $@ $(notdir $@)
|
rm -rf $@ $(notdir $@)
|
||||||
mkdir $(notdir $@)
|
mkdir $(notdir $@)
|
||||||
cd $(notdir $@) && $</configure \
|
cd $(notdir $@) && $</configure \
|
||||||
|
|
|
@ -240,4 +240,5 @@ Here is the list of configure option for specify source tree:
|
||||||
--with-musl-src
|
--with-musl-src
|
||||||
--with-gdb-src
|
--with-gdb-src
|
||||||
--with-linux-headers-src
|
--with-linux-headers-src
|
||||||
|
--with-qemu-src
|
||||||
|
|
||||||
|
|
|
@ -585,6 +585,7 @@ PACKAGE_URL=''
|
||||||
ac_subst_vars='LTLIBOBJS
|
ac_subst_vars='LTLIBOBJS
|
||||||
LIBOBJS
|
LIBOBJS
|
||||||
with_linux_headers_src
|
with_linux_headers_src
|
||||||
|
with_qemu_src
|
||||||
with_gdb_src
|
with_gdb_src
|
||||||
with_musl_src
|
with_musl_src
|
||||||
with_glibc_src
|
with_glibc_src
|
||||||
|
@ -686,6 +687,7 @@ with_newlib_src
|
||||||
with_glibc_src
|
with_glibc_src
|
||||||
with_musl_src
|
with_musl_src
|
||||||
with_gdb_src
|
with_gdb_src
|
||||||
|
with_qemu_src
|
||||||
with_linux_headers_src
|
with_linux_headers_src
|
||||||
'
|
'
|
||||||
ac_precious_vars='build_alias
|
ac_precious_vars='build_alias
|
||||||
|
@ -1352,6 +1354,7 @@ Optional Packages:
|
||||||
--with-glibc-src Set glibc source path, use builtin source by default
|
--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-musl-src Set musl source path, use builtin source by default
|
||||||
--with-gdb-src Set gdb 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
|
--with-linux-headers-src
|
||||||
Set linux-headers source path, use builtin source by
|
Set linux-headers source path, use builtin source by
|
||||||
default
|
default
|
||||||
|
@ -3614,6 +3617,25 @@ fi
|
||||||
else
|
else
|
||||||
with_gdb_src="\$(srcdir)/riscv-gdb"
|
with_gdb_src="\$(srcdir)/riscv-gdb"
|
||||||
|
|
||||||
|
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
|
fi
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -221,6 +221,7 @@ AX_ARG_WITH_SRC(newlib)
|
||||||
AX_ARG_WITH_SRC(glibc)
|
AX_ARG_WITH_SRC(glibc)
|
||||||
AX_ARG_WITH_SRC(musl)
|
AX_ARG_WITH_SRC(musl)
|
||||||
AX_ARG_WITH_SRC(gdb)
|
AX_ARG_WITH_SRC(gdb)
|
||||||
|
AX_ARG_WITH_SRC(qemu)
|
||||||
|
|
||||||
AC_ARG_WITH(linux-headers-src,
|
AC_ARG_WITH(linux-headers-src,
|
||||||
[AC_HELP_STRING([--with-linux-headers-src],
|
[AC_HELP_STRING([--with-linux-headers-src],
|
||||||
|
|
Loading…
Reference in New Issue