Testing fixes:
- podman cleanups - docker.py python3 fixes (encode) - DEF_TARGET_LIST applied to cross build images - move a bunch to Buster based images - enable Travis caching - more common objs for faster builds - stable URLs for acceptance tests - additional travis dependencies - work around ppc64abi32 linux-test breakage [v2] -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEZoWumedRZ7yvyN81+9DbCVqeKkQFAl13ohAACgkQ+9DbCVqe KkTQXQf/SH/39IC8n896A+v7NLSHaKBCh/HPfCYKv/5FekBT14Jub4wCkUkTIGie QLXwS+JLFicdtWmE0y/9uHYu/s9aLJDCFPCjRCtwDAM3Hdie//vNyG8UmD5+Jxl1 G2XbP+dAAKE3g/O+MsJsM+vw0JQAmqmF/fTDE4M4ocTsSxsR+ZRnwIIEXx3vTKbf 5evFefgh1CZxyQtY1AlD2CY+3UGAihfvkRBxx6yT+IgGVNy/8ERRoCjZvS5vL2b5 vwlxAtQgHHgQyKxlAgmMiXtJwRrCM+YqfQgTB7C9aMntZY6PsoxscZOtHey6sc8E I9W/Lc1a1YauKhZQ9oXK1HZwvDjS9Q== =U3aO -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/stsquad/tags/pull-testing-next-100919-2' into staging Testing fixes: - podman cleanups - docker.py python3 fixes (encode) - DEF_TARGET_LIST applied to cross build images - move a bunch to Buster based images - enable Travis caching - more common objs for faster builds - stable URLs for acceptance tests - additional travis dependencies - work around ppc64abi32 linux-test breakage [v2] # gpg: Signature made Tue 10 Sep 2019 14:16:00 BST # gpg: using RSA key 6685AE99E75167BCAFC8DF35FBD0DB095A9E2A44 # gpg: Good signature from "Alex Bennée (Master Work Key) <alex.bennee@linaro.org>" [full] # Primary key fingerprint: 6685 AE99 E751 67BC AFC8 DF35 FBD0 DB09 5A9E 2A44 * remotes/stsquad/tags/pull-testing-next-100919-2: (46 commits) tests/tcg: fix typo when calling clean-tcg travis.yml: Install libcap-dev for testing virito-9p Fedora images: use URLs from stable "archives.fedoraproject.org" .travis.yml: Cache Linux/Clang jobs together .travis.yml: Cache Linux/GCC 'non-debug profile' jobs together .travis.yml: Cache Linux/GCC 'debug profile' jobs together .travis.yml: Document how the build matrix use caches .travis.yml: Enable ccache on OSX .travis.yml: Improve ccache use .travis.yml: Cache Avocado cache .travis.yml: Cache Python PIP packages .travis.yml: Increase cache timeout from 3min to 20min .travis.yml: Enable multiple caching features configure: check if --no-pie is supported first tests/docker: --disable-libssh on ubuntu1804 builds tests/docker: add more images to PARTIAL_IMAGES when not on x86_64 tests/docker: use --arch-only for installing deps tests/docker: add debian-amd64-cross for non-x86 hosts tests/docker: avoid $SHELL invoke bash directly tests/docker: add debian9-mxe to DEBIAN_PARTIAL_IMAGES ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
6d2fdde42c
@ -27,6 +27,8 @@ env:
|
|||||||
TARGET_LIST=ppc64-softmmu,ppc64-linux-user,ppc64abi32-linux-user
|
TARGET_LIST=ppc64-softmmu,ppc64-linux-user,ppc64abi32-linux-user
|
||||||
build:
|
build:
|
||||||
pre_ci:
|
pre_ci:
|
||||||
|
# usually host ARCH is set by configure
|
||||||
|
- echo "ARCH=$(uname -m)" > config-host.mak
|
||||||
- make docker-image-${IMAGE} V=1
|
- make docker-image-${IMAGE} V=1
|
||||||
pre_ci_boot:
|
pre_ci_boot:
|
||||||
image_name: qemu
|
image_name: qemu
|
||||||
|
40
.travis.yml
40
.travis.yml
@ -5,7 +5,18 @@ dist: xenial
|
|||||||
language: c
|
language: c
|
||||||
compiler:
|
compiler:
|
||||||
- gcc
|
- gcc
|
||||||
cache: ccache
|
cache:
|
||||||
|
# There is one cache per branch and compiler version.
|
||||||
|
# characteristics of each job are used to identify the cache:
|
||||||
|
# - OS name (currently, linux, osx, or windows)
|
||||||
|
# - OS distribution (for Linux, xenial, trusty, or precise)
|
||||||
|
# - macOS image name (e.g., xcode7.2)
|
||||||
|
# - Names and values of visible environment variables set in .travis.yml or Settings panel
|
||||||
|
timeout: 1200
|
||||||
|
ccache: true
|
||||||
|
pip: true
|
||||||
|
directories:
|
||||||
|
- $HOME/avocado/data/cache
|
||||||
|
|
||||||
|
|
||||||
addons:
|
addons:
|
||||||
@ -15,6 +26,7 @@ addons:
|
|||||||
- libaio-dev
|
- libaio-dev
|
||||||
- libattr1-dev
|
- libattr1-dev
|
||||||
- libbrlapi-dev
|
- libbrlapi-dev
|
||||||
|
- libcap-dev
|
||||||
- libcap-ng-dev
|
- libcap-ng-dev
|
||||||
- libgcc-4.8-dev
|
- libgcc-4.8-dev
|
||||||
- libgnutls-dev
|
- libgnutls-dev
|
||||||
@ -40,6 +52,7 @@ addons:
|
|||||||
- gcovr
|
- gcovr
|
||||||
homebrew:
|
homebrew:
|
||||||
packages:
|
packages:
|
||||||
|
- ccache
|
||||||
- glib
|
- glib
|
||||||
- pixman
|
- pixman
|
||||||
- gnu-sed
|
- gnu-sed
|
||||||
@ -65,6 +78,9 @@ env:
|
|||||||
- TEST_CMD="make check -j3 V=1"
|
- TEST_CMD="make check -j3 V=1"
|
||||||
# This is broadly a list of "mainline" softmmu targets which have support across the major distros
|
# This is broadly a list of "mainline" softmmu targets which have support across the major distros
|
||||||
- MAIN_SOFTMMU_TARGETS="aarch64-softmmu,arm-softmmu,i386-softmmu,mips-softmmu,mips64-softmmu,ppc64-softmmu,riscv64-softmmu,s390x-softmmu,x86_64-softmmu"
|
- MAIN_SOFTMMU_TARGETS="aarch64-softmmu,arm-softmmu,i386-softmmu,mips-softmmu,mips64-softmmu,ppc64-softmmu,riscv64-softmmu,s390x-softmmu,x86_64-softmmu"
|
||||||
|
- CCACHE_SLOPPINESS="include_file_ctime,include_file_mtime"
|
||||||
|
- CCACHE_MAXSIZE=1G
|
||||||
|
|
||||||
|
|
||||||
git:
|
git:
|
||||||
# we want to do this ourselves
|
# we want to do this ourselves
|
||||||
@ -72,25 +88,32 @@ git:
|
|||||||
|
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
|
- if [ "$TRAVIS_OS_NAME" == "osx" ] ; then export PATH="/usr/local/opt/ccache/libexec:$PATH" ; fi
|
||||||
|
- command -v ccache && ccache --zero-stats
|
||||||
- mkdir -p ${BUILD_DIR} && cd ${BUILD_DIR}
|
- mkdir -p ${BUILD_DIR} && cd ${BUILD_DIR}
|
||||||
- ${SRC_DIR}/configure ${BASE_CONFIG} ${CONFIG} || { cat config.log && exit 1; }
|
- ${SRC_DIR}/configure ${BASE_CONFIG} ${CONFIG} || { cat config.log && exit 1; }
|
||||||
script:
|
script:
|
||||||
- make -j3 && travis_retry ${TEST_CMD}
|
- make -j3 && travis_retry ${TEST_CMD}
|
||||||
|
after_script:
|
||||||
|
- command -v ccache && ccache --show-stats
|
||||||
|
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- env:
|
- env:
|
||||||
- CONFIG="--disable-system --static"
|
- CONFIG="--disable-system --static"
|
||||||
|
- CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default"
|
||||||
|
|
||||||
|
|
||||||
# we split the system builds as it takes a while to build them all
|
# we split the system builds as it takes a while to build them all
|
||||||
- env:
|
- env:
|
||||||
- CONFIG="--disable-user --target-list=${MAIN_SOFTMMU_TARGETS}"
|
- CONFIG="--disable-user --target-list=${MAIN_SOFTMMU_TARGETS}"
|
||||||
|
- CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default"
|
||||||
|
|
||||||
|
|
||||||
- env:
|
- env:
|
||||||
- CONFIG="--disable-user --target-list-exclude=${MAIN_SOFTMMU_TARGETS}"
|
- CONFIG="--disable-user --target-list-exclude=${MAIN_SOFTMMU_TARGETS}"
|
||||||
|
- CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default"
|
||||||
|
|
||||||
|
|
||||||
# Just build tools and run minimal unit and softfloat checks
|
# Just build tools and run minimal unit and softfloat checks
|
||||||
@ -98,14 +121,18 @@ matrix:
|
|||||||
- BASE_CONFIG="--enable-tools"
|
- BASE_CONFIG="--enable-tools"
|
||||||
- CONFIG="--disable-user --disable-system"
|
- CONFIG="--disable-user --disable-system"
|
||||||
- TEST_CMD="make check-unit check-softfloat -j3"
|
- TEST_CMD="make check-unit check-softfloat -j3"
|
||||||
|
- CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default"
|
||||||
|
|
||||||
|
|
||||||
- env:
|
- env:
|
||||||
- CONFIG="--enable-debug --enable-debug-tcg --disable-user"
|
- CONFIG="--enable-debug --enable-debug-tcg --disable-user"
|
||||||
|
- CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-debug"
|
||||||
|
|
||||||
|
|
||||||
# TCG debug can be run just on it's own and is mostly agnostic to user/softmmu distinctions
|
# TCG debug can be run just on it's own and is mostly agnostic to user/softmmu distinctions
|
||||||
- env:
|
- env:
|
||||||
- CONFIG="--enable-debug-tcg --disable-system"
|
- CONFIG="--enable-debug-tcg --disable-system"
|
||||||
|
- CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-debug"
|
||||||
|
|
||||||
|
|
||||||
- env:
|
- env:
|
||||||
@ -115,6 +142,7 @@ matrix:
|
|||||||
# Module builds are mostly of interest to major distros
|
# Module builds are mostly of interest to major distros
|
||||||
- env:
|
- env:
|
||||||
- CONFIG="--enable-modules --target-list=${MAIN_SOFTMMU_TARGETS}"
|
- CONFIG="--enable-modules --target-list=${MAIN_SOFTMMU_TARGETS}"
|
||||||
|
- CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default"
|
||||||
|
|
||||||
|
|
||||||
# Alternate coroutines implementations are only really of interest to KVM users
|
# Alternate coroutines implementations are only really of interest to KVM users
|
||||||
@ -134,6 +162,7 @@ matrix:
|
|||||||
- BUILD_DIR="out-of-tree/build/dir" SRC_DIR="../../.."
|
- BUILD_DIR="out-of-tree/build/dir" SRC_DIR="../../.."
|
||||||
- BASE_CONFIG="--enable-tools --enable-docs"
|
- BASE_CONFIG="--enable-tools --enable-docs"
|
||||||
- CONFIG="--target-list=x86_64-softmmu,aarch64-linux-user"
|
- CONFIG="--target-list=x86_64-softmmu,aarch64-linux-user"
|
||||||
|
- CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default"
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
packages:
|
packages:
|
||||||
@ -145,11 +174,13 @@ matrix:
|
|||||||
# Test with Clang for compile portability (Travis uses clang-5.0)
|
# Test with Clang for compile portability (Travis uses clang-5.0)
|
||||||
- env:
|
- env:
|
||||||
- CONFIG="--disable-system"
|
- CONFIG="--disable-system"
|
||||||
|
- CACHE_NAME="${TRAVIS_BRANCH}-linux-clang-default"
|
||||||
compiler: clang
|
compiler: clang
|
||||||
|
|
||||||
|
|
||||||
- env:
|
- env:
|
||||||
- CONFIG="--disable-user --target-list=${MAIN_SOFTMMU_TARGETS}"
|
- CONFIG="--disable-user --target-list=${MAIN_SOFTMMU_TARGETS}"
|
||||||
|
- CACHE_NAME="${TRAVIS_BRANCH}-linux-clang-default"
|
||||||
compiler: clang
|
compiler: clang
|
||||||
|
|
||||||
|
|
||||||
@ -162,6 +193,7 @@ matrix:
|
|||||||
|
|
||||||
- env:
|
- env:
|
||||||
- CONFIG="--disable-user --target-list-exclude=${MAIN_SOFTMMU_TARGETS}"
|
- CONFIG="--disable-user --target-list-exclude=${MAIN_SOFTMMU_TARGETS}"
|
||||||
|
- CACHE_NAME="${TRAVIS_BRANCH}-linux-clang-default"
|
||||||
compiler: clang
|
compiler: clang
|
||||||
|
|
||||||
|
|
||||||
@ -175,6 +207,7 @@ matrix:
|
|||||||
# We manually include builds which we disable "make check" for
|
# We manually include builds which we disable "make check" for
|
||||||
- env:
|
- env:
|
||||||
- CONFIG="--without-default-devices --disable-user"
|
- CONFIG="--without-default-devices --disable-user"
|
||||||
|
- CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default"
|
||||||
- TEST_CMD=""
|
- TEST_CMD=""
|
||||||
|
|
||||||
|
|
||||||
@ -218,6 +251,7 @@ matrix:
|
|||||||
# Python builds
|
# Python builds
|
||||||
- env:
|
- env:
|
||||||
- CONFIG="--target-list=x86_64-softmmu"
|
- CONFIG="--target-list=x86_64-softmmu"
|
||||||
|
- CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default"
|
||||||
language: python
|
language: python
|
||||||
python:
|
python:
|
||||||
- "3.4"
|
- "3.4"
|
||||||
@ -225,6 +259,7 @@ matrix:
|
|||||||
|
|
||||||
- env:
|
- env:
|
||||||
- CONFIG="--target-list=x86_64-softmmu"
|
- CONFIG="--target-list=x86_64-softmmu"
|
||||||
|
- CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default"
|
||||||
language: python
|
language: python
|
||||||
python:
|
python:
|
||||||
- "3.6"
|
- "3.6"
|
||||||
@ -296,8 +331,11 @@ matrix:
|
|||||||
- env:
|
- env:
|
||||||
- CONFIG="--disable-system"
|
- CONFIG="--disable-system"
|
||||||
- TEST_CMD="make -j3 check-tcg V=1"
|
- TEST_CMD="make -j3 check-tcg V=1"
|
||||||
|
- CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default"
|
||||||
|
|
||||||
|
|
||||||
# Run check-tcg against softmmu targets
|
# Run check-tcg against softmmu targets
|
||||||
- env:
|
- env:
|
||||||
- CONFIG="--target-list=xtensa-softmmu,arm-softmmu,aarch64-softmmu,alpha-softmmu"
|
- CONFIG="--target-list=xtensa-softmmu,arm-softmmu,aarch64-softmmu,alpha-softmmu"
|
||||||
- TEST_CMD="make -j3 check-tcg V=1"
|
- TEST_CMD="make -j3 check-tcg V=1"
|
||||||
|
- CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default"
|
||||||
|
1
Makefile
1
Makefile
@ -717,6 +717,7 @@ endef
|
|||||||
|
|
||||||
distclean: clean
|
distclean: clean
|
||||||
rm -f config-host.mak config-host.h* config-host.ld $(DOCS) qemu-options.texi qemu-img-cmds.texi qemu-monitor.texi qemu-monitor-info.texi
|
rm -f config-host.mak config-host.h* config-host.ld $(DOCS) qemu-options.texi qemu-img-cmds.texi qemu-monitor.texi qemu-monitor-info.texi
|
||||||
|
rm -f tests/tcg/config-*.mak
|
||||||
rm -f config-all-devices.mak config-all-disas.mak config.status
|
rm -f config-all-devices.mak config-all-disas.mak config.status
|
||||||
rm -f $(SUBDIR_DEVICES_MAK)
|
rm -f $(SUBDIR_DEVICES_MAK)
|
||||||
rm -f po/*.mo tests/qemu-iotests/common.env
|
rm -f po/*.mo tests/qemu-iotests/common.env
|
||||||
|
@ -39,9 +39,6 @@ endif
|
|||||||
PROGS=$(QEMU_PROG) $(QEMU_PROGW)
|
PROGS=$(QEMU_PROG) $(QEMU_PROGW)
|
||||||
STPFILES=
|
STPFILES=
|
||||||
|
|
||||||
# Makefile Tests
|
|
||||||
include $(SRC_PATH)/tests/tcg/Makefile.include
|
|
||||||
|
|
||||||
config-target.h: config-target.h-timestamp
|
config-target.h: config-target.h-timestamp
|
||||||
config-target.h-timestamp: config-target.mak
|
config-target.h-timestamp: config-target.mak
|
||||||
|
|
||||||
|
168
configure
vendored
168
configure
vendored
@ -495,27 +495,10 @@ qed="yes"
|
|||||||
parallels="yes"
|
parallels="yes"
|
||||||
sheepdog="yes"
|
sheepdog="yes"
|
||||||
libxml2=""
|
libxml2=""
|
||||||
docker="no"
|
|
||||||
debug_mutex="no"
|
debug_mutex="no"
|
||||||
libpmem=""
|
libpmem=""
|
||||||
default_devices="yes"
|
default_devices="yes"
|
||||||
|
|
||||||
# cross compilers defaults, can be overridden with --cross-cc-ARCH
|
|
||||||
cross_cc_aarch64="aarch64-linux-gnu-gcc"
|
|
||||||
cross_cc_aarch64_be="$cross_cc_aarch64"
|
|
||||||
cross_cc_cflags_aarch64_be="-mbig-endian"
|
|
||||||
cross_cc_arm="arm-linux-gnueabihf-gcc"
|
|
||||||
cross_cc_cflags_armeb="-mbig-endian"
|
|
||||||
cross_cc_i386="i386-pc-linux-gnu-gcc"
|
|
||||||
cross_cc_cflags_i386=""
|
|
||||||
cross_cc_ppc="powerpc-linux-gnu-gcc"
|
|
||||||
cross_cc_cflags_ppc="-m32"
|
|
||||||
cross_cc_ppc64="powerpc-linux-gnu-gcc"
|
|
||||||
cross_cc_cflags_ppc64="-m64"
|
|
||||||
cross_cc_ppc64le="powerpc64le-linux-gnu-gcc"
|
|
||||||
|
|
||||||
enabled_cross_compilers=""
|
|
||||||
|
|
||||||
supported_cpu="no"
|
supported_cpu="no"
|
||||||
supported_os="no"
|
supported_os="no"
|
||||||
bogus_os="no"
|
bogus_os="no"
|
||||||
@ -548,9 +531,12 @@ for opt do
|
|||||||
;;
|
;;
|
||||||
--cross-cc-cflags-*) cc_arch=${opt#--cross-cc-flags-}; cc_arch=${cc_arch%%=*}
|
--cross-cc-cflags-*) cc_arch=${opt#--cross-cc-flags-}; cc_arch=${cc_arch%%=*}
|
||||||
eval "cross_cc_cflags_${cc_arch}=\$optarg"
|
eval "cross_cc_cflags_${cc_arch}=\$optarg"
|
||||||
|
cross_cc_vars="$cross_cc_vars cross_cc_cflags_${cc_arch}"
|
||||||
;;
|
;;
|
||||||
--cross-cc-*) cc_arch=${opt#--cross-cc-}; cc_arch=${cc_arch%%=*}
|
--cross-cc-*) cc_arch=${opt#--cross-cc-}; cc_arch=${cc_arch%%=*}
|
||||||
|
cc_archs="$cc_archs $cc_arch"
|
||||||
eval "cross_cc_${cc_arch}=\$optarg"
|
eval "cross_cc_${cc_arch}=\$optarg"
|
||||||
|
cross_cc_vars="$cross_cc_vars cross_cc_${cc_arch}"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
@ -745,42 +731,34 @@ ARCH=
|
|||||||
case "$cpu" in
|
case "$cpu" in
|
||||||
ppc|ppc64|s390|s390x|sparc64|x32|riscv32|riscv64)
|
ppc|ppc64|s390|s390x|sparc64|x32|riscv32|riscv64)
|
||||||
supported_cpu="yes"
|
supported_cpu="yes"
|
||||||
eval "cross_cc_${cpu}=\$host_cc"
|
|
||||||
;;
|
;;
|
||||||
ppc64le)
|
ppc64le)
|
||||||
ARCH="ppc64"
|
ARCH="ppc64"
|
||||||
supported_cpu="yes"
|
supported_cpu="yes"
|
||||||
cross_cc_ppc64le=$host_cc
|
|
||||||
;;
|
;;
|
||||||
i386|i486|i586|i686|i86pc|BePC)
|
i386|i486|i586|i686|i86pc|BePC)
|
||||||
cpu="i386"
|
cpu="i386"
|
||||||
supported_cpu="yes"
|
supported_cpu="yes"
|
||||||
cross_cc_i386=$host_cc
|
|
||||||
;;
|
;;
|
||||||
x86_64|amd64)
|
x86_64|amd64)
|
||||||
cpu="x86_64"
|
cpu="x86_64"
|
||||||
supported_cpu="yes"
|
supported_cpu="yes"
|
||||||
cross_cc_x86_64=$host_cc
|
|
||||||
;;
|
;;
|
||||||
armv*b|armv*l|arm)
|
armv*b|armv*l|arm)
|
||||||
cpu="arm"
|
cpu="arm"
|
||||||
supported_cpu="yes"
|
supported_cpu="yes"
|
||||||
cross_cc_arm=$host_cc
|
|
||||||
;;
|
;;
|
||||||
aarch64)
|
aarch64)
|
||||||
cpu="aarch64"
|
cpu="aarch64"
|
||||||
supported_cpu="yes"
|
supported_cpu="yes"
|
||||||
cross_cc_aarch64=$host_cc
|
|
||||||
;;
|
;;
|
||||||
mips*)
|
mips*)
|
||||||
cpu="mips"
|
cpu="mips"
|
||||||
supported_cpu="yes"
|
supported_cpu="yes"
|
||||||
cross_cc_mips=$host_cc
|
|
||||||
;;
|
;;
|
||||||
sparc|sun4[cdmuv])
|
sparc|sun4[cdmuv])
|
||||||
cpu="sparc"
|
cpu="sparc"
|
||||||
supported_cpu="yes"
|
supported_cpu="yes"
|
||||||
cross_cc_sparc=$host_cc
|
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
# This will result in either an error or falling back to TCI later
|
# This will result in either an error or falling back to TCI later
|
||||||
@ -1555,44 +1533,30 @@ case "$cpu" in
|
|||||||
ppc)
|
ppc)
|
||||||
CPU_CFLAGS="-m32"
|
CPU_CFLAGS="-m32"
|
||||||
LDFLAGS="-m32 $LDFLAGS"
|
LDFLAGS="-m32 $LDFLAGS"
|
||||||
cross_cc_ppc=$cc
|
|
||||||
cross_cc_cflags_ppc="$CPU_CFLAGS"
|
|
||||||
;;
|
;;
|
||||||
ppc64)
|
ppc64)
|
||||||
CPU_CFLAGS="-m64"
|
CPU_CFLAGS="-m64"
|
||||||
LDFLAGS="-m64 $LDFLAGS"
|
LDFLAGS="-m64 $LDFLAGS"
|
||||||
cross_cc_ppc64=$cc
|
|
||||||
cross_cc_cflags_ppc64="$CPU_CFLAGS"
|
|
||||||
;;
|
;;
|
||||||
sparc)
|
sparc)
|
||||||
CPU_CFLAGS="-m32 -mv8plus -mcpu=ultrasparc"
|
CPU_CFLAGS="-m32 -mv8plus -mcpu=ultrasparc"
|
||||||
LDFLAGS="-m32 -mv8plus $LDFLAGS"
|
LDFLAGS="-m32 -mv8plus $LDFLAGS"
|
||||||
cross_cc_sparc=$cc
|
|
||||||
cross_cc_cflags_sparc="$CPU_CFLAGS"
|
|
||||||
;;
|
;;
|
||||||
sparc64)
|
sparc64)
|
||||||
CPU_CFLAGS="-m64 -mcpu=ultrasparc"
|
CPU_CFLAGS="-m64 -mcpu=ultrasparc"
|
||||||
LDFLAGS="-m64 $LDFLAGS"
|
LDFLAGS="-m64 $LDFLAGS"
|
||||||
cross_cc_sparc64=$cc
|
|
||||||
cross_cc_cflags_sparc64="$CPU_CFLAGS"
|
|
||||||
;;
|
;;
|
||||||
s390)
|
s390)
|
||||||
CPU_CFLAGS="-m31"
|
CPU_CFLAGS="-m31"
|
||||||
LDFLAGS="-m31 $LDFLAGS"
|
LDFLAGS="-m31 $LDFLAGS"
|
||||||
cross_cc_s390=$cc
|
|
||||||
cross_cc_cflags_s390="$CPU_CFLAGS"
|
|
||||||
;;
|
;;
|
||||||
s390x)
|
s390x)
|
||||||
CPU_CFLAGS="-m64"
|
CPU_CFLAGS="-m64"
|
||||||
LDFLAGS="-m64 $LDFLAGS"
|
LDFLAGS="-m64 $LDFLAGS"
|
||||||
cross_cc_s390x=$cc
|
|
||||||
cross_cc_cflags_s390x="$CPU_CFLAGS"
|
|
||||||
;;
|
;;
|
||||||
i386)
|
i386)
|
||||||
CPU_CFLAGS="-m32"
|
CPU_CFLAGS="-m32"
|
||||||
LDFLAGS="-m32 $LDFLAGS"
|
LDFLAGS="-m32 $LDFLAGS"
|
||||||
cross_cc_i386=$cc
|
|
||||||
cross_cc_cflags_i386="$CPU_CFLAGS"
|
|
||||||
;;
|
;;
|
||||||
x86_64)
|
x86_64)
|
||||||
# ??? Only extremely old AMD cpus do not have cmpxchg16b.
|
# ??? Only extremely old AMD cpus do not have cmpxchg16b.
|
||||||
@ -1600,18 +1564,16 @@ case "$cpu" in
|
|||||||
# runtime and generate the fallback to serial emulation.
|
# runtime and generate the fallback to serial emulation.
|
||||||
CPU_CFLAGS="-m64 -mcx16"
|
CPU_CFLAGS="-m64 -mcx16"
|
||||||
LDFLAGS="-m64 $LDFLAGS"
|
LDFLAGS="-m64 $LDFLAGS"
|
||||||
cross_cc_x86_64=$cc
|
|
||||||
cross_cc_cflags_x86_64="$CPU_CFLAGS"
|
|
||||||
;;
|
;;
|
||||||
x32)
|
x32)
|
||||||
CPU_CFLAGS="-mx32"
|
CPU_CFLAGS="-mx32"
|
||||||
LDFLAGS="-mx32 $LDFLAGS"
|
LDFLAGS="-mx32 $LDFLAGS"
|
||||||
cross_cc_i386=$cc
|
|
||||||
cross_cc_cflags_i386="$CPU_CFLAGS"
|
|
||||||
;;
|
;;
|
||||||
# No special flags required for other host CPUs
|
# No special flags required for other host CPUs
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
eval "cross_cc_${cpu}=\$host_cc"
|
||||||
|
cross_cc_vars="$cross_cc_vars cross_cc_${cpu}"
|
||||||
QEMU_CFLAGS="$CPU_CFLAGS $QEMU_CFLAGS"
|
QEMU_CFLAGS="$CPU_CFLAGS $QEMU_CFLAGS"
|
||||||
|
|
||||||
# For user-mode emulation the host arch has to be one we explicitly
|
# For user-mode emulation the host arch has to be one we explicitly
|
||||||
@ -2059,6 +2021,12 @@ static THREAD int tls_var;
|
|||||||
int main(void) { return tls_var; }
|
int main(void) { return tls_var; }
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
# check we support --no-pie first...
|
||||||
|
if compile_prog "-Werror -fno-pie" "-no-pie"; then
|
||||||
|
CFLAGS_NOPIE="-fno-pie"
|
||||||
|
LDFLAGS_NOPIE="-nopie"
|
||||||
|
fi
|
||||||
|
|
||||||
if compile_prog "-fPIE -DPIE" "-pie"; then
|
if compile_prog "-fPIE -DPIE" "-pie"; then
|
||||||
QEMU_CFLAGS="-fPIE -DPIE $QEMU_CFLAGS"
|
QEMU_CFLAGS="-fPIE -DPIE $QEMU_CFLAGS"
|
||||||
LDFLAGS="-pie $LDFLAGS"
|
LDFLAGS="-pie $LDFLAGS"
|
||||||
@ -2074,11 +2042,6 @@ EOF
|
|||||||
pie="no"
|
pie="no"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if compile_prog "-Werror -fno-pie" "-nopie"; then
|
|
||||||
CFLAGS_NOPIE="-fno-pie"
|
|
||||||
LDFLAGS_NOPIE="-nopie"
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
##########################################
|
##########################################
|
||||||
@ -5893,17 +5856,6 @@ EOF
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
##########################################
|
|
||||||
# Docker and cross-compiler support
|
|
||||||
#
|
|
||||||
# This is specifically for building test
|
|
||||||
# cases for foreign architectures, not
|
|
||||||
# cross-compiling QEMU itself.
|
|
||||||
|
|
||||||
if has "docker"; then
|
|
||||||
docker=$($python $source_path/tests/docker/docker.py probe)
|
|
||||||
fi
|
|
||||||
|
|
||||||
##########################################
|
##########################################
|
||||||
# check for libpmem
|
# check for libpmem
|
||||||
|
|
||||||
@ -6474,7 +6426,6 @@ echo "qed support $qed"
|
|||||||
echo "parallels support $parallels"
|
echo "parallels support $parallels"
|
||||||
echo "sheepdog support $sheepdog"
|
echo "sheepdog support $sheepdog"
|
||||||
echo "capstone $capstone"
|
echo "capstone $capstone"
|
||||||
echo "docker $docker"
|
|
||||||
echo "libpmem support $libpmem"
|
echo "libpmem support $libpmem"
|
||||||
echo "libudev $libudev"
|
echo "libudev $libudev"
|
||||||
echo "default devices $default_devices"
|
echo "default devices $default_devices"
|
||||||
@ -7384,10 +7335,6 @@ if test "$gcov" = "yes" ; then
|
|||||||
echo "GCOV=$gcov_tool" >> $config_host_mak
|
echo "GCOV=$gcov_tool" >> $config_host_mak
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "$docker" != "no"; then
|
|
||||||
echo "HAVE_USER_DOCKER=y" >> $config_host_mak
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "$libudev" != "no"; then
|
if test "$libudev" != "no"; then
|
||||||
echo "CONFIG_LIBUDEV=y" >> $config_host_mak
|
echo "CONFIG_LIBUDEV=y" >> $config_host_mak
|
||||||
echo "LIBUDEV_LIBS=$libudev_libs" >> $config_host_mak
|
echo "LIBUDEV_LIBS=$libudev_libs" >> $config_host_mak
|
||||||
@ -7461,10 +7408,6 @@ case "$target" in
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
target_compiler=""
|
|
||||||
target_compiler_static=""
|
|
||||||
target_compiler_cflags=""
|
|
||||||
|
|
||||||
mkdir -p $target_dir
|
mkdir -p $target_dir
|
||||||
echo "# Automatically generated by configure - do not modify" > $config_target_mak
|
echo "# Automatically generated by configure - do not modify" > $config_target_mak
|
||||||
|
|
||||||
@ -7481,26 +7424,20 @@ case "$target_name" in
|
|||||||
i386)
|
i386)
|
||||||
mttcg="yes"
|
mttcg="yes"
|
||||||
gdb_xml_files="i386-32bit.xml"
|
gdb_xml_files="i386-32bit.xml"
|
||||||
target_compiler=$cross_cc_i386
|
|
||||||
target_compiler_cflags=$cross_cc_ccflags_i386
|
|
||||||
;;
|
;;
|
||||||
x86_64)
|
x86_64)
|
||||||
TARGET_BASE_ARCH=i386
|
TARGET_BASE_ARCH=i386
|
||||||
mttcg="yes"
|
mttcg="yes"
|
||||||
gdb_xml_files="i386-64bit.xml"
|
gdb_xml_files="i386-64bit.xml"
|
||||||
target_compiler=$cross_cc_x86_64
|
|
||||||
;;
|
;;
|
||||||
alpha)
|
alpha)
|
||||||
mttcg="yes"
|
mttcg="yes"
|
||||||
target_compiler=$cross_cc_alpha
|
|
||||||
;;
|
;;
|
||||||
arm|armeb)
|
arm|armeb)
|
||||||
TARGET_ARCH=arm
|
TARGET_ARCH=arm
|
||||||
bflt="yes"
|
bflt="yes"
|
||||||
mttcg="yes"
|
mttcg="yes"
|
||||||
gdb_xml_files="arm-core.xml arm-vfp.xml arm-vfp3.xml arm-neon.xml"
|
gdb_xml_files="arm-core.xml arm-vfp.xml arm-vfp3.xml arm-neon.xml"
|
||||||
target_compiler=$cross_cc_arm
|
|
||||||
eval "target_compiler_cflags=\$cross_cc_cflags_${target_name}"
|
|
||||||
;;
|
;;
|
||||||
aarch64|aarch64_be)
|
aarch64|aarch64_be)
|
||||||
TARGET_ARCH=aarch64
|
TARGET_ARCH=aarch64
|
||||||
@ -7508,41 +7445,32 @@ case "$target_name" in
|
|||||||
bflt="yes"
|
bflt="yes"
|
||||||
mttcg="yes"
|
mttcg="yes"
|
||||||
gdb_xml_files="aarch64-core.xml aarch64-fpu.xml arm-core.xml arm-vfp.xml arm-vfp3.xml arm-neon.xml"
|
gdb_xml_files="aarch64-core.xml aarch64-fpu.xml arm-core.xml arm-vfp.xml arm-vfp3.xml arm-neon.xml"
|
||||||
target_compiler=$cross_cc_aarch64
|
|
||||||
eval "target_compiler_cflags=\$cross_cc_cflags_${target_name}"
|
|
||||||
;;
|
;;
|
||||||
cris)
|
cris)
|
||||||
target_compiler=$cross_cc_cris
|
|
||||||
;;
|
;;
|
||||||
hppa)
|
hppa)
|
||||||
mttcg="yes"
|
mttcg="yes"
|
||||||
target_compiler=$cross_cc_hppa
|
|
||||||
;;
|
;;
|
||||||
lm32)
|
lm32)
|
||||||
target_compiler=$cross_cc_lm32
|
|
||||||
;;
|
;;
|
||||||
m68k)
|
m68k)
|
||||||
bflt="yes"
|
bflt="yes"
|
||||||
gdb_xml_files="cf-core.xml cf-fp.xml m68k-fp.xml"
|
gdb_xml_files="cf-core.xml cf-fp.xml m68k-fp.xml"
|
||||||
target_compiler=$cross_cc_m68k
|
|
||||||
;;
|
;;
|
||||||
microblaze|microblazeel)
|
microblaze|microblazeel)
|
||||||
TARGET_ARCH=microblaze
|
TARGET_ARCH=microblaze
|
||||||
bflt="yes"
|
bflt="yes"
|
||||||
echo "TARGET_ABI32=y" >> $config_target_mak
|
echo "TARGET_ABI32=y" >> $config_target_mak
|
||||||
target_compiler=$cross_cc_microblaze
|
|
||||||
;;
|
;;
|
||||||
mips|mipsel)
|
mips|mipsel)
|
||||||
mttcg="yes"
|
mttcg="yes"
|
||||||
TARGET_ARCH=mips
|
TARGET_ARCH=mips
|
||||||
target_compiler=$cross_cc_mips
|
|
||||||
echo "TARGET_ABI_MIPSO32=y" >> $config_target_mak
|
echo "TARGET_ABI_MIPSO32=y" >> $config_target_mak
|
||||||
;;
|
;;
|
||||||
mipsn32|mipsn32el)
|
mipsn32|mipsn32el)
|
||||||
mttcg="yes"
|
mttcg="yes"
|
||||||
TARGET_ARCH=mips64
|
TARGET_ARCH=mips64
|
||||||
TARGET_BASE_ARCH=mips
|
TARGET_BASE_ARCH=mips
|
||||||
target_compiler=$cross_cc_mipsn32
|
|
||||||
echo "TARGET_ABI_MIPSN32=y" >> $config_target_mak
|
echo "TARGET_ABI_MIPSN32=y" >> $config_target_mak
|
||||||
echo "TARGET_ABI32=y" >> $config_target_mak
|
echo "TARGET_ABI32=y" >> $config_target_mak
|
||||||
;;
|
;;
|
||||||
@ -7550,32 +7478,24 @@ case "$target_name" in
|
|||||||
mttcg="yes"
|
mttcg="yes"
|
||||||
TARGET_ARCH=mips64
|
TARGET_ARCH=mips64
|
||||||
TARGET_BASE_ARCH=mips
|
TARGET_BASE_ARCH=mips
|
||||||
target_compiler=$cross_cc_mips64
|
|
||||||
echo "TARGET_ABI_MIPSN64=y" >> $config_target_mak
|
echo "TARGET_ABI_MIPSN64=y" >> $config_target_mak
|
||||||
;;
|
;;
|
||||||
moxie)
|
moxie)
|
||||||
target_compiler=$cross_cc_moxie
|
|
||||||
;;
|
;;
|
||||||
nios2)
|
nios2)
|
||||||
target_compiler=$cross_cc_nios2
|
|
||||||
;;
|
;;
|
||||||
or1k)
|
or1k)
|
||||||
target_compiler=$cross_cc_or1k
|
|
||||||
TARGET_ARCH=openrisc
|
TARGET_ARCH=openrisc
|
||||||
TARGET_BASE_ARCH=openrisc
|
TARGET_BASE_ARCH=openrisc
|
||||||
;;
|
;;
|
||||||
ppc)
|
ppc)
|
||||||
gdb_xml_files="power-core.xml power-fpu.xml power-altivec.xml power-spe.xml"
|
gdb_xml_files="power-core.xml power-fpu.xml power-altivec.xml power-spe.xml"
|
||||||
target_compiler=$cross_cc_ppc
|
|
||||||
target_compiler_cflags="$cross_cc_cflags_ppc"
|
|
||||||
;;
|
;;
|
||||||
ppc64)
|
ppc64)
|
||||||
TARGET_BASE_ARCH=ppc
|
TARGET_BASE_ARCH=ppc
|
||||||
TARGET_ABI_DIR=ppc
|
TARGET_ABI_DIR=ppc
|
||||||
mttcg=yes
|
mttcg=yes
|
||||||
gdb_xml_files="power64-core.xml power-fpu.xml power-altivec.xml power-spe.xml power-vsx.xml"
|
gdb_xml_files="power64-core.xml power-fpu.xml power-altivec.xml power-spe.xml power-vsx.xml"
|
||||||
target_compiler=$cross_cc_ppc64
|
|
||||||
target_compiler_cflags="$cross_cc_cflags_ppc64"
|
|
||||||
;;
|
;;
|
||||||
ppc64le)
|
ppc64le)
|
||||||
TARGET_ARCH=ppc64
|
TARGET_ARCH=ppc64
|
||||||
@ -7583,7 +7503,6 @@ case "$target_name" in
|
|||||||
TARGET_ABI_DIR=ppc
|
TARGET_ABI_DIR=ppc
|
||||||
mttcg=yes
|
mttcg=yes
|
||||||
gdb_xml_files="power64-core.xml power-fpu.xml power-altivec.xml power-spe.xml power-vsx.xml"
|
gdb_xml_files="power64-core.xml power-fpu.xml power-altivec.xml power-spe.xml power-vsx.xml"
|
||||||
target_compiler=$cross_cc_ppc64le
|
|
||||||
;;
|
;;
|
||||||
ppc64abi32)
|
ppc64abi32)
|
||||||
TARGET_ARCH=ppc64
|
TARGET_ARCH=ppc64
|
||||||
@ -7591,60 +7510,48 @@ case "$target_name" in
|
|||||||
TARGET_ABI_DIR=ppc
|
TARGET_ABI_DIR=ppc
|
||||||
echo "TARGET_ABI32=y" >> $config_target_mak
|
echo "TARGET_ABI32=y" >> $config_target_mak
|
||||||
gdb_xml_files="power64-core.xml power-fpu.xml power-altivec.xml power-spe.xml power-vsx.xml"
|
gdb_xml_files="power64-core.xml power-fpu.xml power-altivec.xml power-spe.xml power-vsx.xml"
|
||||||
target_compiler=$cross_cc_ppc64abi32
|
|
||||||
;;
|
;;
|
||||||
riscv32)
|
riscv32)
|
||||||
TARGET_BASE_ARCH=riscv
|
TARGET_BASE_ARCH=riscv
|
||||||
TARGET_ABI_DIR=riscv
|
TARGET_ABI_DIR=riscv
|
||||||
mttcg=yes
|
mttcg=yes
|
||||||
gdb_xml_files="riscv-32bit-cpu.xml riscv-32bit-fpu.xml riscv-32bit-csr.xml"
|
gdb_xml_files="riscv-32bit-cpu.xml riscv-32bit-fpu.xml riscv-32bit-csr.xml"
|
||||||
target_compiler=$cross_cc_riscv32
|
|
||||||
;;
|
;;
|
||||||
riscv64)
|
riscv64)
|
||||||
TARGET_BASE_ARCH=riscv
|
TARGET_BASE_ARCH=riscv
|
||||||
TARGET_ABI_DIR=riscv
|
TARGET_ABI_DIR=riscv
|
||||||
mttcg=yes
|
mttcg=yes
|
||||||
gdb_xml_files="riscv-64bit-cpu.xml riscv-64bit-fpu.xml riscv-64bit-csr.xml"
|
gdb_xml_files="riscv-64bit-cpu.xml riscv-64bit-fpu.xml riscv-64bit-csr.xml"
|
||||||
target_compiler=$cross_cc_riscv64
|
|
||||||
;;
|
;;
|
||||||
sh4|sh4eb)
|
sh4|sh4eb)
|
||||||
TARGET_ARCH=sh4
|
TARGET_ARCH=sh4
|
||||||
bflt="yes"
|
bflt="yes"
|
||||||
target_compiler=$cross_cc_sh4
|
|
||||||
;;
|
;;
|
||||||
sparc)
|
sparc)
|
||||||
target_compiler=$cross_cc_sparc
|
|
||||||
;;
|
;;
|
||||||
sparc64)
|
sparc64)
|
||||||
TARGET_BASE_ARCH=sparc
|
TARGET_BASE_ARCH=sparc
|
||||||
target_compiler=$cross_cc_sparc64
|
|
||||||
;;
|
;;
|
||||||
sparc32plus)
|
sparc32plus)
|
||||||
TARGET_ARCH=sparc64
|
TARGET_ARCH=sparc64
|
||||||
TARGET_BASE_ARCH=sparc
|
TARGET_BASE_ARCH=sparc
|
||||||
TARGET_ABI_DIR=sparc
|
TARGET_ABI_DIR=sparc
|
||||||
target_compiler=$cross_cc_sparc32plus
|
|
||||||
echo "TARGET_ABI32=y" >> $config_target_mak
|
echo "TARGET_ABI32=y" >> $config_target_mak
|
||||||
;;
|
;;
|
||||||
s390x)
|
s390x)
|
||||||
mttcg=yes
|
mttcg=yes
|
||||||
gdb_xml_files="s390x-core64.xml s390-acr.xml s390-fpr.xml s390-vx.xml s390-cr.xml s390-virt.xml s390-gs.xml"
|
gdb_xml_files="s390x-core64.xml s390-acr.xml s390-fpr.xml s390-vx.xml s390-cr.xml s390-virt.xml s390-gs.xml"
|
||||||
target_compiler=$cross_cc_s390x
|
|
||||||
;;
|
;;
|
||||||
tilegx)
|
tilegx)
|
||||||
target_compiler=$cross_cc_tilegx
|
|
||||||
;;
|
;;
|
||||||
tricore)
|
tricore)
|
||||||
target_compiler=$cross_cc_tricore
|
|
||||||
;;
|
;;
|
||||||
unicore32)
|
unicore32)
|
||||||
target_compiler=$cross_cc_unicore32
|
|
||||||
;;
|
;;
|
||||||
xtensa|xtensaeb)
|
xtensa|xtensaeb)
|
||||||
TARGET_ARCH=xtensa
|
TARGET_ARCH=xtensa
|
||||||
bflt="yes"
|
bflt="yes"
|
||||||
mttcg="yes"
|
mttcg="yes"
|
||||||
target_compiler=$cross_cc_xtensa
|
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
error_exit "Unsupported target CPU"
|
error_exit "Unsupported target CPU"
|
||||||
@ -7655,27 +7562,6 @@ if [ "$TARGET_BASE_ARCH" = "" ]; then
|
|||||||
TARGET_BASE_ARCH=$TARGET_ARCH
|
TARGET_BASE_ARCH=$TARGET_ARCH
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Do we have a cross compiler for this target?
|
|
||||||
if has $target_compiler; then
|
|
||||||
|
|
||||||
write_c_skeleton
|
|
||||||
|
|
||||||
if ! do_compiler "$target_compiler" $target_compiler_cflags -o $TMPE $TMPC -static ; then
|
|
||||||
# For host systems we might get away with building without -static
|
|
||||||
if ! do_compiler "$target_compiler" $target_compiler_cflags -o $TMPE $TMPC ; then
|
|
||||||
target_compiler=""
|
|
||||||
else
|
|
||||||
enabled_cross_compilers="${enabled_cross_compilers} '${target_compiler}'"
|
|
||||||
target_compiler_static="n"
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
enabled_cross_compilers="${enabled_cross_compilers} '${target_compiler}'"
|
|
||||||
target_compiler_static="y"
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
target_compiler=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
symlink "$source_path/Makefile.target" "$target_dir/Makefile"
|
symlink "$source_path/Makefile.target" "$target_dir/Makefile"
|
||||||
|
|
||||||
upper() {
|
upper() {
|
||||||
@ -7752,18 +7638,6 @@ if test "$target_bsd_user" = "yes" ; then
|
|||||||
echo "CONFIG_BSD_USER=y" >> $config_target_mak
|
echo "CONFIG_BSD_USER=y" >> $config_target_mak
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test -n "$target_compiler"; then
|
|
||||||
echo "CROSS_CC_GUEST=\"$target_compiler\"" >> $config_target_mak
|
|
||||||
|
|
||||||
if test -n "$target_compiler_static"; then
|
|
||||||
echo "CROSS_CC_GUEST_STATIC=$target_compiler_static" >> $config_target_mak
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test -n "$target_compiler_cflags"; then
|
|
||||||
echo "CROSS_CC_GUEST_CFLAGS=$target_compiler_cflags" >> $config_target_mak
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
# generate QEMU_CFLAGS/LDFLAGS for targets
|
# generate QEMU_CFLAGS/LDFLAGS for targets
|
||||||
|
|
||||||
@ -7894,11 +7768,6 @@ done # for target in $targets
|
|||||||
echo "PIXMAN_CFLAGS=$pixman_cflags" >> $config_host_mak
|
echo "PIXMAN_CFLAGS=$pixman_cflags" >> $config_host_mak
|
||||||
echo "PIXMAN_LIBS=$pixman_libs" >> $config_host_mak
|
echo "PIXMAN_LIBS=$pixman_libs" >> $config_host_mak
|
||||||
|
|
||||||
if test -n "$enabled_cross_compilers"; then
|
|
||||||
echo
|
|
||||||
echo "NOTE: cross-compilers enabled: $enabled_cross_compilers"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$fdt" = "git" ]; then
|
if [ "$fdt" = "git" ]; then
|
||||||
echo "config-host.h: dtc/all" >> $config_host_mak
|
echo "config-host.h: dtc/all" >> $config_host_mak
|
||||||
fi
|
fi
|
||||||
@ -7927,15 +7796,14 @@ fi
|
|||||||
# so the build tree will be missing the link back to the new file, and
|
# so the build tree will be missing the link back to the new file, and
|
||||||
# tests might fail. Prefer to keep the relevant files in their own
|
# tests might fail. Prefer to keep the relevant files in their own
|
||||||
# directory and symlink the directory instead.
|
# directory and symlink the directory instead.
|
||||||
DIRS="tests tests/tcg tests/tcg/cris tests/tcg/lm32 tests/libqos tests/qapi-schema tests/tcg/xtensa tests/qemu-iotests tests/vm"
|
DIRS="tests tests/tcg tests/tcg/lm32 tests/libqos tests/qapi-schema tests/qemu-iotests tests/vm"
|
||||||
DIRS="$DIRS tests/fp tests/qgraph"
|
DIRS="$DIRS tests/fp tests/qgraph"
|
||||||
DIRS="$DIRS docs docs/interop fsdev scsi"
|
DIRS="$DIRS docs docs/interop fsdev scsi"
|
||||||
DIRS="$DIRS pc-bios/optionrom pc-bios/spapr-rtas pc-bios/s390-ccw"
|
DIRS="$DIRS pc-bios/optionrom pc-bios/spapr-rtas pc-bios/s390-ccw"
|
||||||
DIRS="$DIRS roms/seabios roms/vgabios"
|
DIRS="$DIRS roms/seabios roms/vgabios"
|
||||||
LINKS="Makefile tests/tcg/Makefile"
|
LINKS="Makefile"
|
||||||
LINKS="$LINKS tests/tcg/cris/Makefile tests/tcg/cris/.gdbinit"
|
LINKS="$LINKS tests/tcg/lm32/Makefile po/Makefile"
|
||||||
LINKS="$LINKS tests/tcg/lm32/Makefile tests/tcg/xtensa/Makefile po/Makefile"
|
LINKS="$LINKS tests/tcg/Makefile.target tests/fp/Makefile"
|
||||||
LINKS="$LINKS tests/fp/Makefile"
|
|
||||||
LINKS="$LINKS pc-bios/optionrom/Makefile pc-bios/keymaps"
|
LINKS="$LINKS pc-bios/optionrom/Makefile pc-bios/keymaps"
|
||||||
LINKS="$LINKS pc-bios/spapr-rtas/Makefile"
|
LINKS="$LINKS pc-bios/spapr-rtas/Makefile"
|
||||||
LINKS="$LINKS pc-bios/s390-ccw/Makefile"
|
LINKS="$LINKS pc-bios/s390-ccw/Makefile"
|
||||||
@ -7965,6 +7833,12 @@ for f in $LINKS ; do
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
(for i in $cross_cc_vars; do
|
||||||
|
export $i
|
||||||
|
done
|
||||||
|
export target_list source_path
|
||||||
|
$source_path/tests/tcg/configure.sh)
|
||||||
|
|
||||||
# temporary config to build submodules
|
# temporary config to build submodules
|
||||||
for rom in seabios vgabios ; do
|
for rom in seabios vgabios ; do
|
||||||
config_mak=roms/$rom/config.mak
|
config_mak=roms/$rom/config.mak
|
||||||
|
@ -26,57 +26,57 @@ common-obj-$(CONFIG_PUV3) += puv3_pm.o
|
|||||||
|
|
||||||
common-obj-$(CONFIG_MACIO) += macio/
|
common-obj-$(CONFIG_MACIO) += macio/
|
||||||
|
|
||||||
obj-$(CONFIG_IVSHMEM_DEVICE) += ivshmem.o
|
common-obj-$(CONFIG_IVSHMEM_DEVICE) += ivshmem.o
|
||||||
|
|
||||||
obj-$(CONFIG_REALVIEW) += arm_sysctl.o
|
common-obj-$(CONFIG_REALVIEW) += arm_sysctl.o
|
||||||
obj-$(CONFIG_NSERIES) += cbus.o
|
common-obj-$(CONFIG_NSERIES) += cbus.o
|
||||||
obj-$(CONFIG_ECCMEMCTL) += eccmemctl.o
|
common-obj-$(CONFIG_ECCMEMCTL) += eccmemctl.o
|
||||||
obj-$(CONFIG_EXYNOS4) += exynos4210_pmu.o exynos4210_clk.o exynos4210_rng.o
|
common-obj-$(CONFIG_EXYNOS4) += exynos4210_pmu.o exynos4210_clk.o exynos4210_rng.o
|
||||||
obj-$(CONFIG_IMX) += imx_ccm.o
|
common-obj-$(CONFIG_IMX) += imx_ccm.o
|
||||||
obj-$(CONFIG_IMX) += imx31_ccm.o
|
common-obj-$(CONFIG_IMX) += imx31_ccm.o
|
||||||
obj-$(CONFIG_IMX) += imx25_ccm.o
|
common-obj-$(CONFIG_IMX) += imx25_ccm.o
|
||||||
obj-$(CONFIG_IMX) += imx6_ccm.o
|
common-obj-$(CONFIG_IMX) += imx6_ccm.o
|
||||||
obj-$(CONFIG_IMX) += imx6ul_ccm.o
|
common-obj-$(CONFIG_IMX) += imx6ul_ccm.o
|
||||||
obj-$(CONFIG_IMX) += imx6_src.o
|
obj-$(CONFIG_IMX) += imx6_src.o
|
||||||
obj-$(CONFIG_IMX) += imx7_ccm.o
|
common-obj-$(CONFIG_IMX) += imx7_ccm.o
|
||||||
obj-$(CONFIG_IMX) += imx2_wdt.o
|
common-obj-$(CONFIG_IMX) += imx2_wdt.o
|
||||||
obj-$(CONFIG_IMX) += imx7_snvs.o
|
common-obj-$(CONFIG_IMX) += imx7_snvs.o
|
||||||
obj-$(CONFIG_IMX) += imx7_gpr.o
|
common-obj-$(CONFIG_IMX) += imx7_gpr.o
|
||||||
obj-$(CONFIG_MILKYMIST) += milkymist-hpdmc.o
|
common-obj-$(CONFIG_MILKYMIST) += milkymist-hpdmc.o
|
||||||
obj-$(CONFIG_MILKYMIST) += milkymist-pfpu.o
|
common-obj-$(CONFIG_MILKYMIST) += milkymist-pfpu.o
|
||||||
obj-$(CONFIG_MAINSTONE) += mst_fpga.o
|
common-obj-$(CONFIG_MAINSTONE) += mst_fpga.o
|
||||||
obj-$(CONFIG_OMAP) += omap_clk.o
|
common-obj-$(CONFIG_OMAP) += omap_clk.o
|
||||||
obj-$(CONFIG_OMAP) += omap_gpmc.o
|
common-obj-$(CONFIG_OMAP) += omap_gpmc.o
|
||||||
obj-$(CONFIG_OMAP) += omap_l4.o
|
common-obj-$(CONFIG_OMAP) += omap_l4.o
|
||||||
obj-$(CONFIG_OMAP) += omap_sdrc.o
|
common-obj-$(CONFIG_OMAP) += omap_sdrc.o
|
||||||
obj-$(CONFIG_OMAP) += omap_tap.o
|
common-obj-$(CONFIG_OMAP) += omap_tap.o
|
||||||
obj-$(CONFIG_RASPI) += bcm2835_mbox.o
|
common-obj-$(CONFIG_RASPI) += bcm2835_mbox.o
|
||||||
obj-$(CONFIG_RASPI) += bcm2835_property.o
|
common-obj-$(CONFIG_RASPI) += bcm2835_property.o
|
||||||
obj-$(CONFIG_RASPI) += bcm2835_rng.o
|
common-obj-$(CONFIG_RASPI) += bcm2835_rng.o
|
||||||
obj-$(CONFIG_SLAVIO) += slavio_misc.o
|
common-obj-$(CONFIG_SLAVIO) += slavio_misc.o
|
||||||
obj-$(CONFIG_ZYNQ) += zynq_slcr.o
|
common-obj-$(CONFIG_ZYNQ) += zynq_slcr.o
|
||||||
obj-$(CONFIG_ZYNQ) += zynq-xadc.o
|
common-obj-$(CONFIG_ZYNQ) += zynq-xadc.o
|
||||||
obj-$(CONFIG_STM32F2XX_SYSCFG) += stm32f2xx_syscfg.o
|
common-obj-$(CONFIG_STM32F2XX_SYSCFG) += stm32f2xx_syscfg.o
|
||||||
obj-$(CONFIG_MIPS_CPS) += mips_cmgcr.o
|
obj-$(CONFIG_MIPS_CPS) += mips_cmgcr.o
|
||||||
obj-$(CONFIG_MIPS_CPS) += mips_cpc.o
|
obj-$(CONFIG_MIPS_CPS) += mips_cpc.o
|
||||||
obj-$(CONFIG_MIPS_ITU) += mips_itu.o
|
obj-$(CONFIG_MIPS_ITU) += mips_itu.o
|
||||||
obj-$(CONFIG_MPS2_FPGAIO) += mps2-fpgaio.o
|
common-obj-$(CONFIG_MPS2_FPGAIO) += mps2-fpgaio.o
|
||||||
obj-$(CONFIG_MPS2_SCC) += mps2-scc.o
|
common-obj-$(CONFIG_MPS2_SCC) += mps2-scc.o
|
||||||
|
|
||||||
obj-$(CONFIG_TZ_MPC) += tz-mpc.o
|
common-obj-$(CONFIG_TZ_MPC) += tz-mpc.o
|
||||||
obj-$(CONFIG_TZ_MSC) += tz-msc.o
|
common-obj-$(CONFIG_TZ_MSC) += tz-msc.o
|
||||||
obj-$(CONFIG_TZ_PPC) += tz-ppc.o
|
common-obj-$(CONFIG_TZ_PPC) += tz-ppc.o
|
||||||
obj-$(CONFIG_IOTKIT_SECCTL) += iotkit-secctl.o
|
common-obj-$(CONFIG_IOTKIT_SECCTL) += iotkit-secctl.o
|
||||||
obj-$(CONFIG_IOTKIT_SYSCTL) += iotkit-sysctl.o
|
obj-$(CONFIG_IOTKIT_SYSCTL) += iotkit-sysctl.o
|
||||||
obj-$(CONFIG_IOTKIT_SYSINFO) += iotkit-sysinfo.o
|
common-obj-$(CONFIG_IOTKIT_SYSINFO) += iotkit-sysinfo.o
|
||||||
obj-$(CONFIG_ARMSSE_CPUID) += armsse-cpuid.o
|
common-obj-$(CONFIG_ARMSSE_CPUID) += armsse-cpuid.o
|
||||||
obj-$(CONFIG_ARMSSE_MHU) += armsse-mhu.o
|
common-obj-$(CONFIG_ARMSSE_MHU) += armsse-mhu.o
|
||||||
|
|
||||||
obj-$(CONFIG_PVPANIC) += pvpanic.o
|
common-obj-$(CONFIG_PVPANIC) += pvpanic.o
|
||||||
obj-$(CONFIG_AUX) += auxbus.o
|
common-obj-$(CONFIG_AUX) += auxbus.o
|
||||||
obj-$(CONFIG_ASPEED_SOC) += aspeed_xdma.o
|
common-obj-$(CONFIG_ASPEED_SOC) += aspeed_xdma.o
|
||||||
obj-$(CONFIG_ASPEED_SOC) += aspeed_scu.o aspeed_sdmc.o
|
common-obj-$(CONFIG_ASPEED_SOC) += aspeed_scu.o aspeed_sdmc.o
|
||||||
obj-$(CONFIG_MSF2) += msf2-sysreg.o
|
common-obj-$(CONFIG_MSF2) += msf2-sysreg.o
|
||||||
obj-$(CONFIG_NRF51_SOC) += nrf51_rng.o
|
common-obj-$(CONFIG_NRF51_SOC) += nrf51_rng.o
|
||||||
|
|
||||||
obj-$(CONFIG_GRLIB) += grlib_ahb_apb_pnp.o
|
common-obj-$(CONFIG_GRLIB) += grlib_ahb_apb_pnp.o
|
||||||
|
@ -451,15 +451,15 @@ of <protocol>.
|
|||||||
|
|
||||||
Example: boot from a remote Fedora 20 live ISO image
|
Example: boot from a remote Fedora 20 live ISO image
|
||||||
@example
|
@example
|
||||||
@value{qemu_system_x86} --drive media=cdrom,file=http://dl.fedoraproject.org/pub/fedora/linux/releases/20/Live/x86_64/Fedora-Live-Desktop-x86_64-20-1.iso,readonly
|
@value{qemu_system_x86} --drive media=cdrom,file=https://archives.fedoraproject.org/pub/archive/fedora/linux/releases/20/Live/x86_64/Fedora-Live-Desktop-x86_64-20-1.iso,readonly
|
||||||
|
|
||||||
@value{qemu_system_x86} --drive media=cdrom,file.driver=http,file.url=http://dl.fedoraproject.org/pub/fedora/linux/releases/20/Live/x86_64/Fedora-Live-Desktop-x86_64-20-1.iso,readonly
|
@value{qemu_system_x86} --drive media=cdrom,file.driver=http,file.url=http://archives.fedoraproject.org/pub/fedora/linux/releases/20/Live/x86_64/Fedora-Live-Desktop-x86_64-20-1.iso,readonly
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
Example: boot from a remote Fedora 20 cloud image using a local overlay for
|
Example: boot from a remote Fedora 20 cloud image using a local overlay for
|
||||||
writes, copy-on-read, and a readahead of 64k
|
writes, copy-on-read, and a readahead of 64k
|
||||||
@example
|
@example
|
||||||
qemu-img create -f qcow2 -o backing_file='json:@{"file.driver":"http",, "file.url":"https://dl.fedoraproject.org/pub/fedora/linux/releases/20/Images/x86_64/Fedora-x86_64-20-20131211.1-sda.qcow2",, "file.readahead":"64k"@}' /tmp/Fedora-x86_64-20-20131211.1-sda.qcow2
|
qemu-img create -f qcow2 -o backing_file='json:@{"file.driver":"http",, "file.url":"http://archives.fedoraproject.org/pub/archive/fedora/linux/releases/20/Images/x86_64/Fedora-x86_64-20-20131211.1-sda.qcow2",, "file.readahead":"64k"@}' /tmp/Fedora-x86_64-20-20131211.1-sda.qcow2
|
||||||
|
|
||||||
@value{qemu_system_x86} -drive file=/tmp/Fedora-x86_64-20-20131211.1-sda.qcow2,copy-on-read=on
|
@value{qemu_system_x86} -drive file=/tmp/Fedora-x86_64-20-20131211.1-sda.qcow2,copy-on-read=on
|
||||||
@end example
|
@end example
|
||||||
|
@ -1059,26 +1059,29 @@ BUILD_TCG_TARGET_RULES=$(patsubst %,build-tcg-tests-%, $(TARGET_DIRS))
|
|||||||
CLEAN_TCG_TARGET_RULES=$(patsubst %,clean-tcg-tests-%, $(TARGET_DIRS))
|
CLEAN_TCG_TARGET_RULES=$(patsubst %,clean-tcg-tests-%, $(TARGET_DIRS))
|
||||||
RUN_TCG_TARGET_RULES=$(patsubst %,run-tcg-tests-%, $(TARGET_DIRS))
|
RUN_TCG_TARGET_RULES=$(patsubst %,run-tcg-tests-%, $(TARGET_DIRS))
|
||||||
|
|
||||||
ifeq ($(HAVE_USER_DOCKER),y)
|
|
||||||
# Probe for the Docker Builds needed for each build
|
# Probe for the Docker Builds needed for each build
|
||||||
$(foreach PROBE_TARGET,$(TARGET_DIRS), \
|
$(foreach PROBE_TARGET,$(TARGET_DIRS), \
|
||||||
$(eval -include $(SRC_PATH)/tests/tcg/Makefile.probe) \
|
$(eval -include $(SRC_PATH)/tests/tcg/Makefile.prereqs))
|
||||||
$(if $(DOCKER_PREREQ), \
|
|
||||||
$(eval build-tcg-tests-$(PROBE_TARGET): $(DOCKER_PREREQ))))
|
|
||||||
endif
|
|
||||||
|
|
||||||
build-tcg-tests-%:
|
build-tcg-tests-%:
|
||||||
$(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $* V="$(V)" \
|
$(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) \
|
||||||
SKIP_DOCKER_BUILD=1 TARGET_DIR="$*/" guest-tests, \
|
-f $(SRC_PATH)/tests/tcg/Makefile.qemu \
|
||||||
|
SRC_PATH=$(SRC_PATH) \
|
||||||
|
V="$(V)" TARGET="$*" guest-tests, \
|
||||||
"BUILD", "TCG tests for $*")
|
"BUILD", "TCG tests for $*")
|
||||||
|
|
||||||
run-tcg-tests-%: % build-tcg-tests-%
|
run-tcg-tests-%: build-tcg-tests-% %/all
|
||||||
$(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $* V="$(V)" \
|
$(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) \
|
||||||
SKIP_DOCKER_BUILD=1 TARGET_DIR="$*/" run-guest-tests, \
|
-f $(SRC_PATH)/tests/tcg/Makefile.qemu \
|
||||||
|
SRC_PATH=$(SRC_PATH) SPEED="$(SPEED)" \
|
||||||
|
V="$(V)" TARGET="$*" run-guest-tests, \
|
||||||
"RUN", "TCG tests for $*")
|
"RUN", "TCG tests for $*")
|
||||||
|
|
||||||
clean-tcg-tests-%:
|
clean-tcg-tests-%:
|
||||||
$(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $* V="$(V)" TARGET_DIR="$*/" clean-guest-tests,)
|
$(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) \
|
||||||
|
-f $(SRC_PATH)/tests/tcg/Makefile.qemu \
|
||||||
|
SRC_PATH=$(SRC_PATH) TARGET="$*" clean-guest-tests, \
|
||||||
|
"CLEAN", "TCG tests for $*")
|
||||||
|
|
||||||
.PHONY: build-tcg
|
.PHONY: build-tcg
|
||||||
build-tcg: $(BUILD_TCG_TARGET_RULES)
|
build-tcg: $(BUILD_TCG_TARGET_RULES)
|
||||||
|
@ -76,8 +76,9 @@ class BootLinuxConsole(Test):
|
|||||||
:avocado: tags=arch:x86_64
|
:avocado: tags=arch:x86_64
|
||||||
:avocado: tags=machine:pc
|
:avocado: tags=machine:pc
|
||||||
"""
|
"""
|
||||||
kernel_url = ('https://download.fedoraproject.org/pub/fedora/linux/'
|
kernel_url = ('https://archives.fedoraproject.org/pub/archive/fedora'
|
||||||
'releases/29/Everything/x86_64/os/images/pxeboot/vmlinuz')
|
'/linux/releases/29/Everything/x86_64/os/images/pxeboot'
|
||||||
|
'/vmlinuz')
|
||||||
kernel_hash = '23bebd2680757891cf7adedb033532163a792495'
|
kernel_hash = '23bebd2680757891cf7adedb033532163a792495'
|
||||||
kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash)
|
kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash)
|
||||||
|
|
||||||
@ -250,8 +251,9 @@ class BootLinuxConsole(Test):
|
|||||||
:avocado: tags=arch:aarch64
|
:avocado: tags=arch:aarch64
|
||||||
:avocado: tags=machine:virt
|
:avocado: tags=machine:virt
|
||||||
"""
|
"""
|
||||||
kernel_url = ('https://download.fedoraproject.org/pub/fedora/linux/'
|
kernel_url = ('https://archives.fedoraproject.org/pub/archive/fedora'
|
||||||
'releases/29/Everything/aarch64/os/images/pxeboot/vmlinuz')
|
'/linux/releases/29/Everything/aarch64/os/images/pxeboot'
|
||||||
|
'/vmlinuz')
|
||||||
kernel_hash = '8c73e469fc6ea06a58dc83a628fc695b693b8493'
|
kernel_hash = '8c73e469fc6ea06a58dc83a628fc695b693b8493'
|
||||||
kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash)
|
kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash)
|
||||||
|
|
||||||
@ -271,8 +273,9 @@ class BootLinuxConsole(Test):
|
|||||||
:avocado: tags=arch:arm
|
:avocado: tags=arch:arm
|
||||||
:avocado: tags=machine:virt
|
:avocado: tags=machine:virt
|
||||||
"""
|
"""
|
||||||
kernel_url = ('https://download.fedoraproject.org/pub/fedora/linux/'
|
kernel_url = ('https://archives.fedoraproject.org/pub/archive/fedora'
|
||||||
'releases/29/Everything/armhfp/os/images/pxeboot/vmlinuz')
|
'/linux/releases/29/Everything/armhfp/os/images/pxeboot'
|
||||||
|
'/vmlinuz')
|
||||||
kernel_hash = 'e9826d741b4fb04cadba8d4824d1ed3b7fb8b4d4'
|
kernel_hash = 'e9826d741b4fb04cadba8d4824d1ed3b7fb8b4d4'
|
||||||
kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash)
|
kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash)
|
||||||
|
|
||||||
@ -318,8 +321,9 @@ class BootLinuxConsole(Test):
|
|||||||
:avocado: tags=arch:s390x
|
:avocado: tags=arch:s390x
|
||||||
:avocado: tags=machine:s390_ccw_virtio
|
:avocado: tags=machine:s390_ccw_virtio
|
||||||
"""
|
"""
|
||||||
kernel_url = ('https://download.fedoraproject.org/pub/fedora-secondary/'
|
kernel_url = ('https://archives.fedoraproject.org/pub/archive'
|
||||||
'releases/29/Everything/s390x/os/images/kernel.img')
|
'/fedora-secondary/releases/29/Everything/s390x/os/images'
|
||||||
|
'/kernel.img')
|
||||||
kernel_hash = 'e8e8439103ef8053418ef062644ffd46a7919313'
|
kernel_hash = 'e8e8439103ef8053418ef062644ffd46a7919313'
|
||||||
kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash)
|
kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash)
|
||||||
|
|
||||||
@ -360,8 +364,9 @@ class BootLinuxConsole(Test):
|
|||||||
:avocado: tags=arch:ppc64
|
:avocado: tags=arch:ppc64
|
||||||
:avocado: tags=machine:pseries
|
:avocado: tags=machine:pseries
|
||||||
"""
|
"""
|
||||||
kernel_url = ('https://download.fedoraproject.org/pub/fedora-secondary/'
|
kernel_url = ('https://archives.fedoraproject.org/pub/archive'
|
||||||
'releases/29/Everything/ppc64le/os/ppc/ppc64/vmlinuz')
|
'/fedora-secondary/releases/29/Everything/ppc64le/os'
|
||||||
|
'/ppc/ppc64/vmlinuz')
|
||||||
kernel_hash = '3fe04abfc852b66653b8c3c897a59a689270bc77'
|
kernel_hash = '3fe04abfc852b66653b8c3c897a59a689270bc77'
|
||||||
kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash)
|
kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash)
|
||||||
|
|
||||||
|
@ -54,8 +54,9 @@ class LinuxInitrd(Test):
|
|||||||
QEMU has supported up to 4 GiB initrd for recent kernel
|
QEMU has supported up to 4 GiB initrd for recent kernel
|
||||||
Expect guest can reach 'Unpacking initramfs...'
|
Expect guest can reach 'Unpacking initramfs...'
|
||||||
"""
|
"""
|
||||||
kernel_url = ('https://mirrors.kernel.org/fedora/releases/28/'
|
kernel_url = ('https://archives.fedoraproject.org/pub/archive/fedora'
|
||||||
'Everything/x86_64/os/images/pxeboot/vmlinuz')
|
'/linux/releases/28/Everything/x86_64/os/images/pxeboot/'
|
||||||
|
'vmlinuz')
|
||||||
kernel_hash = '238e083e114c48200f80d889f7e32eeb2793e02a'
|
kernel_hash = '238e083e114c48200f80d889f7e32eeb2793e02a'
|
||||||
kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash)
|
kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash)
|
||||||
max_size = 2 * (1024 ** 3) + 1
|
max_size = 2 * (1024 ** 3) + 1
|
||||||
|
@ -6,7 +6,8 @@ DOCKER_SUFFIX := .docker
|
|||||||
DOCKER_FILES_DIR := $(SRC_PATH)/tests/docker/dockerfiles
|
DOCKER_FILES_DIR := $(SRC_PATH)/tests/docker/dockerfiles
|
||||||
DOCKER_DEPRECATED_IMAGES := debian
|
DOCKER_DEPRECATED_IMAGES := debian
|
||||||
# we don't run tests on intermediate images (used as base by another image)
|
# we don't run tests on intermediate images (used as base by another image)
|
||||||
DOCKER_PARTIAL_IMAGES := debian debian8 debian9 debian8-mxe debian-ports debian-sid debian-bootstrap
|
DOCKER_PARTIAL_IMAGES := debian debian8 debian9 debian10 debian-sid
|
||||||
|
DEBIAN_PARTIAL_IMAGES += debian8-mxe debian-9-mxe debian-ports debian-bootstrap
|
||||||
DOCKER_IMAGES := $(filter-out $(DOCKER_DEPRECATED_IMAGES),$(sort $(notdir $(basename $(wildcard $(DOCKER_FILES_DIR)/*.docker)))))
|
DOCKER_IMAGES := $(filter-out $(DOCKER_DEPRECATED_IMAGES),$(sort $(notdir $(basename $(wildcard $(DOCKER_FILES_DIR)/*.docker)))))
|
||||||
DOCKER_TARGETS := $(patsubst %,docker-image-%,$(DOCKER_IMAGES))
|
DOCKER_TARGETS := $(patsubst %,docker-image-%,$(DOCKER_IMAGES))
|
||||||
# Use a global constant ccache directory to speed up repetitive builds
|
# Use a global constant ccache directory to speed up repetitive builds
|
||||||
@ -72,6 +73,7 @@ docker-binfmt-image-debian-%: $(DOCKER_FILES_DIR)/debian-bootstrap.docker
|
|||||||
$(call quiet-command, \
|
$(call quiet-command, \
|
||||||
DEB_ARCH=$(DEB_ARCH) \
|
DEB_ARCH=$(DEB_ARCH) \
|
||||||
DEB_TYPE=$(DEB_TYPE) \
|
DEB_TYPE=$(DEB_TYPE) \
|
||||||
|
$(if $(DEB_URL),DEB_URL=$(DEB_URL),) \
|
||||||
$(DOCKER_SCRIPT) build qemu:debian-$* $< \
|
$(DOCKER_SCRIPT) build qemu:debian-$* $< \
|
||||||
$(if $V,,--quiet) $(if $(NOCACHE),--no-cache) \
|
$(if $V,,--quiet) $(if $(NOCACHE),--no-cache) \
|
||||||
$(if $(NOUSER),,--add-current-user) \
|
$(if $(NOUSER),,--add-current-user) \
|
||||||
@ -86,13 +88,16 @@ docker-binfmt-image-debian-%: $(DOCKER_FILES_DIR)/debian-bootstrap.docker
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
# Enforce dependencies for composite images
|
# Enforce dependencies for composite images
|
||||||
docker-image-debian: docker-image-debian9
|
|
||||||
docker-image-debian9-mxe: docker-image-debian9
|
docker-image-debian9-mxe: docker-image-debian9
|
||||||
|
ifeq ($(ARCH),x86_64)
|
||||||
docker-image-debian-amd64: docker-image-debian9
|
docker-image-debian-amd64: docker-image-debian9
|
||||||
|
DOCKER_PARTIAL_IMAGES += debian-amd64-cross
|
||||||
|
else
|
||||||
|
docker-image-debian-amd64-cross: docker-image-debian10
|
||||||
|
DOCKER_PARTIAL_IMAGES += debian-amd64
|
||||||
|
endif
|
||||||
docker-image-debian-armel-cross: docker-image-debian9
|
docker-image-debian-armel-cross: docker-image-debian9
|
||||||
docker-image-debian-armhf-cross: docker-image-debian9
|
docker-image-debian-armhf-cross: docker-image-debian9
|
||||||
docker-image-debian-arm64-cross: docker-image-debian9
|
|
||||||
docker-image-debian-buster-arm64-cross: docker-image-debian10
|
|
||||||
docker-image-debian-mips-cross: docker-image-debian9
|
docker-image-debian-mips-cross: docker-image-debian9
|
||||||
docker-image-debian-mipsel-cross: docker-image-debian9
|
docker-image-debian-mipsel-cross: docker-image-debian9
|
||||||
docker-image-debian-mips64el-cross: docker-image-debian9
|
docker-image-debian-mips64el-cross: docker-image-debian9
|
||||||
@ -101,25 +106,41 @@ docker-image-debian-s390x-cross: docker-image-debian9
|
|||||||
docker-image-debian-win32-cross: docker-image-debian9-mxe
|
docker-image-debian-win32-cross: docker-image-debian9-mxe
|
||||||
docker-image-debian-win64-cross: docker-image-debian9-mxe
|
docker-image-debian-win64-cross: docker-image-debian9-mxe
|
||||||
|
|
||||||
docker-image-debian-alpha-cross: docker-image-debian-sid
|
# For non-x86 hosts not all cross-compilers have been packaged
|
||||||
docker-image-debian-hppa-cross: docker-image-debian-sid
|
ifneq ($(ARCH),x86_64)
|
||||||
docker-image-debian-m68k-cross: docker-image-debian-sid
|
DOCKER_PARTIAL_IMAGES += debian-mips-cross debian-mipsel-cross debian-mips64el-cross
|
||||||
docker-image-debian-sh4-cross: docker-image-debian-sid
|
DOCKER_PARTIAL_IMAGES += debian-ppc64el-cross
|
||||||
docker-image-debian-sparc64-cross: docker-image-debian-sid
|
DOCKER_PARTIAL_IMAGES += debian-s390x-cross
|
||||||
docker-image-debian-mips64-cross: docker-image-debian-sid
|
DOCKER_PARTIAL_IMAGES += debian-win32-cross debian-win64-cross
|
||||||
docker-image-debian-riscv64-cross: docker-image-debian-sid
|
DOCKER_PARTIAL_IMAGES += fedora travis
|
||||||
docker-image-debian-powerpc-cross: docker-image-debian-sid
|
endif
|
||||||
docker-image-debian-ppc64-cross: docker-image-debian-sid
|
|
||||||
|
docker-image-debian-alpha-cross: docker-image-debian10
|
||||||
|
docker-image-debian-arm64-cross: docker-image-debian10
|
||||||
|
docker-image-debian-hppa-cross: docker-image-debian10
|
||||||
|
docker-image-debian-m68k-cross: docker-image-debian10
|
||||||
|
docker-image-debian-mips64-cross: docker-image-debian10
|
||||||
|
docker-image-debian-powerpc-cross: docker-image-debian10
|
||||||
|
docker-image-debian-ppc64-cross: docker-image-debian10
|
||||||
|
docker-image-debian-riscv64-cross: docker-image-debian10
|
||||||
|
docker-image-debian-sh4-cross: docker-image-debian10
|
||||||
|
docker-image-debian-sparc64-cross: docker-image-debian10
|
||||||
|
|
||||||
docker-image-travis: NOUSER=1
|
docker-image-travis: NOUSER=1
|
||||||
|
|
||||||
# Specialist build images, sometimes very limited tools
|
# Specialist build images, sometimes very limited tools
|
||||||
docker-image-tricore-cross: docker-image-debian9
|
docker-image-tricore-cross: docker-image-debian9
|
||||||
|
|
||||||
# These images may be good enough for building tests but not for test builds
|
# These images may be good enough for building tests but not for test builds
|
||||||
DOCKER_PARTIAL_IMAGES += debian-alpha-cross debian-hppa-cross debian-m68k-cross debian-sh4-cross
|
DOCKER_PARTIAL_IMAGES += debian-alpha-cross
|
||||||
DOCKER_PARTIAL_IMAGES += debian-sparc64-cross debian-mips64-cross debian-riscv64-cross
|
DOCKER_PARTIAL_IMAGES += debian-hppa-cross
|
||||||
DOCKER_PARTIAL_IMAGES += debian-tricore-cross debian-powerpc-cross fedora-i386-cross
|
DOCKER_PARTIAL_IMAGES += debian-m68k-cross debian-mips64-cross
|
||||||
DOCKER_PARTIAL_IMAGES += fedora-cris-cross
|
DOCKER_PARTIAL_IMAGES += debian-powerpc-cross debian-ppc64-cross
|
||||||
|
DOCKER_PARTIAL_IMAGES += debian-riscv64-cross
|
||||||
|
DOCKER_PARTIAL_IMAGES += debian-sh4-cross debian-sparc64-cross
|
||||||
|
DOCKER_PARTIAL_IMAGES += debian-tricore-cross
|
||||||
|
DOCKER_PARTIAL_IMAGES += debian-xtensa-cross
|
||||||
|
DOCKER_PARTIAL_IMAGES += fedora-i386-cross fedora-cris-cross
|
||||||
|
|
||||||
# Rules for building linux-user powered images
|
# Rules for building linux-user powered images
|
||||||
#
|
#
|
||||||
@ -131,6 +152,7 @@ DOCKER_PARTIAL_IMAGES += fedora-cris-cross
|
|||||||
# broken so we need a qemu-linux-user for this target
|
# broken so we need a qemu-linux-user for this target
|
||||||
docker-binfmt-image-debian-powerpc-user: DEB_ARCH = powerpc
|
docker-binfmt-image-debian-powerpc-user: DEB_ARCH = powerpc
|
||||||
docker-binfmt-image-debian-powerpc-user: DEB_TYPE = jessie
|
docker-binfmt-image-debian-powerpc-user: DEB_TYPE = jessie
|
||||||
|
docker-binfmt-image-debian-powerpc-user: DEB_URL = http://snapshot.debian.org/archive/debian/20180615T211437Z
|
||||||
docker-binfmt-image-debian-powerpc-user: EXECUTABLE = ${BUILD_DIR}/ppc-linux-user/qemu-ppc
|
docker-binfmt-image-debian-powerpc-user: EXECUTABLE = ${BUILD_DIR}/ppc-linux-user/qemu-ppc
|
||||||
docker-image-debian-powerpc-user-cross: docker-binfmt-image-debian-powerpc-user
|
docker-image-debian-powerpc-user-cross: docker-binfmt-image-debian-powerpc-user
|
||||||
DOCKER_USER_IMAGES += debian-powerpc-user
|
DOCKER_USER_IMAGES += debian-powerpc-user
|
||||||
|
@ -11,6 +11,10 @@
|
|||||||
# or (at your option) any later version. See the COPYING file in
|
# or (at your option) any later version. See the COPYING file in
|
||||||
# the top-level directory.
|
# the top-level directory.
|
||||||
|
|
||||||
|
# This might be set by ENV of a docker container... it is always
|
||||||
|
# overriden by TARGET_LIST if the user sets it.
|
||||||
|
DEF_TARGET_LIST=${DEF_TARGET_LIST:-"x86_64-softmmu,aarch64-softmmu"}
|
||||||
|
|
||||||
requires()
|
requires()
|
||||||
{
|
{
|
||||||
for c in $@; do
|
for c in $@; do
|
||||||
|
@ -111,7 +111,7 @@ def _get_so_libs(executable):
|
|||||||
libs = []
|
libs = []
|
||||||
ldd_re = re.compile(r"(/.*/)(\S*)")
|
ldd_re = re.compile(r"(/.*/)(\S*)")
|
||||||
try:
|
try:
|
||||||
ldd_output = subprocess.check_output(["ldd", executable])
|
ldd_output = subprocess.check_output(["ldd", executable]).decode('utf-8')
|
||||||
for line in ldd_output.split("\n"):
|
for line in ldd_output.split("\n"):
|
||||||
search = ldd_re.search(line)
|
search = ldd_re.search(line)
|
||||||
if search and len(search.groups()) == 2:
|
if search and len(search.groups()) == 2:
|
||||||
@ -258,10 +258,16 @@ class Docker(object):
|
|||||||
return self._do_kill_instances(True)
|
return self._do_kill_instances(True)
|
||||||
|
|
||||||
def _output(self, cmd, **kwargs):
|
def _output(self, cmd, **kwargs):
|
||||||
|
if sys.version_info[1] >= 6:
|
||||||
return subprocess.check_output(self._command + cmd,
|
return subprocess.check_output(self._command + cmd,
|
||||||
stderr=subprocess.STDOUT,
|
stderr=subprocess.STDOUT,
|
||||||
encoding='utf-8',
|
encoding='utf-8',
|
||||||
**kwargs)
|
**kwargs)
|
||||||
|
else:
|
||||||
|
return subprocess.check_output(self._command + cmd,
|
||||||
|
stderr=subprocess.STDOUT,
|
||||||
|
**kwargs).decode('utf-8')
|
||||||
|
|
||||||
|
|
||||||
def inspect_tag(self, tag):
|
def inspect_tag(self, tag):
|
||||||
try:
|
try:
|
||||||
@ -318,10 +324,18 @@ class Docker(object):
|
|||||||
return False
|
return False
|
||||||
return checksum == _text_checksum(_dockerfile_preprocess(dockerfile))
|
return checksum == _text_checksum(_dockerfile_preprocess(dockerfile))
|
||||||
|
|
||||||
def run(self, cmd, keep, quiet):
|
def run(self, cmd, keep, quiet, as_user=False):
|
||||||
label = uuid.uuid1().hex
|
label = uuid.uuid1().hex
|
||||||
if not keep:
|
if not keep:
|
||||||
self._instances.append(label)
|
self._instances.append(label)
|
||||||
|
|
||||||
|
if as_user:
|
||||||
|
uid = os.getuid()
|
||||||
|
cmd = [ "-u", str(uid) ] + cmd
|
||||||
|
# podman requires a bit more fiddling
|
||||||
|
if self._command[0] == "podman":
|
||||||
|
argv.insert(0, '--userns=keep-id')
|
||||||
|
|
||||||
ret = self._do_check(["run", "--label",
|
ret = self._do_check(["run", "--label",
|
||||||
"com.qemu.instance.uuid=" + label] + cmd,
|
"com.qemu.instance.uuid=" + label] + cmd,
|
||||||
quiet=quiet)
|
quiet=quiet)
|
||||||
@ -364,15 +378,8 @@ class RunCommand(SubCommand):
|
|||||||
help="Run container using the current user's uid")
|
help="Run container using the current user's uid")
|
||||||
|
|
||||||
def run(self, args, argv):
|
def run(self, args, argv):
|
||||||
if args.run_as_current_user:
|
return Docker().run(argv, args.keep, quiet=args.quiet,
|
||||||
uid = os.getuid()
|
as_user=args.run_as_current_user)
|
||||||
argv = [ "-u", str(uid) ] + argv
|
|
||||||
docker = Docker()
|
|
||||||
if docker._command[0] == "podman":
|
|
||||||
argv = [ "--uidmap", "%d:0:1" % uid,
|
|
||||||
"--uidmap", "0:1:%d" % uid,
|
|
||||||
"--uidmap", "%d:%d:64536" % (uid + 1, uid + 1)] + argv
|
|
||||||
return Docker().run(argv, args.keep, quiet=args.quiet)
|
|
||||||
|
|
||||||
|
|
||||||
class BuildCommand(SubCommand):
|
class BuildCommand(SubCommand):
|
||||||
@ -536,9 +543,9 @@ class ProbeCommand(SubCommand):
|
|||||||
try:
|
try:
|
||||||
docker = Docker()
|
docker = Docker()
|
||||||
if docker._command[0] == "docker":
|
if docker._command[0] == "docker":
|
||||||
print("yes")
|
print("docker")
|
||||||
elif docker._command[0] == "sudo":
|
elif docker._command[0] == "sudo":
|
||||||
print("sudo")
|
print("sudo docker")
|
||||||
elif docker._command[0] == "podman":
|
elif docker._command[0] == "podman":
|
||||||
print("podman")
|
print("podman")
|
||||||
except Exception:
|
except Exception:
|
||||||
@ -556,8 +563,6 @@ class CcCommand(SubCommand):
|
|||||||
help="The docker image in which to run cc")
|
help="The docker image in which to run cc")
|
||||||
parser.add_argument("--cc", default="cc",
|
parser.add_argument("--cc", default="cc",
|
||||||
help="The compiler executable to call")
|
help="The compiler executable to call")
|
||||||
parser.add_argument("--user",
|
|
||||||
help="The user-id to run under")
|
|
||||||
parser.add_argument("--source-path", "-s", nargs="*", dest="paths",
|
parser.add_argument("--source-path", "-s", nargs="*", dest="paths",
|
||||||
help="""Extra paths to (ro) mount into container for
|
help="""Extra paths to (ro) mount into container for
|
||||||
reading sources""")
|
reading sources""")
|
||||||
@ -571,11 +576,10 @@ class CcCommand(SubCommand):
|
|||||||
if args.paths:
|
if args.paths:
|
||||||
for p in args.paths:
|
for p in args.paths:
|
||||||
cmd += ["-v", "%s:%s:ro,z" % (p, p)]
|
cmd += ["-v", "%s:%s:ro,z" % (p, p)]
|
||||||
if args.user:
|
|
||||||
cmd += ["-u", args.user]
|
|
||||||
cmd += [args.image, args.cc]
|
cmd += [args.image, args.cc]
|
||||||
cmd += argv
|
cmd += argv
|
||||||
return Docker().command("run", cmd, args.quiet)
|
return Docker().run(cmd, False, quiet=args.quiet,
|
||||||
|
as_user=True)
|
||||||
|
|
||||||
|
|
||||||
class CheckCommand(SubCommand):
|
class CheckCommand(SubCommand):
|
||||||
@ -651,6 +655,7 @@ def main():
|
|||||||
cmd.args(subp)
|
cmd.args(subp)
|
||||||
subp.set_defaults(cmdobj=cmd)
|
subp.set_defaults(cmdobj=cmd)
|
||||||
args, argv = parser.parse_known_args()
|
args, argv = parser.parse_known_args()
|
||||||
|
if args.engine:
|
||||||
USE_ENGINE = args.engine
|
USE_ENGINE = args.engine
|
||||||
return args.cmdobj.run(args, argv)
|
return args.cmdobj.run(args, argv)
|
||||||
|
|
||||||
|
@ -1,13 +1,12 @@
|
|||||||
#
|
#
|
||||||
# Docker cross-compiler target
|
# Docker cross-compiler target
|
||||||
#
|
#
|
||||||
# This docker target builds on the debian sid base image which
|
# This docker target builds on the debian Buster base image.
|
||||||
# contains cross compilers for Debian "ports" targets.
|
|
||||||
#
|
#
|
||||||
FROM qemu:debian-sid
|
FROM qemu:debian10
|
||||||
|
|
||||||
RUN apt update && \
|
RUN apt update && \
|
||||||
DEBIAN_FRONTEND=noninteractive eatmydata \
|
DEBIAN_FRONTEND=noninteractive eatmydata \
|
||||||
apt install -y --no-install-recommends \
|
apt install -y --no-install-recommends \
|
||||||
gcc-alpha-linux-gnu \
|
gcc-alpha-linux-gnu \
|
||||||
libc6.1-dev-alpha-cross || { echo "Failed to build - see debian-sid.docker notes"; exit 1; }
|
libc6.1-dev-alpha-cross
|
||||||
|
22
tests/docker/dockerfiles/debian-amd64-cross.docker
Normal file
22
tests/docker/dockerfiles/debian-amd64-cross.docker
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
#
|
||||||
|
# Docker x86_64 cross target
|
||||||
|
#
|
||||||
|
# This docker target is used on non-x86_64 machines which need the
|
||||||
|
# x86_64 cross compilers installed.
|
||||||
|
#
|
||||||
|
FROM qemu:debian10
|
||||||
|
MAINTAINER Alex Bennée <alex.bennee@linaro.org>
|
||||||
|
|
||||||
|
# Add the foreign architecture we want and install dependencies
|
||||||
|
RUN dpkg --add-architecture amd64
|
||||||
|
RUN apt update && \
|
||||||
|
DEBIAN_FRONTEND=noninteractive eatmydata \
|
||||||
|
apt install -y --no-install-recommends \
|
||||||
|
crossbuild-essential-amd64
|
||||||
|
RUN apt update && \
|
||||||
|
DEBIAN_FRONTEND=noninteractive eatmydata \
|
||||||
|
apt build-dep -yy -a amd64 --arch-only qemu
|
||||||
|
|
||||||
|
# Specify the cross prefix for this image (see tests/docker/common.rc)
|
||||||
|
ENV QEMU_CONFIGURE_OPTS --cross-prefix=x86_64-linux-gnu-
|
||||||
|
ENV DEF_TARGET_LIST x86_64-softmmu,x86_64-linux-user,i386-softmmu,i386-linux-user
|
@ -1,9 +1,9 @@
|
|||||||
#
|
#
|
||||||
# Docker arm64 cross-compiler target
|
# Docker arm64 cross-compiler target
|
||||||
#
|
#
|
||||||
# This docker target builds on the debian Stretch base image.
|
# This docker target builds on the debian Buster base image.
|
||||||
#
|
#
|
||||||
FROM qemu:debian9
|
FROM qemu:debian10
|
||||||
|
|
||||||
# Add the foreign architecture we want and install dependencies
|
# Add the foreign architecture we want and install dependencies
|
||||||
RUN dpkg --add-architecture arm64
|
RUN dpkg --add-architecture arm64
|
||||||
@ -13,10 +13,11 @@ RUN apt update && \
|
|||||||
crossbuild-essential-arm64
|
crossbuild-essential-arm64
|
||||||
RUN apt update && \
|
RUN apt update && \
|
||||||
DEBIAN_FRONTEND=noninteractive eatmydata \
|
DEBIAN_FRONTEND=noninteractive eatmydata \
|
||||||
apt build-dep -yy -a arm64 qemu
|
apt build-dep -yy -a arm64 --arch-only qemu
|
||||||
|
|
||||||
# Specify the cross prefix for this image (see tests/docker/common.rc)
|
# Specify the cross prefix for this image (see tests/docker/common.rc)
|
||||||
ENV QEMU_CONFIGURE_OPTS --cross-prefix=aarch64-linux-gnu-
|
ENV QEMU_CONFIGURE_OPTS --cross-prefix=aarch64-linux-gnu-
|
||||||
|
ENV DEF_TARGET_LIST aarch64-softmmu,aarch64-linux-user
|
||||||
|
|
||||||
RUN apt update && \
|
RUN apt update && \
|
||||||
DEBIAN_FRONTEND=noninteractive eatmydata \
|
DEBIAN_FRONTEND=noninteractive eatmydata \
|
||||||
|
@ -11,10 +11,11 @@ RUN dpkg --add-architecture armel && \
|
|||||||
apt update && \
|
apt update && \
|
||||||
apt install -yy crossbuild-essential-armel && \
|
apt install -yy crossbuild-essential-armel && \
|
||||||
DEBIAN_FRONTEND=noninteractive eatmydata \
|
DEBIAN_FRONTEND=noninteractive eatmydata \
|
||||||
apt build-dep -yy -a armel qemu
|
apt build-dep -yy -a armel --arch-only qemu
|
||||||
|
|
||||||
# Specify the cross prefix for this image (see tests/docker/common.rc)
|
# Specify the cross prefix for this image (see tests/docker/common.rc)
|
||||||
ENV QEMU_CONFIGURE_OPTS --cross-prefix=arm-linux-gnueabi-
|
ENV QEMU_CONFIGURE_OPTS --cross-prefix=arm-linux-gnueabi-
|
||||||
|
ENV DEF_TARGET_LIST arm-softmmu,arm-linux-user,armeb-linux-user
|
||||||
|
|
||||||
RUN apt update && \
|
RUN apt update && \
|
||||||
DEBIAN_FRONTEND=noninteractive eatmydata \
|
DEBIAN_FRONTEND=noninteractive eatmydata \
|
||||||
|
@ -13,10 +13,11 @@ RUN apt update && \
|
|||||||
crossbuild-essential-armhf
|
crossbuild-essential-armhf
|
||||||
RUN apt update && \
|
RUN apt update && \
|
||||||
DEBIAN_FRONTEND=noninteractive eatmydata \
|
DEBIAN_FRONTEND=noninteractive eatmydata \
|
||||||
apt build-dep -yy -a armhf qemu
|
apt build-dep -yy -a armhf --arch-only qemu
|
||||||
|
|
||||||
# Specify the cross prefix for this image (see tests/docker/common.rc)
|
# Specify the cross prefix for this image (see tests/docker/common.rc)
|
||||||
ENV QEMU_CONFIGURE_OPTS --cross-prefix=arm-linux-gnueabihf-
|
ENV QEMU_CONFIGURE_OPTS --cross-prefix=arm-linux-gnueabihf-
|
||||||
|
ENV DEF_TARGET_LIST arm-softmmu,arm-linux-user,armeb-linux-user
|
||||||
|
|
||||||
RUN apt update && \
|
RUN apt update && \
|
||||||
DEBIAN_FRONTEND=noninteractive eatmydata \
|
DEBIAN_FRONTEND=noninteractive eatmydata \
|
||||||
|
@ -1,16 +0,0 @@
|
|||||||
#
|
|
||||||
# Docker arm64 cross-compiler target
|
|
||||||
#
|
|
||||||
# This docker target builds on the Debian's Buster base image. There
|
|
||||||
# are no QEMU pre-requistes so this image can only be used to build
|
|
||||||
# test cases.
|
|
||||||
#
|
|
||||||
FROM qemu:debian10
|
|
||||||
|
|
||||||
# Add the foreign architecture we want and install dependencies
|
|
||||||
RUN dpkg --add-architecture arm64
|
|
||||||
RUN apt update && \
|
|
||||||
DEBIAN_FRONTEND=noninteractive apt install -yy eatmydata && \
|
|
||||||
DEBIAN_FRONTEND=noninteractive eatmydata \
|
|
||||||
apt-get install -y --no-install-recommends \
|
|
||||||
crossbuild-essential-arm64
|
|
@ -1,10 +1,9 @@
|
|||||||
#
|
#
|
||||||
# Docker cross-compiler target
|
# Docker cross-compiler target
|
||||||
#
|
#
|
||||||
# This docker target builds on the debian sid base image which
|
# This docker target builds on the debian Buster base image.
|
||||||
# contains cross compilers for Debian "ports" targets.
|
|
||||||
#
|
#
|
||||||
FROM qemu:debian-sid
|
FROM qemu:debian10
|
||||||
|
|
||||||
RUN apt update && \
|
RUN apt update && \
|
||||||
DEBIAN_FRONTEND=noninteractive eatmydata \
|
DEBIAN_FRONTEND=noninteractive eatmydata \
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
#
|
#
|
||||||
# Docker cross-compiler target
|
# Docker cross-compiler target
|
||||||
#
|
#
|
||||||
# This docker target builds on the debian sid base image which
|
# This docker target builds on the debian Buster base image.
|
||||||
# contains cross compilers for Debian "ports" targets.
|
|
||||||
#
|
#
|
||||||
FROM qemu:debian-sid
|
FROM qemu:debian10
|
||||||
|
|
||||||
RUN apt update && \
|
RUN apt update && \
|
||||||
DEBIAN_FRONTEND=noninteractive eatmydata \
|
DEBIAN_FRONTEND=noninteractive eatmydata \
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
#
|
#
|
||||||
# Docker mips cross-compiler target
|
# Docker mips cross-compiler target
|
||||||
#
|
#
|
||||||
# This docker target builds on the debian Stretch base image.
|
# This docker target builds on the debian Buster base image.
|
||||||
#
|
#
|
||||||
FROM qemu:debian9
|
FROM qemu:debian10
|
||||||
|
|
||||||
MAINTAINER Philippe Mathieu-Daudé <f4bug@amsat.org>
|
MAINTAINER Philippe Mathieu-Daudé <f4bug@amsat.org>
|
||||||
|
|
||||||
@ -16,10 +16,11 @@ RUN apt update && \
|
|||||||
|
|
||||||
RUN apt update && \
|
RUN apt update && \
|
||||||
DEBIAN_FRONTEND=noninteractive eatmydata \
|
DEBIAN_FRONTEND=noninteractive eatmydata \
|
||||||
apt build-dep -yy -a mips qemu
|
apt build-dep -yy -a mips --arch-only qemu
|
||||||
|
|
||||||
# Specify the cross prefix for this image (see tests/docker/common.rc)
|
# Specify the cross prefix for this image (see tests/docker/common.rc)
|
||||||
ENV QEMU_CONFIGURE_OPTS --cross-prefix=mips-linux-gnu-
|
ENV QEMU_CONFIGURE_OPTS --cross-prefix=mips-linux-gnu-
|
||||||
|
ENV DEF_TARGET_LIST mips-softmmu,mipsel-linux-user
|
||||||
|
|
||||||
# Install extra libraries to increase code coverage
|
# Install extra libraries to increase code coverage
|
||||||
RUN apt update && \
|
RUN apt update && \
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
#
|
#
|
||||||
# Docker cross-compiler target
|
# Docker cross-compiler target
|
||||||
#
|
#
|
||||||
# This docker target builds on the debian sid base image which
|
# This docker target builds on the debian Buster base image.
|
||||||
# contains cross compilers for Debian "ports" targets.
|
|
||||||
#
|
#
|
||||||
FROM qemu:debian-sid
|
FROM qemu:debian10
|
||||||
|
|
||||||
RUN apt update && \
|
RUN apt update && \
|
||||||
DEBIAN_FRONTEND=noninteractive eatmydata \
|
DEBIAN_FRONTEND=noninteractive eatmydata \
|
||||||
|
@ -17,10 +17,11 @@ RUN dpkg --add-architecture mips64el && \
|
|||||||
|
|
||||||
RUN apt update && \
|
RUN apt update && \
|
||||||
DEBIAN_FRONTEND=noninteractive eatmydata \
|
DEBIAN_FRONTEND=noninteractive eatmydata \
|
||||||
apt build-dep -yy -a mips64el qemu
|
apt build-dep -yy -a mips64el --arch-only qemu
|
||||||
|
|
||||||
# Specify the cross prefix for this image (see tests/docker/common.rc)
|
# Specify the cross prefix for this image (see tests/docker/common.rc)
|
||||||
ENV QEMU_CONFIGURE_OPTS --cross-prefix=mips64el-linux-gnuabi64-
|
ENV QEMU_CONFIGURE_OPTS --cross-prefix=mips64el-linux-gnuabi64-
|
||||||
|
ENV DEF_TARGET_LIST mips64el-softmmu,mips64el-linux-user
|
||||||
|
|
||||||
# Install extra libraries to increase code coverage
|
# Install extra libraries to increase code coverage
|
||||||
RUN apt update && \
|
RUN apt update && \
|
||||||
|
@ -16,7 +16,7 @@ RUN apt update && \
|
|||||||
|
|
||||||
RUN apt update && \
|
RUN apt update && \
|
||||||
DEBIAN_FRONTEND=noninteractive eatmydata \
|
DEBIAN_FRONTEND=noninteractive eatmydata \
|
||||||
apt build-dep -yy -a mipsel qemu
|
apt build-dep -yy -a mipsel --arch-only qemu
|
||||||
|
|
||||||
# Specify the cross prefix for this image (see tests/docker/common.rc)
|
# Specify the cross prefix for this image (see tests/docker/common.rc)
|
||||||
ENV QEMU_CONFIGURE_OPTS --cross-prefix=mipsel-linux-gnu-
|
ENV QEMU_CONFIGURE_OPTS --cross-prefix=mipsel-linux-gnu-
|
||||||
|
@ -1,14 +1,12 @@
|
|||||||
#
|
#
|
||||||
# Docker powerpc cross-compiler target
|
# Docker powerpc cross-compiler target
|
||||||
#
|
#
|
||||||
# This docker target builds on the debian sid base image which
|
# This docker target builds on the debian Buster base image.
|
||||||
# contains cross compilers for Debian "ports" targets. The original
|
|
||||||
# Jessie based no longer builds.
|
|
||||||
#
|
#
|
||||||
FROM qemu:debian-sid
|
FROM qemu:debian10
|
||||||
|
|
||||||
RUN apt update && \
|
RUN apt update && \
|
||||||
DEBIAN_FRONTEND=noninteractive eatmydata \
|
DEBIAN_FRONTEND=noninteractive eatmydata \
|
||||||
apt install -y --no-install-recommends \
|
apt install -y --no-install-recommends \
|
||||||
gcc-powerpc-linux-gnu \
|
gcc-powerpc-linux-gnu \
|
||||||
libc6-dev-powerpc-cross || { echo "Failed to build - see debian-sid.docker notes"; exit 1; }
|
libc6-dev-powerpc-cross
|
||||||
|
@ -8,8 +8,14 @@
|
|||||||
# debootstrapped qemu:debian-powerpc-user but doesn't need any extra
|
# debootstrapped qemu:debian-powerpc-user but doesn't need any extra
|
||||||
# magic once it is setup.
|
# magic once it is setup.
|
||||||
#
|
#
|
||||||
|
# It can be used to build old versions of QEMU, current versions need
|
||||||
|
# newer dependencies than Jessie provides.
|
||||||
|
#
|
||||||
FROM qemu:debian-powerpc-user
|
FROM qemu:debian-powerpc-user
|
||||||
|
|
||||||
RUN echo man-db man-db/auto-update boolean false | debconf-set-selections
|
RUN echo man-db man-db/auto-update boolean false | debconf-set-selections
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get build-dep -yy qemu
|
DEBIAN_FRONTEND=noninteractive apt-get build-dep -yy qemu
|
||||||
|
|
||||||
|
ENV QEMU_CONFIGURE_OPTS --disable-werror
|
||||||
|
ENV DEF_TARGET_LIST powerpc-softmmu,arm-linux-user,aarch64-linux-user
|
||||||
|
@ -1,12 +1,11 @@
|
|||||||
#
|
#
|
||||||
# Docker ppc64 cross-compiler target
|
# Docker ppc64 cross-compiler target
|
||||||
#
|
#
|
||||||
# This docker target builds on the debian sid base image which
|
# This docker target builds on the debian Buster base image.
|
||||||
# contains cross compilers for Debian "ports" targets.
|
FROM qemu:debian10
|
||||||
FROM qemu:debian-sid
|
|
||||||
|
|
||||||
RUN apt update && \
|
RUN apt update && \
|
||||||
DEBIAN_FRONTEND=noninteractive eatmydata \
|
DEBIAN_FRONTEND=noninteractive eatmydata \
|
||||||
apt install -y --no-install-recommends \
|
apt install -y --no-install-recommends \
|
||||||
gcc-powerpc64-linux-gnu \
|
gcc-powerpc64-linux-gnu \
|
||||||
libc6-dev-ppc64-cross || { echo "Failed to build - see debian-sid.docker notes"; exit 1; }
|
libc6-dev-ppc64-cross
|
||||||
|
@ -12,10 +12,11 @@ RUN dpkg --add-architecture ppc64el && \
|
|||||||
|
|
||||||
RUN apt update && \
|
RUN apt update && \
|
||||||
DEBIAN_FRONTEND=noninteractive eatmydata \
|
DEBIAN_FRONTEND=noninteractive eatmydata \
|
||||||
apt build-dep -yy -a ppc64el qemu
|
apt build-dep -yy -a ppc64el --arch-only qemu
|
||||||
|
|
||||||
# Specify the cross prefix for this image (see tests/docker/common.rc)
|
# Specify the cross prefix for this image (see tests/docker/common.rc)
|
||||||
ENV QEMU_CONFIGURE_OPTS --cross-prefix=powerpc64le-linux-gnu-
|
ENV QEMU_CONFIGURE_OPTS --cross-prefix=powerpc64le-linux-gnu-
|
||||||
|
ENV DEF_TARGET_LIST ppc64-softmmu,ppc64-linux-user,ppc64abi32-linux-user
|
||||||
|
|
||||||
# Install extra libraries to increase code coverage
|
# Install extra libraries to increase code coverage
|
||||||
RUN apt update && \
|
RUN apt update && \
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
#
|
#
|
||||||
# Docker cross-compiler target
|
# Docker cross-compiler target
|
||||||
#
|
#
|
||||||
# This docker target builds on the debian sid base image which
|
# This docker target builds on the debian Buster base image.
|
||||||
# contains cross compilers for Debian "ports" targets.
|
|
||||||
#
|
#
|
||||||
FROM qemu:debian-sid
|
FROM qemu:debian10
|
||||||
|
|
||||||
RUN apt update && \
|
RUN apt update && \
|
||||||
DEBIAN_FRONTEND=noninteractive eatmydata \
|
DEBIAN_FRONTEND=noninteractive eatmydata \
|
||||||
|
@ -17,10 +17,11 @@ RUN apt update && \
|
|||||||
|
|
||||||
RUN apt update && \
|
RUN apt update && \
|
||||||
DEBIAN_FRONTEND=noninteractive eatmydata \
|
DEBIAN_FRONTEND=noninteractive eatmydata \
|
||||||
apt build-dep -yy -a s390x qemu
|
apt build-dep -yy -a s390x --arch-only qemu
|
||||||
|
|
||||||
# Specify the cross prefix for this image (see tests/docker/common.rc)
|
# Specify the cross prefix for this image (see tests/docker/common.rc)
|
||||||
ENV QEMU_CONFIGURE_OPTS --cross-prefix=s390x-linux-gnu-
|
ENV QEMU_CONFIGURE_OPTS --cross-prefix=s390x-linux-gnu-
|
||||||
|
ENV DEF_TARGET_LIST s390x-softmmu,s390x-linux-user
|
||||||
|
|
||||||
# Install extra libraries to increase code coverage
|
# Install extra libraries to increase code coverage
|
||||||
RUN apt update && \
|
RUN apt update && \
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
#
|
#
|
||||||
# Docker cross-compiler target
|
# Docker cross-compiler target
|
||||||
#
|
#
|
||||||
# This docker target builds on the debian sid base image which
|
# This docker target builds on the debian Buster base image.
|
||||||
# contains cross compilers for Debian "ports" targets.
|
|
||||||
#
|
#
|
||||||
FROM qemu:debian-sid
|
FROM qemu:debian10
|
||||||
|
|
||||||
RUN apt update && \
|
RUN apt update && \
|
||||||
DEBIAN_FRONTEND=noninteractive eatmydata \
|
DEBIAN_FRONTEND=noninteractive eatmydata \
|
||||||
|
@ -1,25 +1,19 @@
|
|||||||
#
|
#
|
||||||
# Debian Sid Base
|
# Debian Sid Base
|
||||||
#
|
#
|
||||||
# A number of our guests exist as ports only. We can either use the
|
# Currently we can build all our guests with cross-compilers in the
|
||||||
# ports repo or get everything from Sid. However Sid is a rolling
|
# latest Debian release (Buster). However new compilers will first
|
||||||
# distro which may be broken at any particular time. If you are
|
# arrive in Sid. However Sid is a rolling distro which may be broken
|
||||||
# unlucky and try and build your images while gcc is in the process of
|
# at any particular time. To try and mitigate this we use Debian's
|
||||||
# being uploaded this can fail. Your only recourse is to try again in
|
# snapshot archive which provides a "stable" view of what state Sid
|
||||||
# a few hours when the repos have re-synced. Once built however you
|
# was in.
|
||||||
# won't be affected by repo changes unless the docker recipies are
|
|
||||||
# updated and trigger a re-build.
|
|
||||||
#
|
#
|
||||||
|
|
||||||
# This must be earlier than the snapshot date we are aiming for
|
# This must be earlier than the snapshot date we are aiming for
|
||||||
FROM debian:sid-20181011-slim
|
FROM debian:sid-20190812-slim
|
||||||
|
|
||||||
# Use a snapshot known to work (see http://snapshot.debian.org/#Usage)
|
# Use a snapshot known to work (see http://snapshot.debian.org/#Usage)
|
||||||
ENV DEBIAN_SNAPSHOT_DATE "20181030"
|
ENV DEBIAN_SNAPSHOT_DATE "20190820"
|
||||||
RUN sed -i "s%^deb \(https\?://\)deb.debian.org/debian/\? \(.*\)%deb [check-valid-until=no] \1snapshot.debian.org/archive/debian/${DEBIAN_SNAPSHOT_DATE} \2%" /etc/apt/sources.list
|
|
||||||
|
|
||||||
# Use a snapshot known to work (see http://snapshot.debian.org/#Usage)
|
|
||||||
ENV DEBIAN_SNAPSHOT_DATE "20181030"
|
|
||||||
RUN sed -i "s%^deb \(https\?://\)deb.debian.org/debian/\? \(.*\)%deb [check-valid-until=no] \1snapshot.debian.org/archive/debian/${DEBIAN_SNAPSHOT_DATE} \2%" /etc/apt/sources.list
|
RUN sed -i "s%^deb \(https\?://\)deb.debian.org/debian/\? \(.*\)%deb [check-valid-until=no] \1snapshot.debian.org/archive/debian/${DEBIAN_SNAPSHOT_DATE} \2%" /etc/apt/sources.list
|
||||||
|
|
||||||
# Duplicate deb line as deb-src
|
# Duplicate deb line as deb-src
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
#
|
#
|
||||||
# Docker cross-compiler target
|
# Docker cross-compiler target
|
||||||
#
|
#
|
||||||
# This docker target builds on the debian sid base image which
|
# This docker target builds on the debian Buster base image.
|
||||||
# contains cross compilers for Debian "ports" targets.
|
|
||||||
#
|
#
|
||||||
FROM qemu:debian-sid
|
FROM qemu:debian10
|
||||||
|
|
||||||
RUN apt update && \
|
RUN apt update && \
|
||||||
DEBIAN_FRONTEND=noninteractive eatmydata \
|
DEBIAN_FRONTEND=noninteractive eatmydata \
|
||||||
|
@ -56,3 +56,6 @@ RUN apt-get update && \
|
|||||||
DEBIAN_FRONTEND=noninteractive apt-get -y install $PACKAGES
|
DEBIAN_FRONTEND=noninteractive apt-get -y install $PACKAGES
|
||||||
RUN dpkg -l $PACKAGES | sort > /packages.txt
|
RUN dpkg -l $PACKAGES | sort > /packages.txt
|
||||||
ENV FEATURES clang pyyaml sdl2
|
ENV FEATURES clang pyyaml sdl2
|
||||||
|
|
||||||
|
# https://bugs.launchpad.net/qemu/+bug/1838763
|
||||||
|
ENV QEMU_CONFIGURE_OPTS --disable-libssh
|
||||||
|
@ -62,7 +62,7 @@ echo "* Prepared to run command:"
|
|||||||
echo " $CMD"
|
echo " $CMD"
|
||||||
echo "* Hit Ctrl-D to continue, or type 'exit 1' to abort"
|
echo "* Hit Ctrl-D to continue, or type 'exit 1' to abort"
|
||||||
echo
|
echo
|
||||||
$SHELL --noprofile --norc
|
env bash --noprofile --norc
|
||||||
|
|
||||||
if "$CMD"; then
|
if "$CMD"; then
|
||||||
exit 0
|
exit 0
|
||||||
@ -72,7 +72,7 @@ elif test -n "$DEBUG"; then
|
|||||||
echo "* Hit Ctrl-D to exit"
|
echo "* Hit Ctrl-D to exit"
|
||||||
echo
|
echo
|
||||||
# Force error after shell exits
|
# Force error after shell exits
|
||||||
$SHELL --noprofile --norc && exit 1
|
env bash --noprofile --norc && exit 1
|
||||||
else
|
else
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
|
|
||||||
cd "$BUILD_DIR"
|
cd "$BUILD_DIR"
|
||||||
|
|
||||||
DEF_TARGET_LIST="x86_64-softmmu,aarch64-softmmu"
|
|
||||||
TARGET_LIST=${TARGET_LIST:-$DEF_TARGET_LIST} \
|
TARGET_LIST=${TARGET_LIST:-$DEF_TARGET_LIST} \
|
||||||
build_qemu
|
build_qemu
|
||||||
install_qemu
|
install_qemu
|
||||||
|
@ -16,7 +16,6 @@
|
|||||||
requires mingw dtc
|
requires mingw dtc
|
||||||
|
|
||||||
cd "$BUILD_DIR"
|
cd "$BUILD_DIR"
|
||||||
DEF_TARGET_LIST="x86_64-softmmu,aarch64-softmmu"
|
|
||||||
|
|
||||||
for prefix in x86_64-w64-mingw32- i686-w64-mingw32-; do
|
for prefix in x86_64-w64-mingw32- i686-w64-mingw32-; do
|
||||||
TARGET_LIST=${TARGET_LIST:-$DEF_TARGET_LIST} \
|
TARGET_LIST=${TARGET_LIST:-$DEF_TARGET_LIST} \
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
|
|
||||||
cd "$BUILD_DIR"
|
cd "$BUILD_DIR"
|
||||||
|
|
||||||
DEF_TARGET_LIST="x86_64-softmmu,aarch64-softmmu"
|
|
||||||
TARGET_LIST=${TARGET_LIST:-$DEF_TARGET_LIST} \
|
TARGET_LIST=${TARGET_LIST:-$DEF_TARGET_LIST} \
|
||||||
build_qemu
|
build_qemu
|
||||||
check_qemu
|
check_qemu
|
||||||
|
5
tests/tcg/.gitignore
vendored
Normal file
5
tests/tcg/.gitignore
vendored
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# These are build artefacts which only appear when you are doing
|
||||||
|
# builds directly in the source tree.
|
||||||
|
config-*.mak
|
||||||
|
*-softmmu/
|
||||||
|
*-linux-user/
|
@ -1,88 +0,0 @@
|
|||||||
# -*- Mode: makefile -*-
|
|
||||||
#
|
|
||||||
# TCG tests (per-target rules)
|
|
||||||
#
|
|
||||||
# This Makefile fragment is included from the per-target
|
|
||||||
# Makefile.target so will be invoked for each linux-user program we
|
|
||||||
# build. We have two options for compiling, either using a configured
|
|
||||||
# guest compiler or calling one of our docker images to do it for us.
|
|
||||||
#
|
|
||||||
|
|
||||||
# The per ARCH makefile, if it exists, holds extra information about
|
|
||||||
# useful docker images or alternative compiler flags.
|
|
||||||
|
|
||||||
-include $(SRC_PATH)/tests/tcg/$(TARGET_BASE_ARCH)/Makefile.include
|
|
||||||
-include $(SRC_PATH)/tests/tcg/$(TARGET_NAME)/Makefile.include
|
|
||||||
|
|
||||||
GUEST_BUILD=
|
|
||||||
TCG_MAKE=$(SRC_PATH)/tests/tcg/Makefile
|
|
||||||
# Support installed Cross Compilers
|
|
||||||
|
|
||||||
ifdef CROSS_CC_GUEST
|
|
||||||
|
|
||||||
.PHONY: cross-build-guest-tests
|
|
||||||
cross-build-guest-tests:
|
|
||||||
$(call quiet-command, \
|
|
||||||
(mkdir -p tests && cd tests && \
|
|
||||||
$(MAKE) -f $(TCG_MAKE) CC=$(CROSS_CC_GUEST) \
|
|
||||||
BUILD_STATIC=$(CROSS_CC_GUEST_STATIC) \
|
|
||||||
EXTRA_CFLAGS=$(CROSS_CC_GUEST_CFLAGS)), \
|
|
||||||
"BUILD","$(TARGET_NAME) guest-tests with $(CROSS_CC_GUEST)")
|
|
||||||
|
|
||||||
GUEST_BUILD=cross-build-guest-tests
|
|
||||||
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Support building with Docker
|
|
||||||
|
|
||||||
ifeq ($(HAVE_USER_DOCKER)$(GUEST_BUILD),y)
|
|
||||||
ifneq ($(DOCKER_IMAGE),)
|
|
||||||
|
|
||||||
# We also need the Docker make rules to depend on
|
|
||||||
include $(SRC_PATH)/tests/docker/Makefile.include
|
|
||||||
|
|
||||||
DOCKER_COMPILE_CMD="$(DOCKER_SCRIPT) cc --user $(shell id -u) \
|
|
||||||
--cc $(DOCKER_CROSS_COMPILER) \
|
|
||||||
-i qemu:$(DOCKER_IMAGE) \
|
|
||||||
-s $(SRC_PATH) -- "
|
|
||||||
DOCKER_PREREQ=docker-image-$(DOCKER_IMAGE)
|
|
||||||
|
|
||||||
.PHONY: docker-build-guest-tests
|
|
||||||
docker-build-guest-tests: $(DOCKER_PREREQ)
|
|
||||||
$(call quiet-command, \
|
|
||||||
(mkdir -p tests && cd tests && \
|
|
||||||
$(MAKE) -f $(TCG_MAKE) CC=$(DOCKER_COMPILE_CMD) \
|
|
||||||
BUILD_STATIC=y \
|
|
||||||
EXTRA_CFLAGS=$(DOCKER_CROSS_COMPILER_CFLAGS)), \
|
|
||||||
"BUILD","$(TARGET_NAME) guest-tests with docker qemu:$(DOCKER_IMAGE)")
|
|
||||||
|
|
||||||
GUEST_BUILD=docker-build-guest-tests
|
|
||||||
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Final targets
|
|
||||||
.PHONY: guest-tests
|
|
||||||
|
|
||||||
ifneq ($(GUEST_BUILD),)
|
|
||||||
guest-tests: $(GUEST_BUILD)
|
|
||||||
|
|
||||||
run-guest-tests: guest-tests qemu-$(subst y,system-,$(CONFIG_SOFTMMU))$(TARGET_NAME)
|
|
||||||
$(call quiet-command, \
|
|
||||||
(cd tests && $(MAKE) -f $(TCG_MAKE) SPEED=$(SPEED) run), \
|
|
||||||
"RUN", "tests for $(TARGET_NAME)")
|
|
||||||
|
|
||||||
else
|
|
||||||
guest-tests:
|
|
||||||
$(call quiet-command, /bin/true, "BUILD", \
|
|
||||||
"$(TARGET_NAME) guest-tests SKIPPED")
|
|
||||||
|
|
||||||
run-guest-tests:
|
|
||||||
$(call quiet-command, /bin/true, "RUN", \
|
|
||||||
"tests for $(TARGET_NAME) SKIPPED")
|
|
||||||
endif
|
|
||||||
|
|
||||||
# It doesn't matter if these don't exits
|
|
||||||
.PHONY: clean-guest-tests
|
|
||||||
clean-guest-tests:
|
|
||||||
rm -rf tests || echo "no $(TARGET_NAME) tests to remove"
|
|
18
tests/tcg/Makefile.prereqs
Normal file
18
tests/tcg/Makefile.prereqs
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
# -*- Mode: makefile -*-
|
||||||
|
#
|
||||||
|
# TCG Compiler Probe
|
||||||
|
#
|
||||||
|
# This Makefile fragment is included multiple times in the main make
|
||||||
|
# script to probe for available compilers. This is used to build up a
|
||||||
|
# selection of required docker targets before we invoke a sub-make for
|
||||||
|
# each target.
|
||||||
|
|
||||||
|
DOCKER_IMAGE:=
|
||||||
|
|
||||||
|
-include $(BUILD_DIR)/tests/tcg/config-$(PROBE_TARGET).mak
|
||||||
|
|
||||||
|
ifneq ($(DOCKER_IMAGE),)
|
||||||
|
build-tcg-tests-$(PROBE_TARGET): docker-image-$(DOCKER_IMAGE)
|
||||||
|
$(BUILD_DIR)/tests/tcg/config_$(PROBE_TARGET).mak: config-host.mak
|
||||||
|
config-host.mak: $(SRC_PATH)/tests/tcg/configure.sh
|
||||||
|
endif
|
@ -1,31 +0,0 @@
|
|||||||
# -*- Mode: makefile -*-
|
|
||||||
#
|
|
||||||
# TCG Compiler Probe
|
|
||||||
#
|
|
||||||
# This Makefile fragment is included multiple times in the main make
|
|
||||||
# script to probe for available compilers. This is used to build up a
|
|
||||||
# selection of required docker targets before we invoke a sub-make for
|
|
||||||
# each target.
|
|
||||||
|
|
||||||
# First we need the target makefile which tells us the target architecture
|
|
||||||
-include $(BUILD_DIR)/$(PROBE_TARGET)/config-target.mak
|
|
||||||
|
|
||||||
# Then we load up the target architecture makefiles which tell us
|
|
||||||
# about the compilers
|
|
||||||
CROSS_CC_GUEST:=
|
|
||||||
DOCKER_IMAGE:=
|
|
||||||
DOCKER_PREREQ:=
|
|
||||||
|
|
||||||
-include $(SRC_PATH)/tests/tcg/$(TARGET_BASE_ARCH)/Makefile.include
|
|
||||||
-include $(SRC_PATH)/tests/tcg/$(TARGET_NAME)/Makefile.include
|
|
||||||
|
|
||||||
ifndef CROSS_CC_GUEST
|
|
||||||
ifneq ($(DOCKER_IMAGE),)
|
|
||||||
DOCKER_PREREQ:=docker-image-$(DOCKER_IMAGE)
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Clean-up
|
|
||||||
# undefine TARGET_NAME
|
|
||||||
# undefine TARGET_BASE_ARCH
|
|
||||||
# undefine TARGET_ABI_DIR
|
|
95
tests/tcg/Makefile.qemu
Normal file
95
tests/tcg/Makefile.qemu
Normal file
@ -0,0 +1,95 @@
|
|||||||
|
# -*- Mode: makefile -*-
|
||||||
|
#
|
||||||
|
# TCG tests (per-target rules)
|
||||||
|
#
|
||||||
|
# This Makefile fragment is included from the build-tcg target, once
|
||||||
|
# for each target we build. We have two options for compiling, either
|
||||||
|
# using a configured guest compiler or calling one of our docker images
|
||||||
|
# to do it for us.
|
||||||
|
#
|
||||||
|
|
||||||
|
include $(SRC_PATH)/rules.mak
|
||||||
|
|
||||||
|
# The configure script fills in extra information about
|
||||||
|
# useful docker images or alternative compiler flags.
|
||||||
|
|
||||||
|
CROSS_CC_GUEST:=
|
||||||
|
DOCKER_IMAGE:=
|
||||||
|
-include $(BUILD_DIR)/tests/tcg/config-$(TARGET).mak
|
||||||
|
|
||||||
|
GUEST_BUILD=
|
||||||
|
TCG_MAKE=../Makefile.target
|
||||||
|
|
||||||
|
# We also need the Docker make rules to depend on
|
||||||
|
SKIP_DOCKER_BUILD=1
|
||||||
|
include $(SRC_PATH)/tests/docker/Makefile.include
|
||||||
|
|
||||||
|
# Support installed Cross Compilers
|
||||||
|
|
||||||
|
ifdef CROSS_CC_GUEST
|
||||||
|
|
||||||
|
.PHONY: cross-build-guest-tests
|
||||||
|
cross-build-guest-tests:
|
||||||
|
$(call quiet-command, \
|
||||||
|
(mkdir -p tests/tcg/$(TARGET) && cd tests/tcg/$(TARGET) && \
|
||||||
|
$(MAKE) -f $(TCG_MAKE) TARGET="$(TARGET)" CC="$(CROSS_CC_GUEST)" \
|
||||||
|
SRC_PATH="$(SRC_PATH)" BUILD_STATIC=$(CROSS_CC_GUEST_STATIC) \
|
||||||
|
EXTRA_CFLAGS="$(CROSS_CC_GUEST_CFLAGS)"), \
|
||||||
|
"BUILD","$(TARGET) guest-tests with $(CROSS_CC_GUEST)")
|
||||||
|
|
||||||
|
GUEST_BUILD=cross-build-guest-tests
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
||||||
|
# Support building with Docker
|
||||||
|
|
||||||
|
ifneq ($(DOCKER_IMAGE),)
|
||||||
|
|
||||||
|
DOCKER_COMPILE_CMD="$(DOCKER_SCRIPT) cc \
|
||||||
|
--cc $(DOCKER_CROSS_CC_GUEST) \
|
||||||
|
-i qemu:$(DOCKER_IMAGE) \
|
||||||
|
-s $(SRC_PATH) -- "
|
||||||
|
|
||||||
|
.PHONY: docker-build-guest-tests
|
||||||
|
docker-build-guest-tests: docker-image-$(DOCKER_IMAGE)
|
||||||
|
$(call quiet-command, \
|
||||||
|
(mkdir -p tests/tcg/$(TARGET) && cd tests/tcg/$(TARGET) && \
|
||||||
|
$(MAKE) -f $(TCG_MAKE) TARGET="$(TARGET)" CC=$(DOCKER_COMPILE_CMD) \
|
||||||
|
SRC_PATH="$(SRC_PATH)" BUILD_STATIC=y \
|
||||||
|
EXTRA_CFLAGS="$(CROSS_CC_GUEST_CFLAGS)"), \
|
||||||
|
"BUILD","$(TARGET) guest-tests with docker qemu:$(DOCKER_IMAGE)")
|
||||||
|
|
||||||
|
GUEST_BUILD=docker-build-guest-tests
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
||||||
|
# Final targets
|
||||||
|
all:
|
||||||
|
@echo "Do not invoke this Makefile directly"; exit 1
|
||||||
|
|
||||||
|
.PHONY: guest-tests
|
||||||
|
|
||||||
|
ifneq ($(GUEST_BUILD),)
|
||||||
|
guest-tests: $(GUEST_BUILD)
|
||||||
|
|
||||||
|
run-guest-tests: guest-tests
|
||||||
|
$(call quiet-command, \
|
||||||
|
(cd tests/tcg/$(TARGET) && \
|
||||||
|
$(MAKE) -f $(TCG_MAKE) TARGET="$(TARGET)" \
|
||||||
|
SRC_PATH="$(SRC_PATH)" SPEED=$(SPEED) run), \
|
||||||
|
"RUN", "tests for $(TARGET_NAME)")
|
||||||
|
|
||||||
|
else
|
||||||
|
guest-tests:
|
||||||
|
$(call quiet-command, /bin/true, "BUILD", \
|
||||||
|
"$(TARGET) guest-tests SKIPPED")
|
||||||
|
|
||||||
|
run-guest-tests:
|
||||||
|
$(call quiet-command, /bin/true, "RUN", \
|
||||||
|
"tests for $(TARGET) SKIPPED")
|
||||||
|
endif
|
||||||
|
|
||||||
|
# It doesn't matter if these don't exits
|
||||||
|
.PHONY: clean-guest-tests
|
||||||
|
clean-guest-tests:
|
||||||
|
rm -rf tests/tcg/$(TARGET)
|
@ -29,8 +29,9 @@
|
|||||||
# We also expect to be in the tests build dir for the FOO-(linux-user|softmmu).
|
# We also expect to be in the tests build dir for the FOO-(linux-user|softmmu).
|
||||||
#
|
#
|
||||||
|
|
||||||
|
all:
|
||||||
-include ../../config-host.mak
|
-include ../../config-host.mak
|
||||||
-include ../config-target.mak
|
-include ../config-$(TARGET).mak
|
||||||
|
|
||||||
# for including , in command strings
|
# for including , in command strings
|
||||||
COMMA := ,
|
COMMA := ,
|
||||||
@ -62,12 +63,6 @@ CFLAGS=
|
|||||||
QEMU_CFLAGS=
|
QEMU_CFLAGS=
|
||||||
LDFLAGS=
|
LDFLAGS=
|
||||||
|
|
||||||
# The QEMU for this TARGET
|
|
||||||
ifdef CONFIG_USER_ONLY
|
|
||||||
QEMU=../qemu-$(TARGET_NAME)
|
|
||||||
else
|
|
||||||
QEMU=../qemu-system-$(TARGET_NAME)
|
|
||||||
endif
|
|
||||||
QEMU_OPTS=
|
QEMU_OPTS=
|
||||||
|
|
||||||
|
|
||||||
@ -82,10 +77,7 @@ ifdef CONFIG_USER_ONLY
|
|||||||
# The order we include is important. We include multiarch, base arch
|
# The order we include is important. We include multiarch, base arch
|
||||||
# and finally arch if it's not the same as base arch.
|
# and finally arch if it's not the same as base arch.
|
||||||
-include $(SRC_PATH)/tests/tcg/multiarch/Makefile.target
|
-include $(SRC_PATH)/tests/tcg/multiarch/Makefile.target
|
||||||
-include $(SRC_PATH)/tests/tcg/$(TARGET_BASE_ARCH)/Makefile.target
|
|
||||||
ifneq ($(TARGET_BASE_ARCH),$(TARGET_NAME))
|
|
||||||
-include $(SRC_PATH)/tests/tcg/$(TARGET_NAME)/Makefile.target
|
-include $(SRC_PATH)/tests/tcg/$(TARGET_NAME)/Makefile.target
|
||||||
endif
|
|
||||||
|
|
||||||
# Add the common build options
|
# Add the common build options
|
||||||
CFLAGS+=-Wall -O0 -g -fno-strict-aliasing
|
CFLAGS+=-Wall -O0 -g -fno-strict-aliasing
|
||||||
@ -101,10 +93,7 @@ else
|
|||||||
# are expected to provide their own build recipes.
|
# are expected to provide their own build recipes.
|
||||||
-include $(SRC_PATH)/tests/tcg/minilib/Makefile.target
|
-include $(SRC_PATH)/tests/tcg/minilib/Makefile.target
|
||||||
-include $(SRC_PATH)/tests/tcg/multiarch/system/Makefile.softmmu-target
|
-include $(SRC_PATH)/tests/tcg/multiarch/system/Makefile.softmmu-target
|
||||||
-include $(SRC_PATH)/tests/tcg/$(TARGET_BASE_ARCH)/Makefile.softmmu-target
|
|
||||||
ifneq ($(TARGET_BASE_ARCH),$(TARGET_NAME))
|
|
||||||
-include $(SRC_PATH)/tests/tcg/$(TARGET_NAME)/Makefile.softmmu-target
|
-include $(SRC_PATH)/tests/tcg/$(TARGET_NAME)/Makefile.softmmu-target
|
||||||
endif
|
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
@ -1,8 +0,0 @@
|
|||||||
# Makefile.include for AArch64 targets
|
|
||||||
#
|
|
||||||
# We don't have any bigendian build tools so we only use this for AArch64
|
|
||||||
|
|
||||||
ifeq ($(TARGET_NAME),aarch64)
|
|
||||||
DOCKER_IMAGE=debian-buster-arm64-cross
|
|
||||||
DOCKER_CROSS_COMPILER=aarch64-linux-gnu-gcc
|
|
||||||
endif
|
|
@ -22,11 +22,11 @@ LDFLAGS+=-static -nostdlib $(CRT_OBJS) $(MINILIB_OBJS) -lgcc
|
|||||||
.PRECIOUS: $(CRT_OBJS)
|
.PRECIOUS: $(CRT_OBJS)
|
||||||
|
|
||||||
%.o: $(CRT_PATH)/%.S
|
%.o: $(CRT_PATH)/%.S
|
||||||
$(CC) $(CFLAGS) -x assembler-with-cpp -c $< -o $@
|
$(CC) $(CFLAGS) $(EXTRA_CFLAGS) -x assembler-with-cpp -c $< -o $@
|
||||||
|
|
||||||
# Build and link the tests
|
# Build and link the tests
|
||||||
%: %.c $(LINK_SCRIPT) $(CRT_OBJS) $(MINILIB_OBJS)
|
%: %.c $(LINK_SCRIPT) $(CRT_OBJS) $(MINILIB_OBJS)
|
||||||
$(CC) $(CFLAGS) $< -o $@ $(LDFLAGS)
|
$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $< -o $@ $(LDFLAGS)
|
||||||
|
|
||||||
memory: CFLAGS+=-DCHECK_UNALIGNED=1
|
memory: CFLAGS+=-DCHECK_UNALIGNED=1
|
||||||
|
|
||||||
|
@ -2,12 +2,14 @@
|
|||||||
#
|
#
|
||||||
# AArch64 specific tweaks
|
# AArch64 specific tweaks
|
||||||
|
|
||||||
|
ARM_SRC=$(SRC_PATH)/tests/tcg/arm
|
||||||
|
VPATH += $(ARM_SRC)
|
||||||
|
|
||||||
AARCH64_SRC=$(SRC_PATH)/tests/tcg/aarch64
|
AARCH64_SRC=$(SRC_PATH)/tests/tcg/aarch64
|
||||||
VPATH += $(AARCH64_SRC)
|
VPATH += $(AARCH64_SRC)
|
||||||
|
|
||||||
# we don't build any of the ARM tests
|
# we don't build any other ARM test
|
||||||
AARCH64_TESTS=$(filter-out $(ARM_TESTS), $(TESTS))
|
AARCH64_TESTS=fcvt
|
||||||
AARCH64_TESTS+=fcvt
|
|
||||||
|
|
||||||
fcvt: LDFLAGS+=-lm
|
fcvt: LDFLAGS+=-lm
|
||||||
|
|
||||||
@ -16,6 +18,6 @@ run-fcvt: fcvt
|
|||||||
$(call diff-out,$<,$(AARCH64_SRC)/fcvt.ref)
|
$(call diff-out,$<,$(AARCH64_SRC)/fcvt.ref)
|
||||||
|
|
||||||
AARCH64_TESTS += pauth-1 pauth-2
|
AARCH64_TESTS += pauth-1 pauth-2
|
||||||
run-pauth-%: QEMU += -cpu max
|
run-pauth-%: QEMU_OPTS += -cpu max
|
||||||
|
|
||||||
TESTS:=$(AARCH64_TESTS)
|
TESTS += $(AARCH64_TESTS)
|
||||||
|
@ -1,2 +0,0 @@
|
|||||||
DOCKER_IMAGE=debian-alpha-cross
|
|
||||||
DOCKER_CROSS_COMPILER=alpha-linux-gnu-gcc
|
|
@ -22,11 +22,11 @@ LDFLAGS+=-static -nostdlib $(CRT_OBJS) $(MINILIB_OBJS) -lgcc
|
|||||||
.PRECIOUS: $(CRT_OBJS)
|
.PRECIOUS: $(CRT_OBJS)
|
||||||
|
|
||||||
%.o: $(CRT_PATH)/%.S
|
%.o: $(CRT_PATH)/%.S
|
||||||
$(CC) $(CFLAGS) -x assembler-with-cpp -c $< -o $@
|
$(CC) $(CFLAGS) $(EXTRA_CFLAGS) -x assembler-with-cpp -c $< -o $@
|
||||||
|
|
||||||
# Build and link the tests
|
# Build and link the tests
|
||||||
%: %.c $(LINK_SCRIPT) $(CRT_OBJS) $(MINILIB_OBJS)
|
%: %.c $(LINK_SCRIPT) $(CRT_OBJS) $(MINILIB_OBJS)
|
||||||
$(CC) $(CFLAGS) $< -o $@ $(LDFLAGS)
|
$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $< -o $@ $(LDFLAGS)
|
||||||
|
|
||||||
memory: CFLAGS+=-DCHECK_UNALIGNED=0
|
memory: CFLAGS+=-DCHECK_UNALIGNED=0
|
||||||
|
|
||||||
|
@ -1,8 +0,0 @@
|
|||||||
# Makefile.include for all ARM targets
|
|
||||||
#
|
|
||||||
# We don't have any bigendian build tools so we only use this for armhf
|
|
||||||
|
|
||||||
ifeq ($(TARGET_NAME),arm)
|
|
||||||
DOCKER_IMAGE=debian-armhf-cross
|
|
||||||
DOCKER_CROSS_COMPILER=arm-linux-gnueabihf-gcc
|
|
||||||
endif
|
|
@ -3,8 +3,6 @@
|
|||||||
# ARM SoftMMU tests - included from tests/tcg/Makefile
|
# ARM SoftMMU tests - included from tests/tcg/Makefile
|
||||||
#
|
#
|
||||||
|
|
||||||
ifeq ($(TARGET_ABI_DIR),arm)
|
|
||||||
|
|
||||||
ARM_SRC=$(SRC_PATH)/tests/tcg/arm
|
ARM_SRC=$(SRC_PATH)/tests/tcg/arm
|
||||||
|
|
||||||
# Set search path for all sources
|
# Set search path for all sources
|
||||||
@ -18,12 +16,10 @@ CFLAGS+=-Wl,--build-id=none -x assembler-with-cpp
|
|||||||
LDFLAGS+=-nostdlib -N -static
|
LDFLAGS+=-nostdlib -N -static
|
||||||
|
|
||||||
%: %.S %.ld
|
%: %.S %.ld
|
||||||
$(CC) $(CFLAGS) $(ASFLAGS) $< -o $@ $(LDFLAGS) -T $(ARM_SRC)/$@.ld
|
$(CC) $(CFLAGS) $(ASFLAGS) $(EXTRA_CFLAGS) $< -o $@ $(LDFLAGS) -T $(ARM_SRC)/$@.ld
|
||||||
|
|
||||||
# Specific Test Rules
|
# Specific Test Rules
|
||||||
|
|
||||||
test-armv6m-undef: EXTRA_CFLAGS+=-mcpu=cortex-m0
|
test-armv6m-undef: EXTRA_CFLAGS+=-mcpu=cortex-m0
|
||||||
|
|
||||||
run-test-armv6m-undef: QEMU_OPTS+=-semihosting -M microbit -kernel
|
run-test-armv6m-undef: QEMU_OPTS+=-semihosting -M microbit -kernel
|
||||||
|
|
||||||
endif
|
|
||||||
|
234
tests/tcg/configure.sh
Executable file
234
tests/tcg/configure.sh
Executable file
@ -0,0 +1,234 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
if test -z "$source_path"; then
|
||||||
|
echo Do not invoke this script directly. It is called
|
||||||
|
echo automatically by configure.
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
write_c_skeleton() {
|
||||||
|
cat > $TMPC <<EOF
|
||||||
|
int main(void) { return 0; }
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
|
||||||
|
has() {
|
||||||
|
command -v "$1" >/dev/null 2>&1
|
||||||
|
}
|
||||||
|
|
||||||
|
do_compiler() {
|
||||||
|
# Run the compiler, capturing its output to the log. First argument
|
||||||
|
# is compiler binary to execute.
|
||||||
|
local compiler="$1"
|
||||||
|
shift
|
||||||
|
if test -n "$BASH_VERSION"; then eval '
|
||||||
|
echo >>config.log "
|
||||||
|
funcs: ${FUNCNAME[*]}
|
||||||
|
lines: ${BASH_LINENO[*]}"
|
||||||
|
'; fi
|
||||||
|
echo $compiler "$@" >> config.log
|
||||||
|
$compiler "$@" >> config.log 2>&1 || return $?
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
TMPDIR1="config-temp"
|
||||||
|
TMPC="${TMPDIR1}/qemu-conf.c"
|
||||||
|
TMPE="${TMPDIR1}/qemu-conf.exe"
|
||||||
|
|
||||||
|
container="no"
|
||||||
|
if has "docker" || has "podman"; then
|
||||||
|
container=$($python $source_path/tests/docker/docker.py probe)
|
||||||
|
fi
|
||||||
|
|
||||||
|
# cross compilers defaults, can be overridden with --cross-cc-ARCH
|
||||||
|
: ${cross_cc_aarch64="aarch64-linux-gnu-gcc"}
|
||||||
|
: ${cross_cc_aarch64_be="$cross_cc_aarch64"}
|
||||||
|
: ${cross_cc_cflags_aarch64_be="-mbig-endian"}
|
||||||
|
: ${cross_cc_arm="arm-linux-gnueabihf-gcc"}
|
||||||
|
: ${cross_cc_cflags_armeb="-mbig-endian"}
|
||||||
|
: ${cross_cc_i386="i386-pc-linux-gnu-gcc"}
|
||||||
|
: ${cross_cc_cflags_i386="-m32"}
|
||||||
|
: ${cross_cc_x86_64="x86_64-pc-linux-gnu-gcc"}
|
||||||
|
: ${cross_cc_cflags_x86_64="-m64"}
|
||||||
|
: ${cross_cc_ppc="powerpc-linux-gnu-gcc"}
|
||||||
|
: ${cross_cc_cflags_ppc="-m32"}
|
||||||
|
: ${cross_cc_ppc64="powerpc-linux-gnu-gcc"}
|
||||||
|
: ${cross_cc_cflags_ppc64="-m64"}
|
||||||
|
: ${cross_cc_ppc64le="powerpc64le-linux-gnu-gcc"}
|
||||||
|
: ${cross_cc_cflags_s390x="-m64"}
|
||||||
|
: ${cross_cc_cflags_sparc="-m32 -mv8plus -mcpu=ultrasparc"}
|
||||||
|
: ${cross_cc_cflags_sparc64="-m64 -mcpu=ultrasparc"}
|
||||||
|
|
||||||
|
for target in $target_list; do
|
||||||
|
arch=${target%%-*}
|
||||||
|
case $arch in
|
||||||
|
arm|armeb)
|
||||||
|
arches=arm
|
||||||
|
;;
|
||||||
|
aarch64|aarch64_be)
|
||||||
|
arches="aarch64 arm"
|
||||||
|
;;
|
||||||
|
mips*)
|
||||||
|
arches=mips
|
||||||
|
;;
|
||||||
|
ppc*)
|
||||||
|
arches=ppc
|
||||||
|
;;
|
||||||
|
sh4|sh4eb)
|
||||||
|
arches=sh4
|
||||||
|
;;
|
||||||
|
x86_64)
|
||||||
|
arches="x86_64 i386"
|
||||||
|
;;
|
||||||
|
xtensa|xtensaeb)
|
||||||
|
arches=xtensa
|
||||||
|
;;
|
||||||
|
alpha|cris|hppa|i386|lm32|m68k|openrisc|riscv64|s390x|sh4|sparc64)
|
||||||
|
arches=$target
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
continue
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
container_image=
|
||||||
|
case $target in
|
||||||
|
aarch64-*)
|
||||||
|
# We don't have any bigendian build tools so we only use this for AArch64
|
||||||
|
container_image=debian-arm64-cross
|
||||||
|
container_cross_cc=aarch64-linux-gnu-gcc
|
||||||
|
;;
|
||||||
|
alpha-*)
|
||||||
|
container_image=debian-alpha-cross
|
||||||
|
container_cross_cc=alpha-linux-gnu-gcc
|
||||||
|
;;
|
||||||
|
arm-*)
|
||||||
|
# We don't have any bigendian build tools so we only use this for ARM
|
||||||
|
container_image=debian-armhf-cross
|
||||||
|
container_cross_cc=arm-linux-gnueabihf-gcc
|
||||||
|
;;
|
||||||
|
cris-*)
|
||||||
|
container_image=fedora-cris-cross
|
||||||
|
container_cross_cc=cris-linux-gnu-gcc
|
||||||
|
;;
|
||||||
|
hppa-*)
|
||||||
|
container_image=debian-hppa-cross
|
||||||
|
container_cross_cc=hppa-linux-gnu-gcc
|
||||||
|
;;
|
||||||
|
i386-*)
|
||||||
|
container_image=fedora-i386-cross
|
||||||
|
container_cross_cc=gcc
|
||||||
|
;;
|
||||||
|
m68k-*)
|
||||||
|
container_image=debian-m68k-cross
|
||||||
|
container_cross_cc=m68k-linux-gnu-gcc
|
||||||
|
;;
|
||||||
|
mips64el-*)
|
||||||
|
container_image=debian-mips64el-cross
|
||||||
|
container_cross_cc=mips64el-linux-gnuabi64-gcc
|
||||||
|
;;
|
||||||
|
mips64-*)
|
||||||
|
container_image=debian-mips64-cross
|
||||||
|
container_cross_cc=mips64-linux-gnuabi64-gcc
|
||||||
|
;;
|
||||||
|
mipsel-*)
|
||||||
|
container_image=debian-mipsel-cross
|
||||||
|
container_cross_cc=mipsel-linux-gnu-gcc
|
||||||
|
;;
|
||||||
|
mips-*)
|
||||||
|
container_image=debian-mips-cross
|
||||||
|
container_cross_cc=mips-linux-gnu-gcc
|
||||||
|
;;
|
||||||
|
ppc-*|ppc64abi32-*)
|
||||||
|
container_image=debian-powerpc-cross
|
||||||
|
container_cross_cc=powerpc-linux-gnu-gcc
|
||||||
|
;;
|
||||||
|
ppc64-*)
|
||||||
|
container_image=debian-ppc64-cross
|
||||||
|
container_cross_cc=powerpc64-linux-gnu-gcc
|
||||||
|
;;
|
||||||
|
ppc64le-*)
|
||||||
|
container_image=debian-ppc64el-cross
|
||||||
|
container_cross_cc=powerpc64le-linux-gnu-gcc
|
||||||
|
;;
|
||||||
|
riscv64-*)
|
||||||
|
container_image=debian-riscv64-cross
|
||||||
|
container_cross_cc=riscv64-linux-gnu-gcc
|
||||||
|
;;
|
||||||
|
s390x-*)
|
||||||
|
container_image=debian-s390x-cross
|
||||||
|
container_cross_cc=s390x-linux-gnu-gcc
|
||||||
|
;;
|
||||||
|
sh4-*)
|
||||||
|
container_image=debian-sh4-cross
|
||||||
|
container_cross_cc=sh4-linux-gnu-gcc
|
||||||
|
;;
|
||||||
|
sparc64-*)
|
||||||
|
container_image=debian-sparc64-cross
|
||||||
|
container_cross_cc=sparc64-linux-gnu-gcc
|
||||||
|
;;
|
||||||
|
xtensa*-softmmu)
|
||||||
|
container_image=debian-xtensa-cross
|
||||||
|
|
||||||
|
# default to the dc232b cpu
|
||||||
|
container_cross_cc=/opt/2018.02/xtensa-dc232b-elf/bin/xtensa-dc232b-elf-gcc
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
config_target_mak=tests/tcg/config-$target.mak
|
||||||
|
|
||||||
|
echo "# Automatically generated by configure - do not modify" > $config_target_mak
|
||||||
|
echo "TARGET_NAME=$arch" >> $config_target_mak
|
||||||
|
case $target in
|
||||||
|
*-linux-user | *-bsd-user)
|
||||||
|
echo "CONFIG_USER_ONLY=y" >> $config_target_mak
|
||||||
|
echo "QEMU=\$(BUILD_DIR)/$target/qemu-$arch" >> $config_target_mak
|
||||||
|
;;
|
||||||
|
*-softmmu)
|
||||||
|
echo "CONFIG_SOFTMMU=y" >> $config_target_mak
|
||||||
|
echo "QEMU=\$(BUILD_DIR)/$target/qemu-system-$arch" >> $config_target_mak
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
eval "target_compiler_cflags=\${cross_cc_cflags_$arch}"
|
||||||
|
echo "CROSS_CC_GUEST_CFLAGS=$target_compiler_cflags" >> $config_target_mak
|
||||||
|
|
||||||
|
got_cross_cc=no
|
||||||
|
for i in $arch $arches; do
|
||||||
|
if eval test "x\${cross_cc_$i+yes}" != xyes; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
|
eval "target_compiler=\${cross_cc_$i}"
|
||||||
|
if ! has $target_compiler; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
write_c_skeleton
|
||||||
|
if ! do_compiler "$target_compiler" $target_compiler_cflags -o $TMPE $TMPC -static ; then
|
||||||
|
# For host systems we might get away with building without -static
|
||||||
|
if ! do_compiler "$target_compiler" $target_compiler_cflags -o $TMPE $TMPC ; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
echo "CROSS_CC_GUEST_STATIC=y" >> $config_target_mak
|
||||||
|
else
|
||||||
|
echo "CROSS_CC_GUEST_STATIC=y" >> $config_target_mak
|
||||||
|
fi
|
||||||
|
echo "CROSS_CC_GUEST=$target_compiler" >> $config_target_mak
|
||||||
|
enabled_cross_compilers="$enabled_cross_compilers $target_compiler"
|
||||||
|
got_cross_cc=yes
|
||||||
|
break
|
||||||
|
done
|
||||||
|
|
||||||
|
if test $got_cross_cc = no && test "$container" != no && test -n "$container_image"; then
|
||||||
|
echo "DOCKER_IMAGE=$container_image" >> $config_target_mak
|
||||||
|
echo "DOCKER_CROSS_CC_GUEST=$container_cross_cc" >> $config_target_mak
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# report container support state
|
||||||
|
echo "cross containers $container"
|
||||||
|
|
||||||
|
if test -n "$enabled_cross_compilers"; then
|
||||||
|
echo
|
||||||
|
echo "NOTE: guest cross-compilers enabled:$enabled_cross_compilers"
|
||||||
|
fi
|
@ -1,6 +0,0 @@
|
|||||||
#
|
|
||||||
# Makefile.include for all CRIS targets
|
|
||||||
#
|
|
||||||
|
|
||||||
DOCKER_IMAGE=fedora-cris-cross
|
|
||||||
DOCKER_CROSS_COMPILER=cris-linux-gnu-gcc
|
|
@ -1,2 +0,0 @@
|
|||||||
DOCKER_IMAGE=debian-hppa-cross
|
|
||||||
DOCKER_CROSS_COMPILER=hppa-linux-gnu-gcc
|
|
@ -1,9 +0,0 @@
|
|||||||
#
|
|
||||||
# Makefile.include for all i386
|
|
||||||
#
|
|
||||||
# There is enough brokeness in x86_64 compilers that we don't default
|
|
||||||
# to using the x86_64 system compiler for i386 binaries.
|
|
||||||
#
|
|
||||||
|
|
||||||
DOCKER_IMAGE=fedora-i386-cross
|
|
||||||
DOCKER_CROSS_COMPILER=gcc
|
|
@ -12,17 +12,9 @@ X64_SYSTEM_SRC=$(SRC_PATH)/tests/tcg/x86_64/system
|
|||||||
# These objects provide the basic boot code and helper functions for all tests
|
# These objects provide the basic boot code and helper functions for all tests
|
||||||
CRT_OBJS=boot.o
|
CRT_OBJS=boot.o
|
||||||
|
|
||||||
ifeq ($(TARGET_X86_64), y)
|
|
||||||
CRT_PATH=$(X64_SYSTEM_SRC)
|
|
||||||
CFLAGS=-march=x86-64
|
|
||||||
LINK_SCRIPT=$(X64_SYSTEM_SRC)/kernel.ld
|
|
||||||
LDFLAGS=-Wl,-T$(LINK_SCRIPT) -Wl,-melf_x86_64
|
|
||||||
else
|
|
||||||
CRT_PATH=$(I386_SYSTEM_SRC)
|
CRT_PATH=$(I386_SYSTEM_SRC)
|
||||||
CFLAGS+=-m32
|
|
||||||
LINK_SCRIPT=$(I386_SYSTEM_SRC)/kernel.ld
|
LINK_SCRIPT=$(I386_SYSTEM_SRC)/kernel.ld
|
||||||
LDFLAGS=-Wl,-T$(LINK_SCRIPT) -Wl,-melf_i386
|
LDFLAGS=-Wl,-T$(LINK_SCRIPT) -Wl,-melf_i386
|
||||||
endif
|
|
||||||
CFLAGS+=-nostdlib -ggdb -O0 $(MINILIB_INC)
|
CFLAGS+=-nostdlib -ggdb -O0 $(MINILIB_INC)
|
||||||
LDFLAGS+=-static -nostdlib $(CRT_OBJS) $(MINILIB_OBJS) -lgcc
|
LDFLAGS+=-static -nostdlib $(CRT_OBJS) $(MINILIB_OBJS) -lgcc
|
||||||
|
|
||||||
@ -32,11 +24,11 @@ TESTS+=$(MULTIARCH_TESTS)
|
|||||||
.PRECIOUS: $(CRT_OBJS)
|
.PRECIOUS: $(CRT_OBJS)
|
||||||
|
|
||||||
%.o: $(CRT_PATH)/%.S
|
%.o: $(CRT_PATH)/%.S
|
||||||
$(CC) $(CFLAGS) -c $< -o $@
|
$(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c $< -o $@
|
||||||
|
|
||||||
# Build and link the tests
|
# Build and link the tests
|
||||||
%: %.c $(LINK_SCRIPT) $(CRT_OBJS) $(MINILIB_OBJS)
|
%: %.c $(LINK_SCRIPT) $(CRT_OBJS) $(MINILIB_OBJS)
|
||||||
$(CC) $(CFLAGS) $< -o $@ $(LDFLAGS)
|
$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $< -o $@ $(LDFLAGS)
|
||||||
|
|
||||||
memory: CFLAGS+=-DCHECK_UNALIGNED=1
|
memory: CFLAGS+=-DCHECK_UNALIGNED=1
|
||||||
|
|
||||||
|
@ -6,14 +6,11 @@ I386_SRC=$(SRC_PATH)/tests/tcg/i386
|
|||||||
VPATH += $(I386_SRC)
|
VPATH += $(I386_SRC)
|
||||||
|
|
||||||
I386_SRCS=$(notdir $(wildcard $(I386_SRC)/*.c))
|
I386_SRCS=$(notdir $(wildcard $(I386_SRC)/*.c))
|
||||||
I386_TESTS=$(I386_SRCS:.c=)
|
ALL_X86_TESTS=$(I386_SRCS:.c=)
|
||||||
I386_ONLY_TESTS=$(filter-out test-i386-ssse3, $(I386_TESTS))
|
I386_TESTS:=$(filter-out test-i386-ssse3, $(ALL_X86_TESTS))
|
||||||
|
X86_64_TESTS:=$(filter test-i386-ssse3, $(ALL_X86_TESTS))
|
||||||
# Update TESTS
|
# Update TESTS
|
||||||
TESTS+=$(I386_ONLY_TESTS)
|
TESTS=$(MULTIARCH_TESTS) $(I386_TESTS)
|
||||||
|
|
||||||
ifneq ($(TARGET_NAME),x86_64)
|
|
||||||
CFLAGS+=-m32
|
|
||||||
endif
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# hello-i386 is a barebones app
|
# hello-i386 is a barebones app
|
||||||
@ -26,7 +23,7 @@ hello-i386: LDFLAGS+=-nostdlib
|
|||||||
#
|
#
|
||||||
|
|
||||||
test-i386: test-i386.c test-i386-code16.S test-i386-vm86.S test-i386.h test-i386-shift.h test-i386-muldiv.h
|
test-i386: test-i386.c test-i386-code16.S test-i386-vm86.S test-i386.h test-i386-shift.h test-i386-muldiv.h
|
||||||
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ \
|
$(CC) $(CFLAGS) $(LDFLAGS) $(EXTRA_CFLAGS) -o $@ \
|
||||||
$(<D)/test-i386.c $(<D)/test-i386-code16.S $(<D)/test-i386-vm86.S -lm
|
$(<D)/test-i386.c $(<D)/test-i386-code16.S $(<D)/test-i386-vm86.S -lm
|
||||||
|
|
||||||
ifeq ($(SPEED), slow)
|
ifeq ($(SPEED), slow)
|
||||||
|
@ -1,2 +0,0 @@
|
|||||||
DOCKER_IMAGE=debian-m68k-cross
|
|
||||||
DOCKER_CROSS_COMPILER=m68k-linux-gnu-gcc
|
|
@ -18,4 +18,4 @@ MINILIB_INC=-isystem $(SYSTEM_MINILIB_SRC)
|
|||||||
.PRECIOUS: $(MINILIB_OBJS)
|
.PRECIOUS: $(MINILIB_OBJS)
|
||||||
|
|
||||||
%.o: $(SYSTEM_MINILIB_SRC)/%.c
|
%.o: $(SYSTEM_MINILIB_SRC)/%.c
|
||||||
$(CC) $(CFLAGS) -c $< -o $@
|
$(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c $< -o $@
|
||||||
|
@ -1,20 +0,0 @@
|
|||||||
#
|
|
||||||
# Makefile.include for all MIPs targets
|
|
||||||
#
|
|
||||||
# As Debian doesn't support mip64 in big endian mode the only way to
|
|
||||||
# build BE is to pass a working cross compiler to ./configure
|
|
||||||
#
|
|
||||||
|
|
||||||
ifeq ($(TARGET_NAME),mips64el)
|
|
||||||
DOCKER_IMAGE=debian-mips64el-cross
|
|
||||||
DOCKER_CROSS_COMPILER=mips64el-linux-gnuabi64-gcc
|
|
||||||
else ifeq ($(TARGET_NAME),mips64)
|
|
||||||
DOCKER_IMAGE=debian-mips64-cross
|
|
||||||
DOCKER_CROSS_COMPILER=mips64-linux-gnuabi64-gcc
|
|
||||||
else ifeq ($(TARGET_NAME),mipsel)
|
|
||||||
DOCKER_IMAGE=debian-mipsel-cross
|
|
||||||
DOCKER_CROSS_COMPILER=mipsel-linux-gnu-gcc
|
|
||||||
else ifeq ($(TARGET_NAME),mips)
|
|
||||||
DOCKER_IMAGE=debian-mips-cross
|
|
||||||
DOCKER_CROSS_COMPILER=mips-linux-gnu-gcc
|
|
||||||
endif
|
|
@ -12,8 +12,13 @@ VPATH += $(MULTIARCH_SRC)
|
|||||||
MULTIARCH_SRCS =$(notdir $(wildcard $(MULTIARCH_SRC)/*.c))
|
MULTIARCH_SRCS =$(notdir $(wildcard $(MULTIARCH_SRC)/*.c))
|
||||||
MULTIARCH_TESTS =$(MULTIARCH_SRCS:.c=)
|
MULTIARCH_TESTS =$(MULTIARCH_SRCS:.c=)
|
||||||
|
|
||||||
|
# FIXME: ppc64abi32 linux-test seems to have issues but the other basic tests work
|
||||||
|
ifeq ($(TARGET_NAME),ppc64abi32)
|
||||||
|
BROKEN_TESTS = linux-test
|
||||||
|
endif
|
||||||
|
|
||||||
# Update TESTS
|
# Update TESTS
|
||||||
TESTS +=$(MULTIARCH_TESTS)
|
TESTS += $(filter-out $(BROKEN_TESTS), $(MULTIARCH_TESTS))
|
||||||
|
|
||||||
#
|
#
|
||||||
# The following are any additional rules needed to build things
|
# The following are any additional rules needed to build things
|
||||||
|
@ -1,10 +0,0 @@
|
|||||||
ifeq ($(TARGET_NAME),ppc)
|
|
||||||
DOCKER_IMAGE=debian-powerpc-cross
|
|
||||||
DOCKER_CROSS_COMPILER=powerpc-linux-gnu-gcc
|
|
||||||
else ifeq ($(TARGET_NAME),ppc64)
|
|
||||||
DOCKER_IMAGE=debian-ppc64-cross
|
|
||||||
DOCKER_CROSS_COMPILER=powerpc64-linux-gnu-gcc
|
|
||||||
else ifeq ($(TARGET_NAME),ppc64le)
|
|
||||||
DOCKER_IMAGE=debian-ppc64el-cross
|
|
||||||
DOCKER_CROSS_COMPILER=powerpc64le-linux-gnu-gcc
|
|
||||||
endif
|
|
@ -1,10 +0,0 @@
|
|||||||
#
|
|
||||||
# Makefile.include for all RISCV targets
|
|
||||||
#
|
|
||||||
# Debian only really cares about 64 bit going forward
|
|
||||||
#
|
|
||||||
|
|
||||||
ifeq ($(TARGET_NAME),riscv64)
|
|
||||||
DOCKER_IMAGE=debian-riscv64-cross
|
|
||||||
DOCKER_CROSS_COMPILER=riscv64-linux-gnu-gcc
|
|
||||||
endif
|
|
@ -1,2 +0,0 @@
|
|||||||
DOCKER_IMAGE=debian-s390x-cross
|
|
||||||
DOCKER_CROSS_COMPILER=s390x-linux-gnu-gcc
|
|
@ -1,4 +0,0 @@
|
|||||||
ifneq ($(TARGET_NAME), sh4eb)
|
|
||||||
DOCKER_IMAGE=debian-sh4-cross
|
|
||||||
DOCKER_CROSS_COMPILER=sh4-linux-gnu-gcc
|
|
||||||
endif
|
|
@ -1,2 +0,0 @@
|
|||||||
DOCKER_IMAGE=debian-sparc64-cross
|
|
||||||
DOCKER_CROSS_COMPILER=sparc64-linux-gnu-gcc
|
|
36
tests/tcg/x86_64/Makefile.softmmu-target
Normal file
36
tests/tcg/x86_64/Makefile.softmmu-target
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
#
|
||||||
|
# x86 system tests
|
||||||
|
#
|
||||||
|
# This currently builds only for i386. The common C code is built
|
||||||
|
# with standard compiler flags however so we can support both by
|
||||||
|
# adding additional boot files for x86_64.
|
||||||
|
#
|
||||||
|
|
||||||
|
I386_SYSTEM_SRC=$(SRC_PATH)/tests/tcg/i386/system
|
||||||
|
X64_SYSTEM_SRC=$(SRC_PATH)/tests/tcg/x86_64/system
|
||||||
|
|
||||||
|
# These objects provide the basic boot code and helper functions for all tests
|
||||||
|
CRT_OBJS=boot.o
|
||||||
|
|
||||||
|
CRT_PATH=$(X64_SYSTEM_SRC)
|
||||||
|
LINK_SCRIPT=$(X64_SYSTEM_SRC)/kernel.ld
|
||||||
|
LDFLAGS=-Wl,-T$(LINK_SCRIPT) -Wl,-melf_x86_64
|
||||||
|
CFLAGS+=-nostdlib -ggdb -O0 $(MINILIB_INC)
|
||||||
|
LDFLAGS+=-static -nostdlib $(CRT_OBJS) $(MINILIB_OBJS) -lgcc
|
||||||
|
|
||||||
|
TESTS+=$(MULTIARCH_TESTS)
|
||||||
|
|
||||||
|
# building head blobs
|
||||||
|
.PRECIOUS: $(CRT_OBJS)
|
||||||
|
|
||||||
|
%.o: $(CRT_PATH)/%.S
|
||||||
|
$(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c $< -o $@
|
||||||
|
|
||||||
|
# Build and link the tests
|
||||||
|
%: %.c $(LINK_SCRIPT) $(CRT_OBJS) $(MINILIB_OBJS)
|
||||||
|
$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $< -o $@ $(LDFLAGS)
|
||||||
|
|
||||||
|
memory: CFLAGS+=-DCHECK_UNALIGNED=1
|
||||||
|
|
||||||
|
# Running
|
||||||
|
QEMU_OPTS+=-device isa-debugcon,chardev=output -device isa-debug-exit,iobase=0xf4,iosize=0x4 -kernel
|
@ -6,9 +6,10 @@
|
|||||||
# $(SRC)/tests/tcg/i386/
|
# $(SRC)/tests/tcg/i386/
|
||||||
#
|
#
|
||||||
|
|
||||||
X86_64_TESTS=$(filter-out $(I386_ONLY_TESTS), $(TESTS))
|
include $(SRC_PATH)/tests/tcg/i386/Makefile.target
|
||||||
X86_64_TESTS+=test-x86_64
|
|
||||||
TESTS:=$(X86_64_TESTS)
|
TESTS=$(MULTIARCH_TESTS) $(X86_64_TESTS) test-x86_64
|
||||||
|
QEMU_OPTS += -cpu max
|
||||||
|
|
||||||
test-x86_64: LDFLAGS+=-lm -lc
|
test-x86_64: LDFLAGS+=-lm -lc
|
||||||
test-x86_64: test-i386.c test-i386.h test-i386-shift.h test-i386-muldiv.h
|
test-x86_64: test-i386.c test-i386.h test-i386-shift.h test-i386-muldiv.h
|
||||||
|
@ -1,11 +0,0 @@
|
|||||||
# Makefile.include for xtensa targets
|
|
||||||
#
|
|
||||||
# The compilers can only be used for building system tests
|
|
||||||
|
|
||||||
ifeq ($(CONFIG_SOFTMMU),y)
|
|
||||||
DOCKER_IMAGE=debian-xtensa-cross
|
|
||||||
|
|
||||||
# default to the dc232b cpu
|
|
||||||
DOCKER_CROSS_COMPILER=/opt/2018.02/xtensa-dc232b-elf/bin/xtensa-dc232b-elf-gcc
|
|
||||||
DOCKER_CROSS_LINKER=/opt/2018.02/xtensa-dc232b-elf/bin/xtensa-dc232b-elf-ld
|
|
||||||
endif
|
|
@ -34,9 +34,9 @@ $(XTENSA_USABLE_TESTS): linker.ld macros.inc $(CRT) Makefile.softmmu-target
|
|||||||
|
|
||||||
# special rule for common blobs
|
# special rule for common blobs
|
||||||
%.o: %.S
|
%.o: %.S
|
||||||
$(CC) $(XTENSA_INC) $($*_ASFLAGS) $(ASFLAGS) -c $< -o $@
|
$(CC) $(XTENSA_INC) $($*_ASFLAGS) $(ASFLAGS) $(EXTRA_CFLAGS) -c $< -o $@
|
||||||
|
|
||||||
%: %.S
|
%: %.S
|
||||||
$(CC) $(XTENSA_INC) $(ASFLAGS) $< -o $@ $(LDFLAGS) $(NOSTDFLAGS) $(CRT)
|
$(CC) $(XTENSA_INC) $(ASFLAGS) $(EXTRA_CFLAGS) $< -o $@ $(LDFLAGS) $(NOSTDFLAGS) $(CRT)
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
@ -23,7 +23,7 @@ class FedoraVM(basevm.BaseVM):
|
|||||||
name = "fedora"
|
name = "fedora"
|
||||||
arch = "x86_64"
|
arch = "x86_64"
|
||||||
|
|
||||||
base = "http://dl.fedoraproject.org/pub/fedora/linux/releases/30/"
|
base = "https://archives.fedoraproject.org/pub/archive/fedora/linux/releases/30/"
|
||||||
link = base + "Server/x86_64/iso/Fedora-Server-netinst-x86_64-30-1.2.iso"
|
link = base + "Server/x86_64/iso/Fedora-Server-netinst-x86_64-30-1.2.iso"
|
||||||
repo = base + "Server/x86_64/os/"
|
repo = base + "Server/x86_64/os/"
|
||||||
full = base + "Everything/x86_64/os/"
|
full = base + "Everything/x86_64/os/"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user