configure: Add support for building RISC-V host
Signed-off-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Michael Clark <mjc@sifive.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <52160afacecc5b109dc43a412fa3e74ddd6277fb.1545246859.git.alistair.francis@wdc.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
91468b2703
commit
c4f8054381
|
@ -710,6 +710,12 @@ elif check_define __s390__ ; then
|
||||||
else
|
else
|
||||||
cpu="s390"
|
cpu="s390"
|
||||||
fi
|
fi
|
||||||
|
elif check_define __riscv ; then
|
||||||
|
if check_define _LP64 ; then
|
||||||
|
cpu="riscv64"
|
||||||
|
else
|
||||||
|
cpu="riscv32"
|
||||||
|
fi
|
||||||
elif check_define __arm__ ; then
|
elif check_define __arm__ ; then
|
||||||
cpu="arm"
|
cpu="arm"
|
||||||
elif check_define __aarch64__ ; then
|
elif check_define __aarch64__ ; then
|
||||||
|
@ -722,7 +728,7 @@ ARCH=
|
||||||
# Normalise host CPU name and set ARCH.
|
# Normalise host CPU name and set ARCH.
|
||||||
# Note that this case should only have supported host CPUs, not guests.
|
# Note that this case should only have supported host CPUs, not guests.
|
||||||
case "$cpu" in
|
case "$cpu" in
|
||||||
ppc|ppc64|s390|s390x|sparc64|x32)
|
ppc|ppc64|s390|s390x|sparc64|x32|riscv32|riscv64)
|
||||||
cpu="$cpu"
|
cpu="$cpu"
|
||||||
supported_cpu="yes"
|
supported_cpu="yes"
|
||||||
eval "cross_cc_${cpu}=\$host_cc"
|
eval "cross_cc_${cpu}=\$host_cc"
|
||||||
|
@ -6937,6 +6943,8 @@ elif test "$ARCH" = "x86_64" -o "$ARCH" = "x32" ; then
|
||||||
QEMU_INCLUDES="-iquote \$(SRC_PATH)/tcg/i386 $QEMU_INCLUDES"
|
QEMU_INCLUDES="-iquote \$(SRC_PATH)/tcg/i386 $QEMU_INCLUDES"
|
||||||
elif test "$ARCH" = "ppc64" ; then
|
elif test "$ARCH" = "ppc64" ; then
|
||||||
QEMU_INCLUDES="-iquote \$(SRC_PATH)/tcg/ppc $QEMU_INCLUDES"
|
QEMU_INCLUDES="-iquote \$(SRC_PATH)/tcg/ppc $QEMU_INCLUDES"
|
||||||
|
elif test "$ARCH" = "riscv32" -o "$ARCH" = "riscv64" ; then
|
||||||
|
QEMU_INCLUDES="-I\$(SRC_PATH)/tcg/riscv $QEMU_INCLUDES"
|
||||||
else
|
else
|
||||||
QEMU_INCLUDES="-iquote \$(SRC_PATH)/tcg/\$(ARCH) $QEMU_INCLUDES"
|
QEMU_INCLUDES="-iquote \$(SRC_PATH)/tcg/\$(ARCH) $QEMU_INCLUDES"
|
||||||
fi
|
fi
|
||||||
|
@ -7433,7 +7441,7 @@ for i in $ARCH $TARGET_BASE_ARCH ; do
|
||||||
ppc*)
|
ppc*)
|
||||||
disas_config "PPC"
|
disas_config "PPC"
|
||||||
;;
|
;;
|
||||||
riscv)
|
riscv*)
|
||||||
disas_config "RISCV"
|
disas_config "RISCV"
|
||||||
;;
|
;;
|
||||||
s390*)
|
s390*)
|
||||||
|
|
Loading…
Reference in New Issue