* [PATCH v2 00/10] meson: replace submodules with wrap files
@ 2023-06-05 9:52 Paolo Bonzini
2023-06-05 9:52 ` [PATCH 01/10] configure: remove --with-git= option Paolo Bonzini
` (10 more replies)
0 siblings, 11 replies; 32+ messages in thread
From: Paolo Bonzini @ 2023-06-05 9:52 UTC (permalink / raw)
To: qemu-devel; +Cc: thuth, berrange
This series replaces git submodules for bundled libraries with .wrap
files that can be used directly by meson for subprojects. These have
several advantages, either immediate or potential:
* option parsing and downloading is delegated to meson
* the commit is stored in a text file instead of a magic entry in the
git tree object, and can be a branch name or a version number as well
* now that QEMU's configure script knows how to install missing Python
dependencies, we could stop shipping external dependencies that are
only used as a fallback, and download them on demand if the build
platform lacks them. For example dtc could be downloaded at build
time, controlled by --enable-download, even when building from
a tarball. This is _not_ done in this patch series, but Marc-André
has tried it before[1].
* we could also add .wrap files for other dependencies that are missing
on the GCC compile farm machines, or for people who build on Windows
and might enjoy getting the mandatory dependencies (pixman, zlib,
glib, possibly SDL?) via wraps. In theory meson already supports
"meson wrap update-db" to automatically use wraps for anything required
but missing, but one would need to test that it actually works; see
for example https://github.com/mesonbuild/meson/issues/11821.
dtc and keycodemapdb both support meson, and previously reviewed
patches already run their build system via subproject(), so the
wraps are automatically taken into account. Two other submodules,
berkeley-softfloat-3 and berkeley-testfloat-3, are used to test QEMU and
can be changed to use wraps; however this requires a few more changes
to extract the corresponding parts of tests/fp/meson.build. It's mostly
code movement rather than new code.
The remaining submodules consist of tests/lcitool/libvirt-ci and the
firmware in roms/. The former is only used in very specific cases,
while the latter is mostly used only as a pointer used to create the QEMU
tarball. Unfortunately, git-submodule.sh is still needed for roms/SLOF,
parts of which are used in the QEMU build process for pc-bios/s390-ccw.
For now, the git-submodule.sh rules are moved from the main Makefile to
pc-bios/s390-ccw/ and, to limit the number of configure options,
--with-git-submodules is merged with --enable-download.
Patch 1 removes the --with-git= option for consistency, since git cannot
be overridden for "meson subprojects download". There is still a GIT
environment variable, which I could look at supporting in meson as well.
Patch 2 renames the recently introduced --enable-pypi command line
option to --enable-download, and makes it control meson's -Dwrapmode
option as well.
Patches 3-4 are small improvements to git-submodule.sh, which make
sense when the submodule updates are split across multiple Makefiles.
At the end of the series actually the updates move entirely to
pc-bios/s390-ccw/Makefile, but these improvements are useful anyway in
my opinion.
Patch 5 replaces submodule update with meson's subproject download for
existing subprojects (including libfdt and keycodemapdb).
Patches 6-7 move roms/SLOF handling to pc-bios/s390-ccw. While in
the future it is possible that SLOF's networking code will be copied
to the s390 ROMs, for now I am going for a smaller change.
Patch 8 converts berkeley-{soft,test}float-3 to subprojects too,
contextually moving their build rules out of tests/fp/meson.build.
Patches 9-10 are residual cleanups.
Paolo
[1] https://patchew.org/QEMU/20230302131848.1527460-1-marcandre.lureau@redhat.com/20230302131848.1527460-5-marcandre.lureau@redhat.com/
Paolo Bonzini (10):
configure: remove --with-git= option
configure: rename --enable-pypi to --enable-download, control
subprojects too
git-submodule: allow partial update of .git-submodule-status
build: log submodule update from git-submodule.sh
meson: subprojects: replace submodules with wrap files
configure: move SLOF submodule handling to pc-bios/s390-ccw
pc-bios/s390-ccw: always build network bootloader
meson: subprojects: replace berkeley-{soft,test}float-3 with wraps
build: remove git submodule handling from main makefile
configure: remove --with-git-submodules=
.gitignore | 2 -
.gitlab-ci.d/buildtest-template.yml | 4 +-
.gitmodules | 15 -
Makefile | 12 -
configure | 169 ++----
meson.build | 17 +-
pc-bios/s390-ccw/Makefile | 16 +-
scripts/archive-source.sh | 27 +-
.../ci/org.centos/stream/8/x86_64/configure | 3 -
scripts/git-submodule.sh | 69 ++-
scripts/make-release | 5 +
subprojects/.gitignore | 8 +
subprojects/berkeley-softfloat-3.wrap | 5 +
subprojects/berkeley-testfloat-3.wrap | 5 +
subprojects/dtc | 1 -
subprojects/dtc.wrap | 4 +
subprojects/keycodemapdb | 1 -
subprojects/keycodemapdb.wrap | 4 +
subprojects/libvfio-user | 1 -
subprojects/libvfio-user.wrap | 4 +
.../berkeley-softfloat-3/meson.build | 339 +++++++++++
.../berkeley-softfloat-3/meson_options.txt | 1 +
.../berkeley-testfloat-3/meson.build | 220 +++++++
.../berkeley-testfloat-3/meson_options.txt | 1 +
tests/fp/meson.build | 541 +-----------------
25 files changed, 716 insertions(+), 758 deletions(-)
create mode 100644 subprojects/.gitignore
create mode 100644 subprojects/berkeley-softfloat-3.wrap
create mode 100644 subprojects/berkeley-testfloat-3.wrap
delete mode 160000 subprojects/dtc
create mode 100644 subprojects/dtc.wrap
delete mode 160000 subprojects/keycodemapdb
create mode 100644 subprojects/keycodemapdb.wrap
delete mode 160000 subprojects/libvfio-user
create mode 100644 subprojects/libvfio-user.wrap
create mode 100644 subprojects/packagefiles/berkeley-softfloat-3/meson.build
create mode 100644 subprojects/packagefiles/berkeley-softfloat-3/meson_options.txt
create mode 100644 subprojects/packagefiles/berkeley-testfloat-3/meson.build
create mode 100644 subprojects/packagefiles/berkeley-testfloat-3/meson_options.txt
--
2.40.1
^ permalink raw reply [flat|nested] 32+ messages in thread
* [PATCH 01/10] configure: remove --with-git= option
2023-06-05 9:52 [PATCH v2 00/10] meson: replace submodules with wrap files Paolo Bonzini
@ 2023-06-05 9:52 ` Paolo Bonzini
2023-06-05 10:27 ` Alex Bennée
2023-06-05 11:17 ` Thomas Huth
2023-06-05 9:52 ` [PATCH 02/10] configure: rename --enable-pypi to --enable-download, control subprojects too Paolo Bonzini
` (9 subsequent siblings)
10 siblings, 2 replies; 32+ messages in thread
From: Paolo Bonzini @ 2023-06-05 9:52 UTC (permalink / raw)
To: qemu-devel; +Cc: thuth, berrange
The scenario for which --with-git= was introduced was to use a SOCKS proxy
such as tsocks. However, this was back in 2017 when QEMU's submodules
used the git:// protocol, and it is not as important when using the
"smart HTTP" backend; for example, neither "meson subprojects download"
nor scripts/checkpatch.pl do not obey the GIT environment variable.
So remove the knob, but test for the presence of git in the configure and
git-submodule.sh scripts, and suggest using --with-git-submodules=validate
+ a manual invocation of git-submodule.sh when git does not work. Hopefully
in the future the GIT environment variable will be supported by Meson.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
Makefile | 2 +-
configure | 8 ++------
meson.build | 1 -
.../ci/org.centos/stream/8/x86_64/configure | 2 --
scripts/git-submodule.sh | 19 ++++++++++---------
5 files changed, 13 insertions(+), 19 deletions(-)
diff --git a/Makefile b/Makefile
index 08fb6a3b058..8005f1cc53e 100644
--- a/Makefile
+++ b/Makefile
@@ -53,7 +53,7 @@ Makefile: .git-submodule-status
git-submodule-update:
ifneq ($(GIT_SUBMODULES_ACTION),ignore)
$(call quiet-command, \
- (GIT="$(GIT)" "$(SRC_PATH)/scripts/git-submodule.sh" $(GIT_SUBMODULES_ACTION) $(GIT_SUBMODULES)), \
+ (GIT=git "$(SRC_PATH)/scripts/git-submodule.sh" $(GIT_SUBMODULES_ACTION) $(GIT_SUBMODULES)), \
"GIT","$(GIT_SUBMODULES)")
endif
diff --git a/configure b/configure
index d674a966731..92bacc756c0 100755
--- a/configure
+++ b/configure
@@ -751,8 +751,6 @@ for opt do
;;
--enable-fdt=*) fdt="$optarg"
;;
- --with-git=*) git="$optarg"
- ;;
--with-git-submodules=*)
git_submodules_action="$optarg"
;;
@@ -791,7 +789,7 @@ fi
case $git_submodules_action in
update|validate)
- if test ! -e "$source_path/.git"; then
+ if test ! -e "$source_path/.git" || ! has git; then
echo "ERROR: cannot $git_submodules_action git submodules without .git"
exit 1
fi
@@ -892,7 +890,6 @@ Advanced options (experts only):
--python=PYTHON use specified python [$python]
--ninja=NINJA use specified ninja [$ninja]
--smbd=SMBD use specified smbd [$smbd]
- --with-git=GIT use specified git [$git]
--with-git-submodules=update update git submodules (default if .git dir exists)
--with-git-submodules=validate fail if git submodules are not up to date
--with-git-submodules=ignore do not update or check git submodules (default if no .git dir)
@@ -1699,7 +1696,7 @@ fi
#######################################
# generate config-host.mak
-if ! (GIT="$git" "$source_path/scripts/git-submodule.sh" "$git_submodules_action" "$git_submodules"); then
+if ! (GIT=git "$source_path/scripts/git-submodule.sh" "$git_submodules_action" "$git_submodules"); then
exit 1
fi
@@ -1709,7 +1706,6 @@ echo "# Automatically generated by configure - do not modify" > $config_host_mak
echo >> $config_host_mak
echo all: >> $config_host_mak
-echo "GIT=$git" >> $config_host_mak
echo "GIT_SUBMODULES=$git_submodules" >> $config_host_mak
echo "GIT_SUBMODULES_ACTION=$git_submodules_action" >> $config_host_mak
diff --git a/meson.build b/meson.build
index cabf36ec5e9..eb09af6ec82 100644
--- a/meson.build
+++ b/meson.build
@@ -4026,7 +4026,6 @@ summary(summary_info, bool_yn: true, section: 'Directories')
# Host binaries
summary_info = {}
-summary_info += {'git': config_host['GIT']}
summary_info += {'python': '@0@ (version: @1@)'.format(python.full_path(), python.language_version())}
summary_info += {'sphinx-build': sphinx_build}
if config_host.has_key('HAVE_GDB_BIN')
diff --git a/scripts/ci/org.centos/stream/8/x86_64/configure b/scripts/ci/org.centos/stream/8/x86_64/configure
index 6e8983f39cd..de76510978f 100755
--- a/scripts/ci/org.centos/stream/8/x86_64/configure
+++ b/scripts/ci/org.centos/stream/8/x86_64/configure
@@ -29,14 +29,12 @@
--extra-cflags="-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection" \
--with-suffix="qemu-kvm" \
--firmwarepath=/usr/share/qemu-firmware \
---with-git=meson \
--with-git-submodules=update \
--target-list="x86_64-softmmu" \
--block-drv-rw-whitelist="qcow2,raw,file,host_device,nbd,iscsi,rbd,blkdebug,luks,null-co,nvme,copy-on-read,throttle,gluster" \
--audio-drv-list="" \
--block-drv-ro-whitelist="vmdk,vhdx,vpc,https,ssh" \
--with-coroutine=ucontext \
---with-git=git \
--tls-priority=@QEMU,SYSTEM \
--disable-attr \
--disable-auth-pam \
diff --git a/scripts/git-submodule.sh b/scripts/git-submodule.sh
index 7be41f59483..0ce1efc44e5 100755
--- a/scripts/git-submodule.sh
+++ b/scripts/git-submodule.sh
@@ -12,7 +12,7 @@ maybe_modules="$@"
# if --with-git-submodules=ignore, do nothing
test "$command" = "ignore" && exit 0
-test -z "$GIT" && GIT=git
+test -z "$GIT" && GIT=$(command -v git)
cd "$(dirname "$0")/.."
@@ -21,19 +21,14 @@ update_error() {
echo
echo "Unable to automatically checkout GIT submodules '$modules'."
echo "If you require use of an alternative GIT binary (for example to"
- echo "enable use of a transparent proxy), then please specify it by"
- echo "running configure by with the '--with-git' argument. e.g."
- echo
- echo " $ ./configure --with-git='tsocks git'"
- echo
- echo "Alternatively you may disable automatic GIT submodule checkout"
- echo "with:"
+ echo "enable use of a transparent proxy), please disable automatic"
+ echo "GIT submodule checkout with:"
echo
echo " $ ./configure --with-git-submodules=validate"
echo
echo "and then manually update submodules prior to running make, with:"
echo
- echo " $ scripts/git-submodule.sh update $modules"
+ echo " $ GIT='tsocks git' scripts/git-submodule.sh update $modules"
echo
exit 1
}
@@ -57,6 +52,12 @@ then
exit 1
fi
+if test -n "$maybe_modules" && test -z "$GIT"
+then
+ echo "$0: unexpectedly called with submodules but git binary not found"
+ exit 1
+fi
+
modules=""
for m in $maybe_modules
do
--
2.40.1
^ permalink raw reply related [flat|nested] 32+ messages in thread
* [PATCH 02/10] configure: rename --enable-pypi to --enable-download, control subprojects too
2023-06-05 9:52 [PATCH v2 00/10] meson: replace submodules with wrap files Paolo Bonzini
2023-06-05 9:52 ` [PATCH 01/10] configure: remove --with-git= option Paolo Bonzini
@ 2023-06-05 9:52 ` Paolo Bonzini
2023-06-05 10:28 ` Alex Bennée
2023-06-05 9:52 ` [PATCH 03/10] git-submodule: allow partial update of .git-submodule-status Paolo Bonzini
` (8 subsequent siblings)
10 siblings, 1 reply; 32+ messages in thread
From: Paolo Bonzini @ 2023-06-05 9:52 UTC (permalink / raw)
To: qemu-devel; +Cc: thuth, berrange
The behavior of --{enable,disable}-pypi is similar to that of
-Dwrapmode={default,nodownload} respectively. In particular,
in both cases a feature needs to be explicitly enabled for the
dependency to be downloaded.
So, use a single option to control both cases. Now, --enable-slirp
will trigger cloning and building of libslirp if the .pc file
is not found on the machine.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
.gitignore | 2 --
configure | 17 +++++++----------
subprojects/.gitignore | 3 +++
3 files changed, 10 insertions(+), 12 deletions(-)
create mode 100644 subprojects/.gitignore
diff --git a/.gitignore b/.gitignore
index 1ea59f48192..61fa39967b5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -20,5 +20,3 @@ GTAGS
*.swp
*.patch
*.gcov
-
-/subprojects/slirp
diff --git a/configure b/configure
index 92bacc756c0..52274212310 100755
--- a/configure
+++ b/configure
@@ -266,7 +266,7 @@ bsd_user=""
plugins="$default_feature"
ninja=""
python=
-pypi="enabled"
+download="enabled"
bindir="bin"
skip_meson=no
vfio_user_server="disabled"
@@ -754,9 +754,9 @@ for opt do
--with-git-submodules=*)
git_submodules_action="$optarg"
;;
- --disable-pypi) pypi="disabled"
+ --disable-download) download="disabled"
;;
- --enable-pypi) pypi="enabled"
+ --enable-download) download="enabled"
;;
--enable-plugins) if test "$mingw32" = "yes"; then
error_exit "TCG plugins not currently supported on Windows platforms"
@@ -960,7 +960,7 @@ python="$(command -v "$python")"
# - venv is allowed to use system packages;
# - all setup can be performed offline;
# - missing packages may be fetched from PyPI,
-# unless --disable-pypi is passed.
+# unless --disable-download is passed.
# - pip is not installed into the venv when possible,
# but ensurepip is called as a fallback when necessary.
@@ -977,7 +977,7 @@ python="$python -B"
mkvenv="$python ${source_path}/python/scripts/mkvenv.py"
mkvenv_flags=""
-if test "$pypi" = "enabled" ; then
+if test "$download" = "enabled" ; then
mkvenv_flags="--online"
fi
@@ -1000,7 +1000,7 @@ meson="$(cd pyvenv/bin; pwd)/meson"
# Conditionally ensure Sphinx is installed.
mkvenv_flags=""
-if test "$pypi" = "enabled" -a "$docs" = "enabled" ; then
+if test "$download" = "enabled" -a "$docs" = "enabled" ; then
mkvenv_flags="--online"
fi
@@ -1940,11 +1940,8 @@ if test "$skip_meson" = no; then
rm -rf meson-private meson-info meson-logs
- # Prevent meson from automatically downloading wrapped subprojects when missing.
- # You can use 'meson subprojects download' before running configure.
- meson_option_add "--wrap-mode=nodownload"
-
# Built-in options
+ test "$download" = "disabled" && meson_option_add "--wrap-mode=nodownload"
test "$bindir" != "bin" && meson_option_add "-Dbindir=$bindir"
test "$default_feature" = no && meson_option_add -Dauto_features=disabled
test "$static" = yes && meson_option_add -Dprefer_static=true
diff --git a/subprojects/.gitignore b/subprojects/.gitignore
new file mode 100644
index 00000000000..7560ebb0b1a
--- /dev/null
+++ b/subprojects/.gitignore
@@ -0,0 +1,3 @@
+/packagecache
+
+/slirp
--
2.40.1
^ permalink raw reply related [flat|nested] 32+ messages in thread
* [PATCH 03/10] git-submodule: allow partial update of .git-submodule-status
2023-06-05 9:52 [PATCH v2 00/10] meson: replace submodules with wrap files Paolo Bonzini
2023-06-05 9:52 ` [PATCH 01/10] configure: remove --with-git= option Paolo Bonzini
2023-06-05 9:52 ` [PATCH 02/10] configure: rename --enable-pypi to --enable-download, control subprojects too Paolo Bonzini
@ 2023-06-05 9:52 ` Paolo Bonzini
2023-06-05 10:55 ` Alex Bennée
2023-06-05 9:52 ` [PATCH 04/10] build: log submodule update from git-submodule.sh Paolo Bonzini
` (7 subsequent siblings)
10 siblings, 1 reply; 32+ messages in thread
From: Paolo Bonzini @ 2023-06-05 9:52 UTC (permalink / raw)
To: qemu-devel; +Cc: thuth, berrange
Allow a specific subdirectory to run git-submodule.sh with only a
subset of submodules, without removing the others from the
.git-submodule-status file.
This also allows scripts/git-submodule.sh to be more lenient:
validating an empty set of submodules is not a mistake.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
scripts/git-submodule.sh | 26 ++++++++++++++------------
1 file changed, 14 insertions(+), 12 deletions(-)
diff --git a/scripts/git-submodule.sh b/scripts/git-submodule.sh
index 0ce1efc44e5..b7d8f05352c 100755
--- a/scripts/git-submodule.sh
+++ b/scripts/git-submodule.sh
@@ -72,12 +72,8 @@ done
case "$command" in
status|validate)
- if test -z "$maybe_modules"
- then
- test -s ${substat} && validate_error "$command" || exit 0
- fi
-
test -f "$substat" || validate_error "$command"
+ test -z "$maybe_modules" && exit 0
for module in $modules; do
CURSTATUS=$($GIT submodule status $module)
OLDSTATUS=$(cat $substat | grep $module)
@@ -88,17 +84,23 @@ status|validate)
exit 0
;;
update)
- if test -z "$maybe_modules"
- then
- test -e $substat || touch $substat
- exit 0
- fi
+ test -e $substat || touch $substat
+ test -z "$maybe_modules" && exit 0
$GIT submodule update --init $modules 1>/dev/null
test $? -ne 0 && update_error "failed to update modules"
- $GIT submodule status $modules > "${substat}"
- test $? -ne 0 && update_error "failed to save git submodule status" >&2
+ (while read -r; do
+ for module in $modules; do
+ case $REPLY in
+ *" $module "*) continue 2 ;;
+ esac
+ done
+ printf '%s\n' "$REPLY"
+ done
+ $GIT submodule status $modules
+ test $? -ne 0 && update_error "failed to save git submodule status" >&2) < $substat > $substat.new
+ mv -f $substat.new $substat
;;
esac
--
2.40.1
^ permalink raw reply related [flat|nested] 32+ messages in thread
* [PATCH 04/10] build: log submodule update from git-submodule.sh
2023-06-05 9:52 [PATCH v2 00/10] meson: replace submodules with wrap files Paolo Bonzini
` (2 preceding siblings ...)
2023-06-05 9:52 ` [PATCH 03/10] git-submodule: allow partial update of .git-submodule-status Paolo Bonzini
@ 2023-06-05 9:52 ` Paolo Bonzini
2023-06-05 10:56 ` Alex Bennée
2023-06-05 11:11 ` Alex Bennée
2023-06-05 9:52 ` [PATCH 05/10] meson: subprojects: replace submodules with wrap files Paolo Bonzini
` (6 subsequent siblings)
10 siblings, 2 replies; 32+ messages in thread
From: Paolo Bonzini @ 2023-06-05 9:52 UTC (permalink / raw)
To: qemu-devel; +Cc: thuth, berrange
Print exactly which submodules have been updated, by reusing the logic of
"git-submodule.sh validate" after executing "git submodule update --init'.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
Makefile | 4 +---
scripts/git-submodule.sh | 16 +++++++++++-----
2 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/Makefile b/Makefile
index 8005f1cc53e..d68196acb9e 100644
--- a/Makefile
+++ b/Makefile
@@ -52,9 +52,7 @@ Makefile: .git-submodule-status
.PHONY: git-submodule-update
git-submodule-update:
ifneq ($(GIT_SUBMODULES_ACTION),ignore)
- $(call quiet-command, \
- (GIT=git "$(SRC_PATH)/scripts/git-submodule.sh" $(GIT_SUBMODULES_ACTION) $(GIT_SUBMODULES)), \
- "GIT","$(GIT_SUBMODULES)")
+ $(quiet-@)GIT=git "$(SRC_PATH)/scripts/git-submodule.sh" $(GIT_SUBMODULES_ACTION) $(GIT_SUBMODULES)
endif
# 0. ensure the build tree is okay
diff --git a/scripts/git-submodule.sh b/scripts/git-submodule.sh
index b7d8f05352c..38b55c90e11 100755
--- a/scripts/git-submodule.sh
+++ b/scripts/git-submodule.sh
@@ -46,6 +46,13 @@ validate_error() {
exit 1
}
+check_updated() {
+ local CURSTATUS OLDSTATUS
+ CURSTATUS=$($GIT submodule status $module)
+ OLDSTATUS=$(grep $module $substat)
+ test "$CURSTATUS" = "$OLDSTATUS"
+}
+
if test -n "$maybe_modules" && ! test -e ".git"
then
echo "$0: unexpectedly called with submodules but no git checkout exists"
@@ -75,11 +82,7 @@ status|validate)
test -f "$substat" || validate_error "$command"
test -z "$maybe_modules" && exit 0
for module in $modules; do
- CURSTATUS=$($GIT submodule status $module)
- OLDSTATUS=$(cat $substat | grep $module)
- if test "$CURSTATUS" != "$OLDSTATUS"; then
- validate_error "$command"
- fi
+ check_updated $module || validate_error "$command"
done
exit 0
;;
@@ -89,6 +92,9 @@ update)
$GIT submodule update --init $modules 1>/dev/null
test $? -ne 0 && update_error "failed to update modules"
+ for module in $modules; do
+ check_updated $module || echo Updated "$module"
+ done
(while read -r; do
for module in $modules; do
--
2.40.1
^ permalink raw reply related [flat|nested] 32+ messages in thread
* [PATCH 05/10] meson: subprojects: replace submodules with wrap files
2023-06-05 9:52 [PATCH v2 00/10] meson: replace submodules with wrap files Paolo Bonzini
` (3 preceding siblings ...)
2023-06-05 9:52 ` [PATCH 04/10] build: log submodule update from git-submodule.sh Paolo Bonzini
@ 2023-06-05 9:52 ` Paolo Bonzini
2023-06-06 9:54 ` Daniel P. Berrangé
2023-06-05 9:52 ` [PATCH 06/10] configure: move SLOF submodule handling to pc-bios/s390-ccw Paolo Bonzini
` (5 subsequent siblings)
10 siblings, 1 reply; 32+ messages in thread
From: Paolo Bonzini @ 2023-06-05 9:52 UTC (permalink / raw)
To: qemu-devel; +Cc: thuth, berrange
Compared to submodules, .wrap files have several advantages:
* option parsing and downloading is delegated to meson
* the commit is stored in a text file instead of a magic entry in the
git tree object
* we could stop shipping external dependencies that are only used as a
fallback, but not break compilation on platforms that lack them.
For example it may make sense to download dtc at build time, controlled
by --enable-download, even when building from a tarball. Right now,
this patch does the opposite: make-release treats dtc like libvfio-user
(which is not stable API and therefore hasn't found its way into any
distros) and keycodemap (which is a copylib, for better or worse).
dependency() can fall back to a wrap automatically. However, this
is only possible for libraries that come with a .pc file, and this
is not very common for libfdt even though the upstream project in
principle provides it; it also removes the control that we provide with
--enable-fdt={system,internal}. Therefore, the logic to pick system
vs. internal libfdt is left untouched.
--enable-fdt=git is removed; it was already a synonym for
--enable-fdt=internal.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
.gitlab-ci.d/buildtest-template.yml | 1 +
.gitmodules | 9 ----
configure | 77 ++++++++++++-----------------
meson.build | 15 +-----
scripts/archive-source.sh | 11 ++++-
scripts/make-release | 5 ++
subprojects/.gitignore | 3 ++
subprojects/dtc | 1 -
subprojects/dtc.wrap | 4 ++
subprojects/keycodemapdb | 1 -
subprojects/keycodemapdb.wrap | 4 ++
subprojects/libvfio-user | 1 -
subprojects/libvfio-user.wrap | 4 ++
13 files changed, 63 insertions(+), 73 deletions(-)
delete mode 160000 subprojects/dtc
create mode 100644 subprojects/dtc.wrap
delete mode 160000 subprojects/keycodemapdb
create mode 100644 subprojects/keycodemapdb.wrap
delete mode 160000 subprojects/libvfio-user
create mode 100644 subprojects/libvfio-user.wrap
diff --git a/.gitlab-ci.d/buildtest-template.yml b/.gitlab-ci.d/buildtest-template.yml
index c9f2e737c09..3c997d7265b 100644
--- a/.gitlab-ci.d/buildtest-template.yml
+++ b/.gitlab-ci.d/buildtest-template.yml
@@ -44,6 +44,7 @@
script:
- scripts/git-submodule.sh update
$(sed -n '/GIT_SUBMODULES=/ s/.*=// p' build/config-host.mak)
+ - meson subprojects download $(cd build/subprojects && echo *)
- cd build
- find . -type f -exec touch {} +
# Avoid recompiling by hiding ninja with NINJA=":"
diff --git a/.gitmodules b/.gitmodules
index f8b2ddf3877..a934c85e4e4 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -13,9 +13,6 @@
[submodule "roms/qemu-palcode"]
path = roms/qemu-palcode
url = https://gitlab.com/qemu-project/qemu-palcode.git
-[submodule "subprojects/dtc"]
- path = subprojects/dtc
- url = https://gitlab.com/qemu-project/dtc.git
[submodule "roms/u-boot"]
path = roms/u-boot
url = https://gitlab.com/qemu-project/u-boot.git
@@ -25,9 +22,6 @@
[submodule "roms/QemuMacDrivers"]
path = roms/QemuMacDrivers
url = https://gitlab.com/qemu-project/QemuMacDrivers.git
-[submodule "subprojects/keycodemapdb"]
- path = subprojects/keycodemapdb
- url = https://gitlab.com/qemu-project/keycodemapdb.git
[submodule "roms/seabios-hppa"]
path = roms/seabios-hppa
url = https://gitlab.com/qemu-project/seabios-hppa.git
@@ -55,6 +49,3 @@
[submodule "tests/lcitool/libvirt-ci"]
path = tests/lcitool/libvirt-ci
url = https://gitlab.com/libvirt/libvirt-ci.git
-[submodule "subprojects/libvfio-user"]
- path = subprojects/libvfio-user
- url = https://gitlab.com/qemu-project/libvfio-user.git
diff --git a/configure b/configure
index 52274212310..45d43ddbd97 100755
--- a/configure
+++ b/configure
@@ -253,7 +253,7 @@ else
git_submodules_action="ignore"
fi
-git_submodules="subprojects/keycodemapdb"
+git_submodules=""
git="git"
debug_tcg="no"
docs="auto"
@@ -269,7 +269,6 @@ python=
download="enabled"
bindir="bin"
skip_meson=no
-vfio_user_server="disabled"
use_containers="yes"
gdb_bin=$(command -v "gdb-multiarch" || command -v "gdb")
gdb_arches=""
@@ -281,16 +280,13 @@ unset target_list_exclude
# The following Meson options are handled manually (still they
# are included in the automatically generated help message)
-
-# 1. Track which submodules are needed
-fdt="auto"
-
-# 2. Automatically enable/disable other options
+# because they automatically enable/disable other options
tcg="auto"
cfi="false"
-# 3. Need to check for -static-pie before Meson runs. Also,
-# Meson has PIE as a boolean rather than enabled/disabled/auto.
+# Meson has PIE as a boolean rather than enabled/disabled/auto,
+# and we also need to check for -static-pie before Meson runs
+# which requires knowing whether --static is enabled.
pie=""
static="no"
@@ -743,14 +739,6 @@ for opt do
;;
--disable-cfi) cfi="false"
;;
- --disable-fdt) fdt="disabled"
- ;;
- --enable-fdt) fdt="enabled"
- ;;
- --enable-fdt=git) fdt="internal"
- ;;
- --enable-fdt=*) fdt="$optarg"
- ;;
--with-git-submodules=*)
git_submodules_action="$optarg"
;;
@@ -772,10 +760,6 @@ for opt do
;;
--gdb=*) gdb_bin="$optarg"
;;
- --enable-vfio-user-server) vfio_user_server="enabled"
- ;;
- --disable-vfio-user-server) vfio_user_server="disabled"
- ;;
# everything else has the same name in configure and meson
--*) meson_option_parse "$opt" "$optarg"
;;
@@ -787,6 +771,32 @@ if test "$plugins" = "yes" -a "$tcg" = "disabled"; then
error_exit "Can't enable plugins on non-TCG builds"
fi
+if ! test -f "$source_path/subprojects/keycodemapdb/README" \
+ && test -f "$download" = disabled
+then
+ echo
+ echo "ERROR: missing subprojects"
+ echo
+ if test -e "$source_path/.git"; then
+ echo "--disable-download specified but subprojects were not"
+ echo 'checked out. Please invoke "meson subprojects download"'
+ echo "before configuring QEMU, or remove --disable-download"
+ echo "from the command line."
+ else
+ echo "This is not a GIT checkout but subproject content appears to"
+ echo "be missing. Do not use 'git archive' or GitHub download links"
+ echo "to acquire QEMU source archives. Non-GIT builds are only"
+ echo "supported with source archives linked from:"
+ echo
+ echo " https://www.qemu.org/download/#source"
+ echo
+ echo "Developers working with GIT can use scripts/archive-source.sh"
+ echo "if they need to create valid source archives."
+ fi
+ echo
+ exit 1
+fi
+
case $git_submodules_action in
update|validate)
if test ! -e "$source_path/.git" || ! has git; then
@@ -795,7 +805,7 @@ case $git_submodules_action in
fi
;;
ignore)
- if ! test -f "$source_path/subprojects/keycodemapdb/README"
+ if ! test -f "$source_path/tests/fp/berkeley-testfloat-3/README.md"
then
echo
echo "ERROR: missing GIT submodules"
@@ -1164,16 +1174,6 @@ EOF
fi
fi
-##########################################
-# fdt probe
-
-case "$fdt" in
- auto | enabled | internal)
- # Simpler to always update submodule, even if not needed.
- git_submodules="${git_submodules} subprojects/dtc"
- ;;
-esac
-
########################################
# check if ccache is interfering with
# semantic analysis of macros
@@ -1609,17 +1609,6 @@ write_target_makefile() {
fi
}
-##########################################
-# check for vfio_user_server
-
-case "$vfio_user_server" in
- enabled )
- if test "$git_submodules_action" != "ignore"; then
- git_submodules="${git_submodules} subprojects/libvfio-user"
- fi
- ;;
-esac
-
#######################################
# cross-compiled firmware targets
@@ -1951,12 +1940,10 @@ if test "$skip_meson" = no; then
# QEMU options
test "$cfi" != false && meson_option_add "-Dcfi=$cfi"
test "$docs" != auto && meson_option_add "-Ddocs=$docs"
- test "$fdt" != auto && meson_option_add "-Dfdt=$fdt"
test -n "${LIB_FUZZING_ENGINE+xxx}" && meson_option_add "-Dfuzzing_engine=$LIB_FUZZING_ENGINE"
test "$qemu_suffix" != qemu && meson_option_add "-Dqemu_suffix=$qemu_suffix"
test "$smbd" != '' && meson_option_add "-Dsmbd=$smbd"
test "$tcg" != enabled && meson_option_add "-Dtcg=$tcg"
- test "$vfio_user_server" != auto && meson_option_add "-Dvfio_user_server=$vfio_user_server"
run_meson() {
NINJA=$ninja $meson setup --prefix "$prefix" "$@" $cross_arg "$PWD" "$source_path"
}
diff --git a/meson.build b/meson.build
index eb09af6ec82..badeeffd529 100644
--- a/meson.build
+++ b/meson.build
@@ -3046,14 +3046,7 @@ endif
libvfio_user_dep = not_found
if have_system and vfio_user_server_allowed
- have_internal = fs.exists(meson.current_source_dir() / 'subprojects/libvfio-user/meson.build')
-
- if not have_internal
- error('libvfio-user source not found - please pull git submodule')
- endif
-
- libvfio_user_proj = subproject('libvfio-user')
-
+ libvfio_user_proj = subproject('libvfio-user', required: true)
libvfio_user_dep = libvfio_user_proj.get_variable('libvfio_user_dep')
endif
@@ -3081,12 +3074,6 @@ if fdt_required.length() > 0 or fdt_opt == 'enabled'
endif
if not fdt.found()
assert(fdt_opt == 'internal')
- have_internal = fs.exists(meson.current_source_dir() / 'subprojects/dtc/meson.build')
-
- if not have_internal
- error('libfdt source not found - please pull git submodule')
- endif
-
libfdt_proj = subproject('dtc', required: true,
default_options: ['tools=false', 'yaml=disabled',
'python=disabled', 'default_library=static'])
diff --git a/scripts/archive-source.sh b/scripts/archive-source.sh
index dba5ae05b67..b99cb66e412 100755
--- a/scripts/archive-source.sh
+++ b/scripts/archive-source.sh
@@ -26,8 +26,8 @@ sub_file="${sub_tdir}/submodule.tar"
# independent of what the developer currently has initialized
# in their checkout, because the build environment is completely
# different to the host OS.
-submodules="subprojects/dtc subprojects/keycodemapdb"
-submodules="$submodules tests/fp/berkeley-softfloat-3 tests/fp/berkeley-testfloat-3"
+subprojects="dtc keycodemapdb libvfio-user"
+submodules="tests/fp/berkeley-softfloat-3 tests/fp/berkeley-testfloat-3"
sub_deinit=""
function cleanup() {
@@ -70,4 +70,11 @@ for sm in $submodules; do
tar --concatenate --file "$tar_file" "$sub_file"
test $? -ne 0 && error "failed append submodule $sm to $tar_file"
done
+
+for sp in $subprojects; do
+ meson subprojects download $sp
+ test $? -ne 0 && error "failed to download subproject $sp"
+ tar --append --file "$tar_file" --exclude=.git subprojects/$sp
+ test $? -ne 0 && error "failed to append subproject $sp to $tar_file"
+done
exit 0
diff --git a/scripts/make-release b/scripts/make-release
index 44a9d86a04a..0604e61b814 100755
--- a/scripts/make-release
+++ b/scripts/make-release
@@ -16,6 +16,9 @@ if [ $# -ne 2 ]; then
exit 0
fi
+# Only include wraps that are invoked with subproject()
+SUBPROJECTS="dtc libvfio-user keycodemapdb"
+
src="$1"
version="$2"
destination=qemu-${version}
@@ -26,6 +29,8 @@ git clone --single-branch -b "v${version}" -c advice.detachedHead=false \
pushd ${destination}
git submodule update --init --single-branch
+meson subprojects download $SUBPROJECTS
+
(cd roms/seabios && git describe --tags --long --dirty > .version)
(cd roms/skiboot && ./make_version.sh > .version)
# Fetch edk2 submodule's submodules, since it won't have access to them via
diff --git a/subprojects/.gitignore b/subprojects/.gitignore
index 7560ebb0b1a..935e9a72a8f 100644
--- a/subprojects/.gitignore
+++ b/subprojects/.gitignore
@@ -1,3 +1,6 @@
/packagecache
+/dtc
+/keycodemapdb
+/libvfio-user
/slirp
diff --git a/subprojects/dtc b/subprojects/dtc
deleted file mode 160000
index b6910bec116..00000000000
--- a/subprojects/dtc
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit b6910bec11614980a21e46fbccc35934b671bd81
diff --git a/subprojects/dtc.wrap b/subprojects/dtc.wrap
new file mode 100644
index 00000000000..d1bc9174e91
--- /dev/null
+++ b/subprojects/dtc.wrap
@@ -0,0 +1,4 @@
+[wrap-git]
+url = https://gitlab.com/qemu-project/dtc.git
+revision = b6910bec11614980a21e46fbccc35934b671bd81
+depth = 1
diff --git a/subprojects/keycodemapdb b/subprojects/keycodemapdb
deleted file mode 160000
index f5772a62ec5..00000000000
--- a/subprojects/keycodemapdb
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit f5772a62ec52591ff6870b7e8ef32482371f22c6
diff --git a/subprojects/keycodemapdb.wrap b/subprojects/keycodemapdb.wrap
new file mode 100644
index 00000000000..dda7b0e5716
--- /dev/null
+++ b/subprojects/keycodemapdb.wrap
@@ -0,0 +1,4 @@
+[wrap-git]
+url = https://gitlab.com/qemu-project/keycodemapdb.git
+revision = f5772a62ec52591ff6870b7e8ef32482371f22c6
+depth = 1
diff --git a/subprojects/libvfio-user b/subprojects/libvfio-user
deleted file mode 160000
index 0b28d205572..00000000000
--- a/subprojects/libvfio-user
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 0b28d205572c80b568a1003db2c8f37ca333e4d7
diff --git a/subprojects/libvfio-user.wrap b/subprojects/libvfio-user.wrap
new file mode 100644
index 00000000000..416955ca451
--- /dev/null
+++ b/subprojects/libvfio-user.wrap
@@ -0,0 +1,4 @@
+[wrap-git]
+url = https://gitlab.com/qemu-project/libvfio-user.git
+revision = 0b28d205572c80b568a1003db2c8f37ca333e4d7
+depth = 1
--
2.40.1
^ permalink raw reply related [flat|nested] 32+ messages in thread
* [PATCH 06/10] configure: move SLOF submodule handling to pc-bios/s390-ccw
2023-06-05 9:52 [PATCH v2 00/10] meson: replace submodules with wrap files Paolo Bonzini
` (4 preceding siblings ...)
2023-06-05 9:52 ` [PATCH 05/10] meson: subprojects: replace submodules with wrap files Paolo Bonzini
@ 2023-06-05 9:52 ` Paolo Bonzini
2023-06-06 9:56 ` Daniel P. Berrangé
2023-06-06 10:07 ` Thomas Huth
2023-06-05 9:52 ` [PATCH 07/10] pc-bios/s390-ccw: always build network bootloader Paolo Bonzini
` (4 subsequent siblings)
10 siblings, 2 replies; 32+ messages in thread
From: Paolo Bonzini @ 2023-06-05 9:52 UTC (permalink / raw)
To: qemu-devel; +Cc: thuth, berrange
Move the handling of the roms/SLOF submodule out of the main Makefile,
since we are going to remove submodules from the build process of QEMU.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
.gitlab-ci.d/buildtest-template.yml | 2 +-
configure | 7 +++----
pc-bios/s390-ccw/Makefile | 11 +++++++++++
3 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/.gitlab-ci.d/buildtest-template.yml b/.gitlab-ci.d/buildtest-template.yml
index 3c997d7265b..d01d504ec5f 100644
--- a/.gitlab-ci.d/buildtest-template.yml
+++ b/.gitlab-ci.d/buildtest-template.yml
@@ -43,7 +43,7 @@
image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:latest
script:
- scripts/git-submodule.sh update
- $(sed -n '/GIT_SUBMODULES=/ s/.*=// p' build/config-host.mak)
+ roms/SLOF $(sed -n '/GIT_SUBMODULES=/ s/.*=// p' build/config-host.mak)
- meson subprojects download $(cd build/subprojects && echo *)
- cd build
- find . -type f -exec touch {} +
diff --git a/configure b/configure
index 45d43ddbd97..de3904fb59d 100755
--- a/configure
+++ b/configure
@@ -1662,7 +1662,8 @@ fi
# Only build s390-ccw bios if the compiler has -march=z900 or -march=z10
# (which is the lowest architecture level that Clang supports)
-if have_target s390x-softmmu && probe_target_compiler s390x-softmmu; then
+if have_target s390x-softmmu && probe_target_compiler s390x-softmmu && \
+ GIT=git "$source_path/scripts/git-submodule.sh" "$git_submodules_action" roms/SLOF >> config.log 2>&1; then
write_c_skeleton
do_compiler "$target_cc" $target_cc_cflags -march=z900 -o $TMPO -c $TMPC
has_z900=$?
@@ -1675,10 +1676,8 @@ if have_target s390x-softmmu && probe_target_compiler s390x-softmmu; then
config_mak=pc-bios/s390-ccw/config-host.mak
echo "# Automatically generated by configure - do not modify" > $config_mak
echo "SRC_PATH=$source_path/pc-bios/s390-ccw" >> $config_mak
+ echo "GIT_SUBMODULES_ACTION=$git_submodules_action" >> $config_mak
write_target_makefile >> $config_mak
- # SLOF is required for building the s390-ccw firmware on s390x,
- # since it is using the libnet code from SLOF for network booting.
- git_submodules="${git_submodules} roms/SLOF"
fi
fi
diff --git a/pc-bios/s390-ccw/Makefile b/pc-bios/s390-ccw/Makefile
index 10e8f5cb633..9c5276f8ade 100644
--- a/pc-bios/s390-ccw/Makefile
+++ b/pc-bios/s390-ccw/Makefile
@@ -6,6 +6,8 @@ include config-host.mak
CFLAGS = -O2 -g
MAKEFLAGS += -rR
+GIT_SUBMODULES = roms/SLOF
+
NULL :=
SPACE := $(NULL) #
TARGET_PREFIX := $(patsubst %/,%:$(SPACE),$(TARGET_DIR))
@@ -80,3 +82,12 @@ clean:
distclean:
rm -f config-cc.mak
+
+.PHONY: git-submodule-update
+$(SRC_PATH)/../../.git-submodule-status: git-submodule-update config-host.mak
+Makefile: $(SRC_PATH)/../../.git-submodule-status
+
+git-submodule-update:
+ifneq ($(GIT_SUBMODULES_ACTION),ignore)
+ $(quiet-@)GIT=git "$(SRC_PATH)/../../scripts/git-submodule.sh" $(GIT_SUBMODULES_ACTION) $(GIT_SUBMODULES)
+endif
--
2.40.1
^ permalink raw reply related [flat|nested] 32+ messages in thread
* [PATCH 07/10] pc-bios/s390-ccw: always build network bootloader
2023-06-05 9:52 [PATCH v2 00/10] meson: replace submodules with wrap files Paolo Bonzini
` (5 preceding siblings ...)
2023-06-05 9:52 ` [PATCH 06/10] configure: move SLOF submodule handling to pc-bios/s390-ccw Paolo Bonzini
@ 2023-06-05 9:52 ` Paolo Bonzini
2023-06-06 9:56 ` Daniel P. Berrangé
` (2 more replies)
2023-06-05 9:52 ` [PATCH 08/10] meson: subprojects: replace berkeley-{soft, test}float-3 with wraps Paolo Bonzini
` (3 subsequent siblings)
10 siblings, 3 replies; 32+ messages in thread
From: Paolo Bonzini @ 2023-06-05 9:52 UTC (permalink / raw)
To: qemu-devel; +Cc: thuth, berrange
In the beginning, the network bootloader was considered experimental and
thus optional, but it is well established nowadays and configure always
checks for roms/SLOF before compiling pc-bios/s390-ccw.
Therefore, it makes sense to always build it together with the other
part of the s390-ccw bios.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
pc-bios/s390-ccw/Makefile | 5 -----
1 file changed, 5 deletions(-)
diff --git a/pc-bios/s390-ccw/Makefile b/pc-bios/s390-ccw/Makefile
index 9c5276f8ade..2e8cc015aa0 100644
--- a/pc-bios/s390-ccw/Makefile
+++ b/pc-bios/s390-ccw/Makefile
@@ -67,12 +67,7 @@ s390-ccw.img: s390-ccw.elf
$(OBJECTS): Makefile
-ifneq ($(wildcard $(SRC_PATH)/../../roms/SLOF/lib/libnet),)
include $(SRC_PATH)/netboot.mak
-else
-s390-netboot.img:
- @echo "s390-netboot.img not built since roms/SLOF/ is not available."
-endif
ALL_OBJS = $(sort $(OBJECTS) $(NETOBJS) $(LIBCOBJS) $(LIBNETOBJS))
-include $(ALL_OBJS:%.o=%.d)
--
2.40.1
^ permalink raw reply related [flat|nested] 32+ messages in thread
* [PATCH 08/10] meson: subprojects: replace berkeley-{soft, test}float-3 with wraps
2023-06-05 9:52 [PATCH v2 00/10] meson: replace submodules with wrap files Paolo Bonzini
` (6 preceding siblings ...)
2023-06-05 9:52 ` [PATCH 07/10] pc-bios/s390-ccw: always build network bootloader Paolo Bonzini
@ 2023-06-05 9:52 ` Paolo Bonzini
2023-06-06 9:58 ` [PATCH 08/10] meson: subprojects: replace berkeley-{soft,test}float-3 " Daniel P. Berrangé
2023-06-05 9:52 ` [PATCH 09/10] build: remove git submodule handling from main makefile Paolo Bonzini
` (2 subsequent siblings)
10 siblings, 1 reply; 32+ messages in thread
From: Paolo Bonzini @ 2023-06-05 9:52 UTC (permalink / raw)
To: qemu-devel; +Cc: thuth, berrange
Unlike other subprojects, these require an overlay directory to include
meson rules to build the libraries. The rules are basically lifted
from tests/fp/meson.build, with a few changes to create platform.h
and publish a dependency.
The build defines are passed through a subproject option, and posted
back to users of the library via the dependency's compile_args.
The only remaining user of GIT_SUBMODULES and GIT_SUBMODULES_ACTION
is roms/SLOF, which is used to build pc-bios/s390-ccw. All other
roms submodules are only present to satisfy the license on pre-built
firmware blobs.
Best reviewed with --color-moved.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
.gitmodules | 6 -
configure | 27 -
scripts/archive-source.sh | 22 +-
scripts/make-release | 2 +-
subprojects/.gitignore | 2 +
subprojects/berkeley-softfloat-3.wrap | 5 +
subprojects/berkeley-testfloat-3.wrap | 5 +
.../berkeley-softfloat-3/meson.build | 339 +++++++++++
.../berkeley-softfloat-3/meson_options.txt | 1 +
.../berkeley-testfloat-3/meson.build | 220 +++++++
.../berkeley-testfloat-3/meson_options.txt | 1 +
tests/fp/meson.build | 541 +-----------------
12 files changed, 590 insertions(+), 581 deletions(-)
create mode 100644 subprojects/berkeley-softfloat-3.wrap
create mode 100644 subprojects/berkeley-testfloat-3.wrap
create mode 100644 subprojects/packagefiles/berkeley-softfloat-3/meson.build
create mode 100644 subprojects/packagefiles/berkeley-softfloat-3/meson_options.txt
create mode 100644 subprojects/packagefiles/berkeley-testfloat-3/meson.build
create mode 100644 subprojects/packagefiles/berkeley-testfloat-3/meson_options.txt
diff --git a/.gitmodules b/.gitmodules
index a934c85e4e4..73cae4cd4da 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -28,12 +28,6 @@
[submodule "roms/u-boot-sam460ex"]
path = roms/u-boot-sam460ex
url = https://gitlab.com/qemu-project/u-boot-sam460ex.git
-[submodule "tests/fp/berkeley-testfloat-3"]
- path = tests/fp/berkeley-testfloat-3
- url = https://gitlab.com/qemu-project/berkeley-testfloat-3.git
-[submodule "tests/fp/berkeley-softfloat-3"]
- path = tests/fp/berkeley-softfloat-3
- url = https://gitlab.com/qemu-project/berkeley-softfloat-3.git
[submodule "roms/edk2"]
path = roms/edk2
url = https://gitlab.com/qemu-project/edk2.git
diff --git a/configure b/configure
index de3904fb59d..4dad32938df 100755
--- a/configure
+++ b/configure
@@ -805,28 +805,6 @@ case $git_submodules_action in
fi
;;
ignore)
- if ! test -f "$source_path/tests/fp/berkeley-testfloat-3/README.md"
- then
- echo
- echo "ERROR: missing GIT submodules"
- echo
- if test -e "$source_path/.git"; then
- echo "--with-git-submodules=ignore specified but submodules were not"
- echo "checked out. Please initialize and update submodules."
- else
- echo "This is not a GIT checkout but module content appears to"
- echo "be missing. Do not use 'git archive' or GitHub download links"
- echo "to acquire QEMU source archives. Non-GIT builds are only"
- echo "supported with source archives linked from:"
- echo
- echo " https://www.qemu.org/download/#source"
- echo
- echo "Developers working with GIT can use scripts/archive-source.sh"
- echo "if they need to create valid source archives."
- fi
- echo
- exit 1
- fi
;;
*)
echo "ERROR: invalid --with-git-submodules= value '$git_submodules_action'"
@@ -1142,11 +1120,6 @@ if test "$tcg" = "auto"; then
fi
fi
-if test "$tcg" = "enabled"; then
- git_submodules="$git_submodules tests/fp/berkeley-testfloat-3"
- git_submodules="$git_submodules tests/fp/berkeley-softfloat-3"
-fi
-
##########################################
# big/little endian test
cat > $TMPC << EOF
diff --git a/scripts/archive-source.sh b/scripts/archive-source.sh
index b99cb66e412..48996304910 100755
--- a/scripts/archive-source.sh
+++ b/scripts/archive-source.sh
@@ -26,8 +26,7 @@ sub_file="${sub_tdir}/submodule.tar"
# independent of what the developer currently has initialized
# in their checkout, because the build environment is completely
# different to the host OS.
-subprojects="dtc keycodemapdb libvfio-user"
-submodules="tests/fp/berkeley-softfloat-3 tests/fp/berkeley-testfloat-3"
+subprojects="dtc keycodemapdb libvfio-user berkeley-softfloat-3 berkeley-testfloat-3"
sub_deinit=""
function cleanup() {
@@ -51,25 +50,6 @@ function tree_ish() {
git archive --format tar "$(tree_ish)" > "$tar_file"
test $? -ne 0 && error "failed to archive qemu"
-for sm in $submodules; do
- status="$(git submodule status "$sm")"
- smhash="${status#[ +-]}"
- smhash="${smhash%% *}"
- case "$status" in
- -*)
- sub_deinit="$sub_deinit $sm"
- git submodule update --init "$sm"
- test $? -ne 0 && error "failed to update submodule $sm"
- ;;
- +*)
- echo "WARNING: submodule $sm is out of sync"
- ;;
- esac
- (cd $sm; git archive --format tar --prefix "$sm/" $(tree_ish)) > "$sub_file"
- test $? -ne 0 && error "failed to archive submodule $sm ($smhash)"
- tar --concatenate --file "$tar_file" "$sub_file"
- test $? -ne 0 && error "failed append submodule $sm to $tar_file"
-done
for sp in $subprojects; do
meson subprojects download $sp
diff --git a/scripts/make-release b/scripts/make-release
index 0604e61b814..c5db87b3f91 100755
--- a/scripts/make-release
+++ b/scripts/make-release
@@ -17,7 +17,7 @@ if [ $# -ne 2 ]; then
fi
# Only include wraps that are invoked with subproject()
-SUBPROJECTS="dtc libvfio-user keycodemapdb"
+SUBPROJECTS="dtc libvfio-user keycodemapdb berkeley-softfloat-3 berkeley-testfloat-3"
src="$1"
version="$2"
diff --git a/subprojects/.gitignore b/subprojects/.gitignore
index 935e9a72a8f..adca0266be6 100644
--- a/subprojects/.gitignore
+++ b/subprojects/.gitignore
@@ -1,5 +1,7 @@
/packagecache
+/berkeley-softfloat-3
+/berkeley-testfloat-3
/dtc
/keycodemapdb
/libvfio-user
diff --git a/subprojects/berkeley-softfloat-3.wrap b/subprojects/berkeley-softfloat-3.wrap
new file mode 100644
index 00000000000..a8fd87740b1
--- /dev/null
+++ b/subprojects/berkeley-softfloat-3.wrap
@@ -0,0 +1,5 @@
+[wrap-git]
+url = https://gitlab.com/qemu-project/berkeley-softfloat-3
+revision = b64af41c3276f97f0e181920400ee056b9c88037
+patch_directory = berkeley-softfloat-3
+depth = 1
diff --git a/subprojects/berkeley-testfloat-3.wrap b/subprojects/berkeley-testfloat-3.wrap
new file mode 100644
index 00000000000..6ad80a37b2a
--- /dev/null
+++ b/subprojects/berkeley-testfloat-3.wrap
@@ -0,0 +1,5 @@
+[wrap-git]
+url = https://gitlab.com/qemu-project/berkeley-testfloat-3
+revision = 40619cbb3bf32872df8c53cc457039229428a263
+patch_directory = berkeley-testfloat-3
+depth = 1
diff --git a/subprojects/packagefiles/berkeley-softfloat-3/meson.build b/subprojects/packagefiles/berkeley-softfloat-3/meson.build
new file mode 100644
index 00000000000..4ce964b8389
--- /dev/null
+++ b/subprojects/packagefiles/berkeley-softfloat-3/meson.build
@@ -0,0 +1,339 @@
+project('berkeley-softfloat-3', 'c',
+ default_options: ['warning_level=1', 'c_std=gnu99'])
+
+fpcflags = get_option('defines')
+
+platform_data = configuration_data()
+platform_data.set('INLINE', 'static inline')
+platform_data.set('LITTLEENDIAN', host_machine.endian() == 'little')
+configure_file(output: 'platform.h', configuration: platform_data)
+
+sfdir = 'source'
+sfspedir = sfdir / '8086-SSE'
+sfinc = include_directories('.', sfdir / 'include', sfspedir)
+
+add_project_arguments([
+ '-Wno-implicit-fallthrough',
+ '-Wno-missing-prototypes',
+ '-Wno-redundant-decls',
+ '-Wno-return-type',
+ '-Wno-error',
+], native: false, language: 'c')
+
+libsoftfloat = static_library(
+ 'softfloat',
+ files(
+ # primitives
+ sfdir / 's_eq128.c',
+ sfdir / 's_le128.c',
+ sfdir / 's_lt128.c',
+ sfdir / 's_shortShiftLeft128.c',
+ sfdir / 's_shortShiftRight128.c',
+ sfdir / 's_shortShiftRightJam64.c',
+ sfdir / 's_shortShiftRightJam64Extra.c',
+ sfdir / 's_shortShiftRightJam128.c',
+ sfdir / 's_shortShiftRightJam128Extra.c',
+ sfdir / 's_shiftRightJam32.c',
+ sfdir / 's_shiftRightJam64.c',
+ sfdir / 's_shiftRightJam64Extra.c',
+ sfdir / 's_shiftRightJam128.c',
+ sfdir / 's_shiftRightJam128Extra.c',
+ sfdir / 's_shiftRightJam256M.c',
+ sfdir / 's_countLeadingZeros8.c',
+ sfdir / 's_countLeadingZeros16.c',
+ sfdir / 's_countLeadingZeros32.c',
+ sfdir / 's_countLeadingZeros64.c',
+ sfdir / 's_add128.c',
+ sfdir / 's_add256M.c',
+ sfdir / 's_sub128.c',
+ sfdir / 's_sub256M.c',
+ sfdir / 's_mul64ByShifted32To128.c',
+ sfdir / 's_mul64To128.c',
+ sfdir / 's_mul128By32.c',
+ sfdir / 's_mul128To256M.c',
+ sfdir / 's_approxRecip_1Ks.c',
+ sfdir / 's_approxRecip32_1.c',
+ sfdir / 's_approxRecipSqrt_1Ks.c',
+ sfdir / 's_approxRecipSqrt32_1.c',
+ # others
+ sfdir / 's_roundToUI32.c',
+ sfdir / 's_roundToUI64.c',
+ sfdir / 's_roundToI32.c',
+ sfdir / 's_roundToI64.c',
+ sfdir / 's_normSubnormalF16Sig.c',
+ sfdir / 's_roundPackToF16.c',
+ sfdir / 's_normRoundPackToF16.c',
+ sfdir / 's_addMagsF16.c',
+ sfdir / 's_subMagsF16.c',
+ sfdir / 's_mulAddF16.c',
+ sfdir / 's_normSubnormalF32Sig.c',
+ sfdir / 's_roundPackToF32.c',
+ sfdir / 's_normRoundPackToF32.c',
+ sfdir / 's_addMagsF32.c',
+ sfdir / 's_subMagsF32.c',
+ sfdir / 's_mulAddF32.c',
+ sfdir / 's_normSubnormalF64Sig.c',
+ sfdir / 's_roundPackToF64.c',
+ sfdir / 's_normRoundPackToF64.c',
+ sfdir / 's_addMagsF64.c',
+ sfdir / 's_subMagsF64.c',
+ sfdir / 's_mulAddF64.c',
+ sfdir / 's_normSubnormalExtF80Sig.c',
+ sfdir / 's_roundPackToExtF80.c',
+ sfdir / 's_normRoundPackToExtF80.c',
+ sfdir / 's_addMagsExtF80.c',
+ sfdir / 's_subMagsExtF80.c',
+ sfdir / 's_normSubnormalF128Sig.c',
+ sfdir / 's_roundPackToF128.c',
+ sfdir / 's_normRoundPackToF128.c',
+ sfdir / 's_addMagsF128.c',
+ sfdir / 's_subMagsF128.c',
+ sfdir / 's_mulAddF128.c',
+ sfdir / 'softfloat_state.c',
+ sfdir / 'ui32_to_f16.c',
+ sfdir / 'ui32_to_f32.c',
+ sfdir / 'ui32_to_f64.c',
+ sfdir / 'ui32_to_extF80.c',
+ sfdir / 'ui32_to_extF80M.c',
+ sfdir / 'ui32_to_f128.c',
+ sfdir / 'ui32_to_f128M.c',
+ sfdir / 'ui64_to_f16.c',
+ sfdir / 'ui64_to_f32.c',
+ sfdir / 'ui64_to_f64.c',
+ sfdir / 'ui64_to_extF80.c',
+ sfdir / 'ui64_to_extF80M.c',
+ sfdir / 'ui64_to_f128.c',
+ sfdir / 'ui64_to_f128M.c',
+ sfdir / 'i32_to_f16.c',
+ sfdir / 'i32_to_f32.c',
+ sfdir / 'i32_to_f64.c',
+ sfdir / 'i32_to_extF80.c',
+ sfdir / 'i32_to_extF80M.c',
+ sfdir / 'i32_to_f128.c',
+ sfdir / 'i32_to_f128M.c',
+ sfdir / 'i64_to_f16.c',
+ sfdir / 'i64_to_f32.c',
+ sfdir / 'i64_to_f64.c',
+ sfdir / 'i64_to_extF80.c',
+ sfdir / 'i64_to_extF80M.c',
+ sfdir / 'i64_to_f128.c',
+ sfdir / 'i64_to_f128M.c',
+ sfdir / 'f16_to_ui32.c',
+ sfdir / 'f16_to_ui64.c',
+ sfdir / 'f16_to_i32.c',
+ sfdir / 'f16_to_i64.c',
+ sfdir / 'f16_to_ui32_r_minMag.c',
+ sfdir / 'f16_to_ui64_r_minMag.c',
+ sfdir / 'f16_to_i32_r_minMag.c',
+ sfdir / 'f16_to_i64_r_minMag.c',
+ sfdir / 'f16_to_f32.c',
+ sfdir / 'f16_to_f64.c',
+ sfdir / 'f16_to_extF80.c',
+ sfdir / 'f16_to_extF80M.c',
+ sfdir / 'f16_to_f128.c',
+ sfdir / 'f16_to_f128M.c',
+ sfdir / 'f16_roundToInt.c',
+ sfdir / 'f16_add.c',
+ sfdir / 'f16_sub.c',
+ sfdir / 'f16_mul.c',
+ sfdir / 'f16_mulAdd.c',
+ sfdir / 'f16_div.c',
+ sfdir / 'f16_rem.c',
+ sfdir / 'f16_sqrt.c',
+ sfdir / 'f16_eq.c',
+ sfdir / 'f16_le.c',
+ sfdir / 'f16_lt.c',
+ sfdir / 'f16_eq_signaling.c',
+ sfdir / 'f16_le_quiet.c',
+ sfdir / 'f16_lt_quiet.c',
+ sfdir / 'f16_isSignalingNaN.c',
+ sfdir / 'f32_to_ui32.c',
+ sfdir / 'f32_to_ui64.c',
+ sfdir / 'f32_to_i32.c',
+ sfdir / 'f32_to_i64.c',
+ sfdir / 'f32_to_ui32_r_minMag.c',
+ sfdir / 'f32_to_ui64_r_minMag.c',
+ sfdir / 'f32_to_i32_r_minMag.c',
+ sfdir / 'f32_to_i64_r_minMag.c',
+ sfdir / 'f32_to_f16.c',
+ sfdir / 'f32_to_f64.c',
+ sfdir / 'f32_to_extF80.c',
+ sfdir / 'f32_to_extF80M.c',
+ sfdir / 'f32_to_f128.c',
+ sfdir / 'f32_to_f128M.c',
+ sfdir / 'f32_roundToInt.c',
+ sfdir / 'f32_add.c',
+ sfdir / 'f32_sub.c',
+ sfdir / 'f32_mul.c',
+ sfdir / 'f32_mulAdd.c',
+ sfdir / 'f32_div.c',
+ sfdir / 'f32_rem.c',
+ sfdir / 'f32_sqrt.c',
+ sfdir / 'f32_eq.c',
+ sfdir / 'f32_le.c',
+ sfdir / 'f32_lt.c',
+ sfdir / 'f32_eq_signaling.c',
+ sfdir / 'f32_le_quiet.c',
+ sfdir / 'f32_lt_quiet.c',
+ sfdir / 'f32_isSignalingNaN.c',
+ sfdir / 'f64_to_ui32.c',
+ sfdir / 'f64_to_ui64.c',
+ sfdir / 'f64_to_i32.c',
+ sfdir / 'f64_to_i64.c',
+ sfdir / 'f64_to_ui32_r_minMag.c',
+ sfdir / 'f64_to_ui64_r_minMag.c',
+ sfdir / 'f64_to_i32_r_minMag.c',
+ sfdir / 'f64_to_i64_r_minMag.c',
+ sfdir / 'f64_to_f16.c',
+ sfdir / 'f64_to_f32.c',
+ sfdir / 'f64_to_extF80.c',
+ sfdir / 'f64_to_extF80M.c',
+ sfdir / 'f64_to_f128.c',
+ sfdir / 'f64_to_f128M.c',
+ sfdir / 'f64_roundToInt.c',
+ sfdir / 'f64_add.c',
+ sfdir / 'f64_sub.c',
+ sfdir / 'f64_mul.c',
+ sfdir / 'f64_mulAdd.c',
+ sfdir / 'f64_div.c',
+ sfdir / 'f64_rem.c',
+ sfdir / 'f64_sqrt.c',
+ sfdir / 'f64_eq.c',
+ sfdir / 'f64_le.c',
+ sfdir / 'f64_lt.c',
+ sfdir / 'f64_eq_signaling.c',
+ sfdir / 'f64_le_quiet.c',
+ sfdir / 'f64_lt_quiet.c',
+ sfdir / 'f64_isSignalingNaN.c',
+ sfdir / 'extF80_to_ui32.c',
+ sfdir / 'extF80_to_ui64.c',
+ sfdir / 'extF80_to_i32.c',
+ sfdir / 'extF80_to_i64.c',
+ sfdir / 'extF80_to_ui32_r_minMag.c',
+ sfdir / 'extF80_to_ui64_r_minMag.c',
+ sfdir / 'extF80_to_i32_r_minMag.c',
+ sfdir / 'extF80_to_i64_r_minMag.c',
+ sfdir / 'extF80_to_f16.c',
+ sfdir / 'extF80_to_f32.c',
+ sfdir / 'extF80_to_f64.c',
+ sfdir / 'extF80_to_f128.c',
+ sfdir / 'extF80_roundToInt.c',
+ sfdir / 'extF80_add.c',
+ sfdir / 'extF80_sub.c',
+ sfdir / 'extF80_mul.c',
+ sfdir / 'extF80_div.c',
+ sfdir / 'extF80_rem.c',
+ sfdir / 'extF80_sqrt.c',
+ sfdir / 'extF80_eq.c',
+ sfdir / 'extF80_le.c',
+ sfdir / 'extF80_lt.c',
+ sfdir / 'extF80_eq_signaling.c',
+ sfdir / 'extF80_le_quiet.c',
+ sfdir / 'extF80_lt_quiet.c',
+ sfdir / 'extF80_isSignalingNaN.c',
+ sfdir / 'extF80M_to_ui32.c',
+ sfdir / 'extF80M_to_ui64.c',
+ sfdir / 'extF80M_to_i32.c',
+ sfdir / 'extF80M_to_i64.c',
+ sfdir / 'extF80M_to_ui32_r_minMag.c',
+ sfdir / 'extF80M_to_ui64_r_minMag.c',
+ sfdir / 'extF80M_to_i32_r_minMag.c',
+ sfdir / 'extF80M_to_i64_r_minMag.c',
+ sfdir / 'extF80M_to_f16.c',
+ sfdir / 'extF80M_to_f32.c',
+ sfdir / 'extF80M_to_f64.c',
+ sfdir / 'extF80M_to_f128M.c',
+ sfdir / 'extF80M_roundToInt.c',
+ sfdir / 'extF80M_add.c',
+ sfdir / 'extF80M_sub.c',
+ sfdir / 'extF80M_mul.c',
+ sfdir / 'extF80M_div.c',
+ sfdir / 'extF80M_rem.c',
+ sfdir / 'extF80M_sqrt.c',
+ sfdir / 'extF80M_eq.c',
+ sfdir / 'extF80M_le.c',
+ sfdir / 'extF80M_lt.c',
+ sfdir / 'extF80M_eq_signaling.c',
+ sfdir / 'extF80M_le_quiet.c',
+ sfdir / 'extF80M_lt_quiet.c',
+ sfdir / 'f128_to_ui32.c',
+ sfdir / 'f128_to_ui64.c',
+ sfdir / 'f128_to_i32.c',
+ sfdir / 'f128_to_i64.c',
+ sfdir / 'f128_to_ui32_r_minMag.c',
+ sfdir / 'f128_to_ui64_r_minMag.c',
+ sfdir / 'f128_to_i32_r_minMag.c',
+ sfdir / 'f128_to_i64_r_minMag.c',
+ sfdir / 'f128_to_f16.c',
+ sfdir / 'f128_to_f32.c',
+ sfdir / 'f128_to_extF80.c',
+ sfdir / 'f128_to_f64.c',
+ sfdir / 'f128_roundToInt.c',
+ sfdir / 'f128_add.c',
+ sfdir / 'f128_sub.c',
+ sfdir / 'f128_mul.c',
+ sfdir / 'f128_mulAdd.c',
+ sfdir / 'f128_div.c',
+ sfdir / 'f128_rem.c',
+ sfdir / 'f128_sqrt.c',
+ sfdir / 'f128_eq.c',
+ sfdir / 'f128_le.c',
+ sfdir / 'f128_lt.c',
+ sfdir / 'f128_eq_signaling.c',
+ sfdir / 'f128_le_quiet.c',
+ sfdir / 'f128_lt_quiet.c',
+ sfdir / 'f128_isSignalingNaN.c',
+ sfdir / 'f128M_to_ui32.c',
+ sfdir / 'f128M_to_ui64.c',
+ sfdir / 'f128M_to_i32.c',
+ sfdir / 'f128M_to_i64.c',
+ sfdir / 'f128M_to_ui32_r_minMag.c',
+ sfdir / 'f128M_to_ui64_r_minMag.c',
+ sfdir / 'f128M_to_i32_r_minMag.c',
+ sfdir / 'f128M_to_i64_r_minMag.c',
+ sfdir / 'f128M_to_f16.c',
+ sfdir / 'f128M_to_f32.c',
+ sfdir / 'f128M_to_extF80M.c',
+ sfdir / 'f128M_to_f64.c',
+ sfdir / 'f128M_roundToInt.c',
+ sfdir / 'f128M_add.c',
+ sfdir / 'f128M_sub.c',
+ sfdir / 'f128M_mul.c',
+ sfdir / 'f128M_mulAdd.c',
+ sfdir / 'f128M_div.c',
+ sfdir / 'f128M_rem.c',
+ sfdir / 'f128M_sqrt.c',
+ sfdir / 'f128M_eq.c',
+ sfdir / 'f128M_le.c',
+ sfdir / 'f128M_lt.c',
+ sfdir / 'f128M_eq_signaling.c',
+ sfdir / 'f128M_le_quiet.c',
+ sfdir / 'f128M_lt_quiet.c',
+ # spe
+ sfspedir / 'softfloat_raiseFlags.c',
+ sfspedir / 's_f16UIToCommonNaN.c',
+ sfspedir / 's_commonNaNToF16UI.c',
+ sfspedir / 's_propagateNaNF16UI.c',
+ sfspedir / 's_f32UIToCommonNaN.c',
+ sfspedir / 's_commonNaNToF32UI.c',
+ sfspedir / 's_propagateNaNF32UI.c',
+ sfspedir / 's_f64UIToCommonNaN.c',
+ sfspedir / 's_commonNaNToF64UI.c',
+ sfspedir / 's_propagateNaNF64UI.c',
+ sfspedir / 'extF80M_isSignalingNaN.c',
+ sfspedir / 's_extF80UIToCommonNaN.c',
+ sfspedir / 's_commonNaNToExtF80UI.c',
+ sfspedir / 's_propagateNaNExtF80UI.c',
+ sfspedir / 'f128M_isSignalingNaN.c',
+ sfspedir / 's_f128UIToCommonNaN.c',
+ sfspedir / 's_commonNaNToF128UI.c',
+ sfspedir / 's_propagateNaNF128UI.c',
+ ),
+ include_directories: sfinc,
+ c_args: fpcflags,
+)
+
+libsoftfloat_dep = declare_dependency(
+ link_with: libsoftfloat,
+ include_directories: sfinc,
+ compile_args: fpcflags)
diff --git a/subprojects/packagefiles/berkeley-softfloat-3/meson_options.txt b/subprojects/packagefiles/berkeley-softfloat-3/meson_options.txt
new file mode 100644
index 00000000000..868ae57e805
--- /dev/null
+++ b/subprojects/packagefiles/berkeley-softfloat-3/meson_options.txt
@@ -0,0 +1 @@
+option('defines', type : 'array', value : [])
diff --git a/subprojects/packagefiles/berkeley-testfloat-3/meson.build b/subprojects/packagefiles/berkeley-testfloat-3/meson.build
new file mode 100644
index 00000000000..a41673d616b
--- /dev/null
+++ b/subprojects/packagefiles/berkeley-testfloat-3/meson.build
@@ -0,0 +1,220 @@
+project('berkeley-testfloat-3', 'c',
+ default_options: ['warning_level=1', 'c_std=gnu99'])
+
+fpcflags = get_option('defines')
+
+platform_data = configuration_data()
+platform_data.set('INLINE', 'static inline')
+platform_data.set('LITTLEENDIAN', host_machine.endian() == 'little')
+configure_file(output: 'platform.h', configuration: platform_data)
+
+tfdir = 'source'
+tfinc = include_directories('.', tfdir)
+
+add_project_arguments(
+ [
+ '-Wno-implicit-fallthrough',
+ '-Wno-strict-prototypes',
+ '-Wno-unknown-pragmas',
+ '-Wno-uninitialized',
+ '-Wno-missing-prototypes',
+ '-Wno-return-type',
+ '-Wno-unused-function',
+ '-Wno-missing-format-attribute',
+ '-Wno-error',
+ ] + meson.get_compiler('c').get_supported_arguments('-Wno-ignored-pragmas'),
+ native: false, language: 'c')
+
+tfgencases = [
+ tfdir / 'genCases_ui32.c',
+ tfdir / 'genCases_ui64.c',
+ tfdir / 'genCases_i32.c',
+ tfdir / 'genCases_i64.c',
+ tfdir / 'genCases_f16.c',
+ tfdir / 'genCases_f32.c',
+ tfdir / 'genCases_f64.c',
+ tfdir / 'genCases_extF80.c',
+ tfdir / 'genCases_f128.c',
+]
+
+tfwritecase = [
+ tfdir / 'writeCase_a_ui32.c',
+ tfdir / 'writeCase_a_ui64.c',
+ tfdir / 'writeCase_a_f16.c',
+ tfdir / 'writeCase_ab_f16.c',
+ tfdir / 'writeCase_abc_f16.c',
+ tfdir / 'writeCase_a_f32.c',
+ tfdir / 'writeCase_ab_f32.c',
+ tfdir / 'writeCase_abc_f32.c',
+ tfdir / 'writeCase_a_f64.c',
+ tfdir / 'writeCase_ab_f64.c',
+ tfdir / 'writeCase_abc_f64.c',
+ tfdir / 'writeCase_a_extF80M.c',
+ tfdir / 'writeCase_ab_extF80M.c',
+ tfdir / 'writeCase_a_f128M.c',
+ tfdir / 'writeCase_ab_f128M.c',
+ tfdir / 'writeCase_abc_f128M.c',
+ tfdir / 'writeCase_z_bool.c',
+ tfdir / 'writeCase_z_ui32.c',
+ tfdir / 'writeCase_z_ui64.c',
+ tfdir / 'writeCase_z_f16.c',
+ tfdir / 'writeCase_z_f32.c',
+ tfdir / 'writeCase_z_f64.c',
+ tfdir / 'writeCase_z_extF80M.c',
+ tfdir / 'writeCase_z_f128M.c',
+]
+
+tftest = [
+ tfdir / 'test_a_ui32_z_f16.c',
+ tfdir / 'test_a_ui32_z_f32.c',
+ tfdir / 'test_a_ui32_z_f64.c',
+ tfdir / 'test_a_ui32_z_extF80.c',
+ tfdir / 'test_a_ui32_z_f128.c',
+ tfdir / 'test_a_ui64_z_f16.c',
+ tfdir / 'test_a_ui64_z_f32.c',
+ tfdir / 'test_a_ui64_z_f64.c',
+ tfdir / 'test_a_ui64_z_extF80.c',
+ tfdir / 'test_a_ui64_z_f128.c',
+ tfdir / 'test_a_i32_z_f16.c',
+ tfdir / 'test_a_i32_z_f32.c',
+ tfdir / 'test_a_i32_z_f64.c',
+ tfdir / 'test_a_i32_z_extF80.c',
+ tfdir / 'test_a_i32_z_f128.c',
+ tfdir / 'test_a_i64_z_f16.c',
+ tfdir / 'test_a_i64_z_f32.c',
+ tfdir / 'test_a_i64_z_f64.c',
+ tfdir / 'test_a_i64_z_extF80.c',
+ tfdir / 'test_a_i64_z_f128.c',
+ tfdir / 'test_a_f16_z_ui32_rx.c',
+ tfdir / 'test_a_f16_z_ui64_rx.c',
+ tfdir / 'test_a_f16_z_i32_rx.c',
+ tfdir / 'test_a_f16_z_i64_rx.c',
+ tfdir / 'test_a_f16_z_ui32_x.c',
+ tfdir / 'test_a_f16_z_ui64_x.c',
+ tfdir / 'test_a_f16_z_i32_x.c',
+ tfdir / 'test_a_f16_z_i64_x.c',
+ tfdir / 'test_a_f16_z_f32.c',
+ tfdir / 'test_a_f16_z_f64.c',
+ tfdir / 'test_a_f16_z_extF80.c',
+ tfdir / 'test_a_f16_z_f128.c',
+ tfdir / 'test_az_f16.c',
+ tfdir / 'test_az_f16_rx.c',
+ tfdir / 'test_abz_f16.c',
+ tfdir / 'test_abcz_f16.c',
+ tfdir / 'test_ab_f16_z_bool.c',
+ tfdir / 'test_a_f32_z_ui32_rx.c',
+ tfdir / 'test_a_f32_z_ui64_rx.c',
+ tfdir / 'test_a_f32_z_i32_rx.c',
+ tfdir / 'test_a_f32_z_i64_rx.c',
+ tfdir / 'test_a_f32_z_ui32_x.c',
+ tfdir / 'test_a_f32_z_ui64_x.c',
+ tfdir / 'test_a_f32_z_i32_x.c',
+ tfdir / 'test_a_f32_z_i64_x.c',
+ tfdir / 'test_a_f32_z_f16.c',
+ tfdir / 'test_a_f32_z_f64.c',
+ tfdir / 'test_a_f32_z_extF80.c',
+ tfdir / 'test_a_f32_z_f128.c',
+ tfdir / 'test_az_f32.c',
+ tfdir / 'test_az_f32_rx.c',
+ tfdir / 'test_abz_f32.c',
+ tfdir / 'test_abcz_f32.c',
+ tfdir / 'test_ab_f32_z_bool.c',
+ tfdir / 'test_a_f64_z_ui32_rx.c',
+ tfdir / 'test_a_f64_z_ui64_rx.c',
+ tfdir / 'test_a_f64_z_i32_rx.c',
+ tfdir / 'test_a_f64_z_i64_rx.c',
+ tfdir / 'test_a_f64_z_ui32_x.c',
+ tfdir / 'test_a_f64_z_ui64_x.c',
+ tfdir / 'test_a_f64_z_i32_x.c',
+ tfdir / 'test_a_f64_z_i64_x.c',
+ tfdir / 'test_a_f64_z_f16.c',
+ tfdir / 'test_a_f64_z_f32.c',
+ tfdir / 'test_a_f64_z_extF80.c',
+ tfdir / 'test_a_f64_z_f128.c',
+ tfdir / 'test_az_f64.c',
+ tfdir / 'test_az_f64_rx.c',
+ tfdir / 'test_abz_f64.c',
+ tfdir / 'test_abcz_f64.c',
+ tfdir / 'test_ab_f64_z_bool.c',
+ tfdir / 'test_a_extF80_z_ui32_rx.c',
+ tfdir / 'test_a_extF80_z_ui64_rx.c',
+ tfdir / 'test_a_extF80_z_i32_rx.c',
+ tfdir / 'test_a_extF80_z_i64_rx.c',
+ tfdir / 'test_a_extF80_z_ui32_x.c',
+ tfdir / 'test_a_extF80_z_ui64_x.c',
+ tfdir / 'test_a_extF80_z_i32_x.c',
+ tfdir / 'test_a_extF80_z_i64_x.c',
+ tfdir / 'test_a_extF80_z_f16.c',
+ tfdir / 'test_a_extF80_z_f32.c',
+ tfdir / 'test_a_extF80_z_f64.c',
+ tfdir / 'test_a_extF80_z_f128.c',
+ tfdir / 'test_az_extF80.c',
+ tfdir / 'test_az_extF80_rx.c',
+ tfdir / 'test_abz_extF80.c',
+ tfdir / 'test_ab_extF80_z_bool.c',
+ tfdir / 'test_a_f128_z_ui32_rx.c',
+ tfdir / 'test_a_f128_z_ui64_rx.c',
+ tfdir / 'test_a_f128_z_i32_rx.c',
+ tfdir / 'test_a_f128_z_i64_rx.c',
+ tfdir / 'test_a_f128_z_ui32_x.c',
+ tfdir / 'test_a_f128_z_ui64_x.c',
+ tfdir / 'test_a_f128_z_i32_x.c',
+ tfdir / 'test_a_f128_z_i64_x.c',
+ tfdir / 'test_a_f128_z_f16.c',
+ tfdir / 'test_a_f128_z_f32.c',
+ tfdir / 'test_a_f128_z_f64.c',
+ tfdir / 'test_a_f128_z_extF80.c',
+ tfdir / 'test_az_f128.c',
+ tfdir / 'test_az_f128_rx.c',
+ tfdir / 'test_abz_f128.c',
+ tfdir / 'test_abcz_f128.c',
+ tfdir / 'test_ab_f128_z_bool.c',
+]
+
+libsoftfloat_proj = subproject('berkeley-softfloat-3', required: true)
+libsoftfloat = libsoftfloat_proj.get_variable('libsoftfloat_dep')
+
+libtestfloat = static_library(
+ 'testfloat',
+ files(
+ tfdir / 'uint128_inline.c',
+ tfdir / 'uint128.c',
+ tfdir / 'fail.c',
+ tfdir / 'functions_common.c',
+ tfdir / 'functionInfos.c',
+ tfdir / 'standardFunctionInfos.c',
+ tfdir / 'random.c',
+ tfdir / 'genCases_common.c',
+ tfgencases,
+ tfdir / 'genCases_writeTestsTotal.c',
+ tfdir / 'verCases_inline.c',
+ tfdir / 'verCases_common.c',
+ tfdir / 'verCases_writeFunctionName.c',
+ tfdir / 'readHex.c',
+ tfdir / 'writeHex.c',
+ tfwritecase,
+ tfdir / 'testLoops_common.c',
+ tftest,
+ ),
+ dependencies: libsoftfloat.partial_dependency(includes: true, compile_args: true),
+ c_args: fpcflags,
+)
+
+libtestfloat_dep = declare_dependency(
+ link_with: libtestfloat,
+ dependencies: libsoftfloat,
+ include_directories: tfinc,
+ compile_args: fpcflags)
+
+libslowfloat = static_library(
+ 'slowfloat',
+ tfdir / 'slowfloat.c',
+ dependencies: libsoftfloat.partial_dependency(includes: true, compile_args: true),
+ c_args: fpcflags,
+)
+
+libslowfloat_dep = declare_dependency(
+ link_with: libslowfloat,
+ dependencies: libsoftfloat,
+ include_directories: tfinc,
+ compile_args: fpcflags)
diff --git a/subprojects/packagefiles/berkeley-testfloat-3/meson_options.txt b/subprojects/packagefiles/berkeley-testfloat-3/meson_options.txt
new file mode 100644
index 00000000000..868ae57e805
--- /dev/null
+++ b/subprojects/packagefiles/berkeley-testfloat-3/meson_options.txt
@@ -0,0 +1 @@
+option('defines', type : 'array', value : [])
diff --git a/tests/fp/meson.build b/tests/fp/meson.build
index f9ca6a93b49..cbc17392d67 100644
--- a/tests/fp/meson.build
+++ b/tests/fp/meson.build
@@ -7,13 +7,15 @@ if targetos == 'windows'
subdir_done()
endif
-fpcflags = [
+sfcflags = [
# softfloat defines
'-DSOFTFLOAT_ROUND_ODD',
'-DINLINE_LEVEL=5',
'-DSOFTFLOAT_FAST_DIV32TO16',
'-DSOFTFLOAT_FAST_DIV64TO32',
'-DSOFTFLOAT_FAST_INT64',
+]
+tfcflags = [
# testfloat defines
'-DFLOAT16',
'-DFLOAT64',
@@ -23,523 +25,16 @@ fpcflags = [
'-DLONG_DOUBLE_IS_EXTFLOAT80',
]
-sfdir = 'berkeley-softfloat-3/source'
-sfspedir = sfdir / '8086-SSE'
-tfdir = 'berkeley-testfloat-3/source'
+libsoftfloat_proj = subproject('berkeley-softfloat-3', required: true,
+ default_options: 'defines=' + ','.join(sfcflags))
+libsoftfloat = libsoftfloat_proj.get_variable('libsoftfloat_dep')
-sfinc = include_directories(sfdir / 'include', sfspedir)
+libtestfloat_proj = subproject('berkeley-testfloat-3', required: true,
+ default_options: 'defines=' + ','.join(tfcflags))
+libtestfloat = libtestfloat_proj.get_variable('libtestfloat_dep')
+libslowfloat = libtestfloat_proj.get_variable('libslowfloat_dep')
-tfcflags = [
- '-Wno-implicit-fallthrough',
- '-Wno-strict-prototypes',
- '-Wno-unknown-pragmas',
- '-Wno-uninitialized',
- '-Wno-missing-prototypes',
- '-Wno-return-type',
- '-Wno-unused-function',
- '-Wno-missing-format-attribute',
- '-Wno-error',
-]
-
-if cc.get_id() == 'clang'
- # Clang does not support '#pragma STDC FENV_ACCESS'
- tfcflags += [ '-Wno-ignored-pragmas' ]
-endif
-
-tfgencases = [
- tfdir / 'genCases_ui32.c',
- tfdir / 'genCases_ui64.c',
- tfdir / 'genCases_i32.c',
- tfdir / 'genCases_i64.c',
- tfdir / 'genCases_f16.c',
- tfdir / 'genCases_f32.c',
- tfdir / 'genCases_f64.c',
- tfdir / 'genCases_extF80.c',
- tfdir / 'genCases_f128.c',
-]
-
-tfwritecase = [
- tfdir / 'writeCase_a_ui32.c',
- tfdir / 'writeCase_a_ui64.c',
- tfdir / 'writeCase_a_f16.c',
- tfdir / 'writeCase_ab_f16.c',
- tfdir / 'writeCase_abc_f16.c',
- tfdir / 'writeCase_a_f32.c',
- tfdir / 'writeCase_ab_f32.c',
- tfdir / 'writeCase_abc_f32.c',
- tfdir / 'writeCase_a_f64.c',
- tfdir / 'writeCase_ab_f64.c',
- tfdir / 'writeCase_abc_f64.c',
- tfdir / 'writeCase_a_extF80M.c',
- tfdir / 'writeCase_ab_extF80M.c',
- tfdir / 'writeCase_a_f128M.c',
- tfdir / 'writeCase_ab_f128M.c',
- tfdir / 'writeCase_abc_f128M.c',
- tfdir / 'writeCase_z_bool.c',
- tfdir / 'writeCase_z_ui32.c',
- tfdir / 'writeCase_z_ui64.c',
- tfdir / 'writeCase_z_f16.c',
- tfdir / 'writeCase_z_f32.c',
- tfdir / 'writeCase_z_f64.c',
- tfdir / 'writeCase_z_extF80M.c',
- tfdir / 'writeCase_z_f128M.c',
-]
-
-tftest = [
- tfdir / 'test_a_ui32_z_f16.c',
- tfdir / 'test_a_ui32_z_f32.c',
- tfdir / 'test_a_ui32_z_f64.c',
- tfdir / 'test_a_ui32_z_extF80.c',
- tfdir / 'test_a_ui32_z_f128.c',
- tfdir / 'test_a_ui64_z_f16.c',
- tfdir / 'test_a_ui64_z_f32.c',
- tfdir / 'test_a_ui64_z_f64.c',
- tfdir / 'test_a_ui64_z_extF80.c',
- tfdir / 'test_a_ui64_z_f128.c',
- tfdir / 'test_a_i32_z_f16.c',
- tfdir / 'test_a_i32_z_f32.c',
- tfdir / 'test_a_i32_z_f64.c',
- tfdir / 'test_a_i32_z_extF80.c',
- tfdir / 'test_a_i32_z_f128.c',
- tfdir / 'test_a_i64_z_f16.c',
- tfdir / 'test_a_i64_z_f32.c',
- tfdir / 'test_a_i64_z_f64.c',
- tfdir / 'test_a_i64_z_extF80.c',
- tfdir / 'test_a_i64_z_f128.c',
- tfdir / 'test_a_f16_z_ui32_rx.c',
- tfdir / 'test_a_f16_z_ui64_rx.c',
- tfdir / 'test_a_f16_z_i32_rx.c',
- tfdir / 'test_a_f16_z_i64_rx.c',
- tfdir / 'test_a_f16_z_ui32_x.c',
- tfdir / 'test_a_f16_z_ui64_x.c',
- tfdir / 'test_a_f16_z_i32_x.c',
- tfdir / 'test_a_f16_z_i64_x.c',
- tfdir / 'test_a_f16_z_f32.c',
- tfdir / 'test_a_f16_z_f64.c',
- tfdir / 'test_a_f16_z_extF80.c',
- tfdir / 'test_a_f16_z_f128.c',
- tfdir / 'test_az_f16.c',
- tfdir / 'test_az_f16_rx.c',
- tfdir / 'test_abz_f16.c',
- tfdir / 'test_abcz_f16.c',
- tfdir / 'test_ab_f16_z_bool.c',
- tfdir / 'test_a_f32_z_ui32_rx.c',
- tfdir / 'test_a_f32_z_ui64_rx.c',
- tfdir / 'test_a_f32_z_i32_rx.c',
- tfdir / 'test_a_f32_z_i64_rx.c',
- tfdir / 'test_a_f32_z_ui32_x.c',
- tfdir / 'test_a_f32_z_ui64_x.c',
- tfdir / 'test_a_f32_z_i32_x.c',
- tfdir / 'test_a_f32_z_i64_x.c',
- tfdir / 'test_a_f32_z_f16.c',
- tfdir / 'test_a_f32_z_f64.c',
- tfdir / 'test_a_f32_z_extF80.c',
- tfdir / 'test_a_f32_z_f128.c',
- tfdir / 'test_az_f32.c',
- tfdir / 'test_az_f32_rx.c',
- tfdir / 'test_abz_f32.c',
- tfdir / 'test_abcz_f32.c',
- tfdir / 'test_ab_f32_z_bool.c',
- tfdir / 'test_a_f64_z_ui32_rx.c',
- tfdir / 'test_a_f64_z_ui64_rx.c',
- tfdir / 'test_a_f64_z_i32_rx.c',
- tfdir / 'test_a_f64_z_i64_rx.c',
- tfdir / 'test_a_f64_z_ui32_x.c',
- tfdir / 'test_a_f64_z_ui64_x.c',
- tfdir / 'test_a_f64_z_i32_x.c',
- tfdir / 'test_a_f64_z_i64_x.c',
- tfdir / 'test_a_f64_z_f16.c',
- tfdir / 'test_a_f64_z_f32.c',
- tfdir / 'test_a_f64_z_extF80.c',
- tfdir / 'test_a_f64_z_f128.c',
- tfdir / 'test_az_f64.c',
- tfdir / 'test_az_f64_rx.c',
- tfdir / 'test_abz_f64.c',
- tfdir / 'test_abcz_f64.c',
- tfdir / 'test_ab_f64_z_bool.c',
- tfdir / 'test_a_extF80_z_ui32_rx.c',
- tfdir / 'test_a_extF80_z_ui64_rx.c',
- tfdir / 'test_a_extF80_z_i32_rx.c',
- tfdir / 'test_a_extF80_z_i64_rx.c',
- tfdir / 'test_a_extF80_z_ui32_x.c',
- tfdir / 'test_a_extF80_z_ui64_x.c',
- tfdir / 'test_a_extF80_z_i32_x.c',
- tfdir / 'test_a_extF80_z_i64_x.c',
- tfdir / 'test_a_extF80_z_f16.c',
- tfdir / 'test_a_extF80_z_f32.c',
- tfdir / 'test_a_extF80_z_f64.c',
- tfdir / 'test_a_extF80_z_f128.c',
- tfdir / 'test_az_extF80.c',
- tfdir / 'test_az_extF80_rx.c',
- tfdir / 'test_abz_extF80.c',
- tfdir / 'test_ab_extF80_z_bool.c',
- tfdir / 'test_a_f128_z_ui32_rx.c',
- tfdir / 'test_a_f128_z_ui64_rx.c',
- tfdir / 'test_a_f128_z_i32_rx.c',
- tfdir / 'test_a_f128_z_i64_rx.c',
- tfdir / 'test_a_f128_z_ui32_x.c',
- tfdir / 'test_a_f128_z_ui64_x.c',
- tfdir / 'test_a_f128_z_i32_x.c',
- tfdir / 'test_a_f128_z_i64_x.c',
- tfdir / 'test_a_f128_z_f16.c',
- tfdir / 'test_a_f128_z_f32.c',
- tfdir / 'test_a_f128_z_f64.c',
- tfdir / 'test_a_f128_z_extF80.c',
- tfdir / 'test_az_f128.c',
- tfdir / 'test_az_f128_rx.c',
- tfdir / 'test_abz_f128.c',
- tfdir / 'test_abcz_f128.c',
- tfdir / 'test_ab_f128_z_bool.c',
-]
-
-libtestfloat = static_library(
- 'testfloat',
- files(
- tfdir / 'uint128_inline.c',
- tfdir / 'uint128.c',
- tfdir / 'fail.c',
- tfdir / 'functions_common.c',
- tfdir / 'functionInfos.c',
- tfdir / 'standardFunctionInfos.c',
- tfdir / 'random.c',
- tfdir / 'genCases_common.c',
- tfgencases,
- tfdir / 'genCases_writeTestsTotal.c',
- tfdir / 'verCases_inline.c',
- tfdir / 'verCases_common.c',
- tfdir / 'verCases_writeFunctionName.c',
- tfdir / 'readHex.c',
- tfdir / 'writeHex.c',
- tfwritecase,
- tfdir / 'testLoops_common.c',
- tftest,
- ),
- include_directories: sfinc,
- c_args: tfcflags + fpcflags,
-)
-
-sfcflags = [
- '-Wno-implicit-fallthrough',
- '-Wno-missing-prototypes',
- '-Wno-redundant-decls',
- '-Wno-return-type',
- '-Wno-error',
-]
-
-libsoftfloat = static_library(
- 'softfloat',
- files(
- # primitives
- sfdir / 's_eq128.c',
- sfdir / 's_le128.c',
- sfdir / 's_lt128.c',
- sfdir / 's_shortShiftLeft128.c',
- sfdir / 's_shortShiftRight128.c',
- sfdir / 's_shortShiftRightJam64.c',
- sfdir / 's_shortShiftRightJam64Extra.c',
- sfdir / 's_shortShiftRightJam128.c',
- sfdir / 's_shortShiftRightJam128Extra.c',
- sfdir / 's_shiftRightJam32.c',
- sfdir / 's_shiftRightJam64.c',
- sfdir / 's_shiftRightJam64Extra.c',
- sfdir / 's_shiftRightJam128.c',
- sfdir / 's_shiftRightJam128Extra.c',
- sfdir / 's_shiftRightJam256M.c',
- sfdir / 's_countLeadingZeros8.c',
- sfdir / 's_countLeadingZeros16.c',
- sfdir / 's_countLeadingZeros32.c',
- sfdir / 's_countLeadingZeros64.c',
- sfdir / 's_add128.c',
- sfdir / 's_add256M.c',
- sfdir / 's_sub128.c',
- sfdir / 's_sub256M.c',
- sfdir / 's_mul64ByShifted32To128.c',
- sfdir / 's_mul64To128.c',
- sfdir / 's_mul128By32.c',
- sfdir / 's_mul128To256M.c',
- sfdir / 's_approxRecip_1Ks.c',
- sfdir / 's_approxRecip32_1.c',
- sfdir / 's_approxRecipSqrt_1Ks.c',
- sfdir / 's_approxRecipSqrt32_1.c',
- # others
- sfdir / 's_roundToUI32.c',
- sfdir / 's_roundToUI64.c',
- sfdir / 's_roundToI32.c',
- sfdir / 's_roundToI64.c',
- sfdir / 's_normSubnormalF16Sig.c',
- sfdir / 's_roundPackToF16.c',
- sfdir / 's_normRoundPackToF16.c',
- sfdir / 's_addMagsF16.c',
- sfdir / 's_subMagsF16.c',
- sfdir / 's_mulAddF16.c',
- sfdir / 's_normSubnormalF32Sig.c',
- sfdir / 's_roundPackToF32.c',
- sfdir / 's_normRoundPackToF32.c',
- sfdir / 's_addMagsF32.c',
- sfdir / 's_subMagsF32.c',
- sfdir / 's_mulAddF32.c',
- sfdir / 's_normSubnormalF64Sig.c',
- sfdir / 's_roundPackToF64.c',
- sfdir / 's_normRoundPackToF64.c',
- sfdir / 's_addMagsF64.c',
- sfdir / 's_subMagsF64.c',
- sfdir / 's_mulAddF64.c',
- sfdir / 's_normSubnormalExtF80Sig.c',
- sfdir / 's_roundPackToExtF80.c',
- sfdir / 's_normRoundPackToExtF80.c',
- sfdir / 's_addMagsExtF80.c',
- sfdir / 's_subMagsExtF80.c',
- sfdir / 's_normSubnormalF128Sig.c',
- sfdir / 's_roundPackToF128.c',
- sfdir / 's_normRoundPackToF128.c',
- sfdir / 's_addMagsF128.c',
- sfdir / 's_subMagsF128.c',
- sfdir / 's_mulAddF128.c',
- sfdir / 'softfloat_state.c',
- sfdir / 'ui32_to_f16.c',
- sfdir / 'ui32_to_f32.c',
- sfdir / 'ui32_to_f64.c',
- sfdir / 'ui32_to_extF80.c',
- sfdir / 'ui32_to_extF80M.c',
- sfdir / 'ui32_to_f128.c',
- sfdir / 'ui32_to_f128M.c',
- sfdir / 'ui64_to_f16.c',
- sfdir / 'ui64_to_f32.c',
- sfdir / 'ui64_to_f64.c',
- sfdir / 'ui64_to_extF80.c',
- sfdir / 'ui64_to_extF80M.c',
- sfdir / 'ui64_to_f128.c',
- sfdir / 'ui64_to_f128M.c',
- sfdir / 'i32_to_f16.c',
- sfdir / 'i32_to_f32.c',
- sfdir / 'i32_to_f64.c',
- sfdir / 'i32_to_extF80.c',
- sfdir / 'i32_to_extF80M.c',
- sfdir / 'i32_to_f128.c',
- sfdir / 'i32_to_f128M.c',
- sfdir / 'i64_to_f16.c',
- sfdir / 'i64_to_f32.c',
- sfdir / 'i64_to_f64.c',
- sfdir / 'i64_to_extF80.c',
- sfdir / 'i64_to_extF80M.c',
- sfdir / 'i64_to_f128.c',
- sfdir / 'i64_to_f128M.c',
- sfdir / 'f16_to_ui32.c',
- sfdir / 'f16_to_ui64.c',
- sfdir / 'f16_to_i32.c',
- sfdir / 'f16_to_i64.c',
- sfdir / 'f16_to_ui32_r_minMag.c',
- sfdir / 'f16_to_ui64_r_minMag.c',
- sfdir / 'f16_to_i32_r_minMag.c',
- sfdir / 'f16_to_i64_r_minMag.c',
- sfdir / 'f16_to_f32.c',
- sfdir / 'f16_to_f64.c',
- sfdir / 'f16_to_extF80.c',
- sfdir / 'f16_to_extF80M.c',
- sfdir / 'f16_to_f128.c',
- sfdir / 'f16_to_f128M.c',
- sfdir / 'f16_roundToInt.c',
- sfdir / 'f16_add.c',
- sfdir / 'f16_sub.c',
- sfdir / 'f16_mul.c',
- sfdir / 'f16_mulAdd.c',
- sfdir / 'f16_div.c',
- sfdir / 'f16_rem.c',
- sfdir / 'f16_sqrt.c',
- sfdir / 'f16_eq.c',
- sfdir / 'f16_le.c',
- sfdir / 'f16_lt.c',
- sfdir / 'f16_eq_signaling.c',
- sfdir / 'f16_le_quiet.c',
- sfdir / 'f16_lt_quiet.c',
- sfdir / 'f16_isSignalingNaN.c',
- sfdir / 'f32_to_ui32.c',
- sfdir / 'f32_to_ui64.c',
- sfdir / 'f32_to_i32.c',
- sfdir / 'f32_to_i64.c',
- sfdir / 'f32_to_ui32_r_minMag.c',
- sfdir / 'f32_to_ui64_r_minMag.c',
- sfdir / 'f32_to_i32_r_minMag.c',
- sfdir / 'f32_to_i64_r_minMag.c',
- sfdir / 'f32_to_f16.c',
- sfdir / 'f32_to_f64.c',
- sfdir / 'f32_to_extF80.c',
- sfdir / 'f32_to_extF80M.c',
- sfdir / 'f32_to_f128.c',
- sfdir / 'f32_to_f128M.c',
- sfdir / 'f32_roundToInt.c',
- sfdir / 'f32_add.c',
- sfdir / 'f32_sub.c',
- sfdir / 'f32_mul.c',
- sfdir / 'f32_mulAdd.c',
- sfdir / 'f32_div.c',
- sfdir / 'f32_rem.c',
- sfdir / 'f32_sqrt.c',
- sfdir / 'f32_eq.c',
- sfdir / 'f32_le.c',
- sfdir / 'f32_lt.c',
- sfdir / 'f32_eq_signaling.c',
- sfdir / 'f32_le_quiet.c',
- sfdir / 'f32_lt_quiet.c',
- sfdir / 'f32_isSignalingNaN.c',
- sfdir / 'f64_to_ui32.c',
- sfdir / 'f64_to_ui64.c',
- sfdir / 'f64_to_i32.c',
- sfdir / 'f64_to_i64.c',
- sfdir / 'f64_to_ui32_r_minMag.c',
- sfdir / 'f64_to_ui64_r_minMag.c',
- sfdir / 'f64_to_i32_r_minMag.c',
- sfdir / 'f64_to_i64_r_minMag.c',
- sfdir / 'f64_to_f16.c',
- sfdir / 'f64_to_f32.c',
- sfdir / 'f64_to_extF80.c',
- sfdir / 'f64_to_extF80M.c',
- sfdir / 'f64_to_f128.c',
- sfdir / 'f64_to_f128M.c',
- sfdir / 'f64_roundToInt.c',
- sfdir / 'f64_add.c',
- sfdir / 'f64_sub.c',
- sfdir / 'f64_mul.c',
- sfdir / 'f64_mulAdd.c',
- sfdir / 'f64_div.c',
- sfdir / 'f64_rem.c',
- sfdir / 'f64_sqrt.c',
- sfdir / 'f64_eq.c',
- sfdir / 'f64_le.c',
- sfdir / 'f64_lt.c',
- sfdir / 'f64_eq_signaling.c',
- sfdir / 'f64_le_quiet.c',
- sfdir / 'f64_lt_quiet.c',
- sfdir / 'f64_isSignalingNaN.c',
- sfdir / 'extF80_to_ui32.c',
- sfdir / 'extF80_to_ui64.c',
- sfdir / 'extF80_to_i32.c',
- sfdir / 'extF80_to_i64.c',
- sfdir / 'extF80_to_ui32_r_minMag.c',
- sfdir / 'extF80_to_ui64_r_minMag.c',
- sfdir / 'extF80_to_i32_r_minMag.c',
- sfdir / 'extF80_to_i64_r_minMag.c',
- sfdir / 'extF80_to_f16.c',
- sfdir / 'extF80_to_f32.c',
- sfdir / 'extF80_to_f64.c',
- sfdir / 'extF80_to_f128.c',
- sfdir / 'extF80_roundToInt.c',
- sfdir / 'extF80_add.c',
- sfdir / 'extF80_sub.c',
- sfdir / 'extF80_mul.c',
- sfdir / 'extF80_div.c',
- sfdir / 'extF80_rem.c',
- sfdir / 'extF80_sqrt.c',
- sfdir / 'extF80_eq.c',
- sfdir / 'extF80_le.c',
- sfdir / 'extF80_lt.c',
- sfdir / 'extF80_eq_signaling.c',
- sfdir / 'extF80_le_quiet.c',
- sfdir / 'extF80_lt_quiet.c',
- sfdir / 'extF80_isSignalingNaN.c',
- sfdir / 'extF80M_to_ui32.c',
- sfdir / 'extF80M_to_ui64.c',
- sfdir / 'extF80M_to_i32.c',
- sfdir / 'extF80M_to_i64.c',
- sfdir / 'extF80M_to_ui32_r_minMag.c',
- sfdir / 'extF80M_to_ui64_r_minMag.c',
- sfdir / 'extF80M_to_i32_r_minMag.c',
- sfdir / 'extF80M_to_i64_r_minMag.c',
- sfdir / 'extF80M_to_f16.c',
- sfdir / 'extF80M_to_f32.c',
- sfdir / 'extF80M_to_f64.c',
- sfdir / 'extF80M_to_f128M.c',
- sfdir / 'extF80M_roundToInt.c',
- sfdir / 'extF80M_add.c',
- sfdir / 'extF80M_sub.c',
- sfdir / 'extF80M_mul.c',
- sfdir / 'extF80M_div.c',
- sfdir / 'extF80M_rem.c',
- sfdir / 'extF80M_sqrt.c',
- sfdir / 'extF80M_eq.c',
- sfdir / 'extF80M_le.c',
- sfdir / 'extF80M_lt.c',
- sfdir / 'extF80M_eq_signaling.c',
- sfdir / 'extF80M_le_quiet.c',
- sfdir / 'extF80M_lt_quiet.c',
- sfdir / 'f128_to_ui32.c',
- sfdir / 'f128_to_ui64.c',
- sfdir / 'f128_to_i32.c',
- sfdir / 'f128_to_i64.c',
- sfdir / 'f128_to_ui32_r_minMag.c',
- sfdir / 'f128_to_ui64_r_minMag.c',
- sfdir / 'f128_to_i32_r_minMag.c',
- sfdir / 'f128_to_i64_r_minMag.c',
- sfdir / 'f128_to_f16.c',
- sfdir / 'f128_to_f32.c',
- sfdir / 'f128_to_extF80.c',
- sfdir / 'f128_to_f64.c',
- sfdir / 'f128_roundToInt.c',
- sfdir / 'f128_add.c',
- sfdir / 'f128_sub.c',
- sfdir / 'f128_mul.c',
- sfdir / 'f128_mulAdd.c',
- sfdir / 'f128_div.c',
- sfdir / 'f128_rem.c',
- sfdir / 'f128_sqrt.c',
- sfdir / 'f128_eq.c',
- sfdir / 'f128_le.c',
- sfdir / 'f128_lt.c',
- sfdir / 'f128_eq_signaling.c',
- sfdir / 'f128_le_quiet.c',
- sfdir / 'f128_lt_quiet.c',
- sfdir / 'f128_isSignalingNaN.c',
- sfdir / 'f128M_to_ui32.c',
- sfdir / 'f128M_to_ui64.c',
- sfdir / 'f128M_to_i32.c',
- sfdir / 'f128M_to_i64.c',
- sfdir / 'f128M_to_ui32_r_minMag.c',
- sfdir / 'f128M_to_ui64_r_minMag.c',
- sfdir / 'f128M_to_i32_r_minMag.c',
- sfdir / 'f128M_to_i64_r_minMag.c',
- sfdir / 'f128M_to_f16.c',
- sfdir / 'f128M_to_f32.c',
- sfdir / 'f128M_to_extF80M.c',
- sfdir / 'f128M_to_f64.c',
- sfdir / 'f128M_roundToInt.c',
- sfdir / 'f128M_add.c',
- sfdir / 'f128M_sub.c',
- sfdir / 'f128M_mul.c',
- sfdir / 'f128M_mulAdd.c',
- sfdir / 'f128M_div.c',
- sfdir / 'f128M_rem.c',
- sfdir / 'f128M_sqrt.c',
- sfdir / 'f128M_eq.c',
- sfdir / 'f128M_le.c',
- sfdir / 'f128M_lt.c',
- sfdir / 'f128M_eq_signaling.c',
- sfdir / 'f128M_le_quiet.c',
- sfdir / 'f128M_lt_quiet.c',
- # spe
- sfspedir / 'softfloat_raiseFlags.c',
- sfspedir / 's_f16UIToCommonNaN.c',
- sfspedir / 's_commonNaNToF16UI.c',
- sfspedir / 's_propagateNaNF16UI.c',
- sfspedir / 's_f32UIToCommonNaN.c',
- sfspedir / 's_commonNaNToF32UI.c',
- sfspedir / 's_propagateNaNF32UI.c',
- sfspedir / 's_f64UIToCommonNaN.c',
- sfspedir / 's_commonNaNToF64UI.c',
- sfspedir / 's_propagateNaNF64UI.c',
- sfspedir / 'extF80M_isSignalingNaN.c',
- sfspedir / 's_extF80UIToCommonNaN.c',
- sfspedir / 's_commonNaNToExtF80UI.c',
- sfspedir / 's_propagateNaNExtF80UI.c',
- sfspedir / 'f128M_isSignalingNaN.c',
- sfspedir / 's_f128UIToCommonNaN.c',
- sfspedir / 's_commonNaNToF128UI.c',
- sfspedir / 's_propagateNaNF128UI.c',
- ),
- include_directories: sfinc,
- c_args: sfcflags + fpcflags,
-)
-
-fpcflags += [
+fpcflags = [
# work around TARGET_* poisoning
'-DHW_POISON_H',
# define a target to match testfloat's implementation-defined choices, such as
@@ -551,10 +46,8 @@ fpcflags += [
fptest = executable(
'fp-test',
- ['fp-test.c', tfdir / 'slowfloat.c', '../../fpu/softfloat.c'],
- link_with: [libtestfloat, libsoftfloat],
- dependencies: [qemuutil],
- include_directories: [sfinc, include_directories(tfdir)],
+ ['fp-test.c', '../../fpu/softfloat.c'],
+ dependencies: [qemuutil, libsoftfloat, libtestfloat, libslowfloat],
c_args: fpcflags,
)
softfloat_conv_tests = {
@@ -636,18 +129,14 @@ test('fp-test-mulAdd', fptest,
executable(
'fp-bench',
['fp-bench.c', '../../fpu/softfloat.c'],
- link_with: [libtestfloat, libsoftfloat],
- dependencies: [qemuutil],
- include_directories: [sfinc, include_directories(tfdir)],
+ dependencies: [qemuutil, libtestfloat, libsoftfloat],
c_args: fpcflags,
)
fptestlog2 = executable(
'fp-test-log2',
['fp-test-log2.c', '../../fpu/softfloat.c'],
- link_with: [libsoftfloat],
- dependencies: [qemuutil],
- include_directories: [sfinc],
+ dependencies: [qemuutil, libsoftfloat],
c_args: fpcflags,
)
test('fp-test-log2', fptestlog2,
--
2.40.1
^ permalink raw reply related [flat|nested] 32+ messages in thread
* [PATCH 09/10] build: remove git submodule handling from main makefile
2023-06-05 9:52 [PATCH v2 00/10] meson: replace submodules with wrap files Paolo Bonzini
` (7 preceding siblings ...)
2023-06-05 9:52 ` [PATCH 08/10] meson: subprojects: replace berkeley-{soft, test}float-3 with wraps Paolo Bonzini
@ 2023-06-05 9:52 ` Paolo Bonzini
2023-06-06 9:59 ` Daniel P. Berrangé
2023-06-05 9:52 ` [PATCH 10/10] configure: remove --with-git-submodules= Paolo Bonzini
2023-06-07 7:41 ` [PATCH v2 00/10] meson: replace submodules with wrap files Michal Prívozník
10 siblings, 1 reply; 32+ messages in thread
From: Paolo Bonzini @ 2023-06-05 9:52 UTC (permalink / raw)
To: qemu-devel; +Cc: thuth, berrange
The only remaining user of submodules at build time is roms/SLOF,
which is handled in pc-bios/s390-ccw/Makefile. Remove the relevant
code from the main makefile.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
.gitlab-ci.d/buildtest-template.yml | 3 +--
Makefile | 10 ----------
configure | 7 -------
meson.build | 1 -
4 files changed, 1 insertion(+), 20 deletions(-)
diff --git a/.gitlab-ci.d/buildtest-template.yml b/.gitlab-ci.d/buildtest-template.yml
index d01d504ec5f..76ff1dfcb6f 100644
--- a/.gitlab-ci.d/buildtest-template.yml
+++ b/.gitlab-ci.d/buildtest-template.yml
@@ -42,8 +42,7 @@
stage: test
image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:latest
script:
- - scripts/git-submodule.sh update
- roms/SLOF $(sed -n '/GIT_SUBMODULES=/ s/.*=// p' build/config-host.mak)
+ - scripts/git-submodule.sh update roms/SLOF
- meson subprojects download $(cd build/subprojects && echo *)
- cd build
- find . -type f -exec touch {} +
diff --git a/Makefile b/Makefile
index d68196acb9e..b22bf6fba12 100644
--- a/Makefile
+++ b/Makefile
@@ -45,16 +45,6 @@ include config-host.mak
include Makefile.prereqs
Makefile.prereqs: config-host.mak
-git-submodule-update:
-.git-submodule-status: git-submodule-update config-host.mak
-Makefile: .git-submodule-status
-
-.PHONY: git-submodule-update
-git-submodule-update:
-ifneq ($(GIT_SUBMODULES_ACTION),ignore)
- $(quiet-@)GIT=git "$(SRC_PATH)/scripts/git-submodule.sh" $(GIT_SUBMODULES_ACTION) $(GIT_SUBMODULES)
-endif
-
# 0. ensure the build tree is okay
# Check that we're not trying to do an out-of-tree build from
diff --git a/configure b/configure
index 4dad32938df..bc0660f5a32 100755
--- a/configure
+++ b/configure
@@ -253,7 +253,6 @@ else
git_submodules_action="ignore"
fi
-git_submodules=""
git="git"
debug_tcg="no"
docs="auto"
@@ -1657,18 +1656,12 @@ fi
#######################################
# generate config-host.mak
-if ! (GIT=git "$source_path/scripts/git-submodule.sh" "$git_submodules_action" "$git_submodules"); then
- exit 1
-fi
-
config_host_mak="config-host.mak"
echo "# Automatically generated by configure - do not modify" > $config_host_mak
echo >> $config_host_mak
echo all: >> $config_host_mak
-echo "GIT_SUBMODULES=$git_submodules" >> $config_host_mak
-echo "GIT_SUBMODULES_ACTION=$git_submodules_action" >> $config_host_mak
if test "$debug_tcg" = "yes" ; then
echo "CONFIG_DEBUG_TCG=y" >> $config_host_mak
diff --git a/meson.build b/meson.build
index badeeffd529..10df2eb1961 100644
--- a/meson.build
+++ b/meson.build
@@ -4008,7 +4008,6 @@ endif
summary_info += {'Doc directory': get_option('prefix') / get_option('docdir')}
summary_info += {'Build directory': meson.current_build_dir()}
summary_info += {'Source path': meson.current_source_dir()}
-summary_info += {'GIT submodules': config_host['GIT_SUBMODULES']}
summary(summary_info, bool_yn: true, section: 'Directories')
# Host binaries
--
2.40.1
^ permalink raw reply related [flat|nested] 32+ messages in thread
* [PATCH 10/10] configure: remove --with-git-submodules=
2023-06-05 9:52 [PATCH v2 00/10] meson: replace submodules with wrap files Paolo Bonzini
` (8 preceding siblings ...)
2023-06-05 9:52 ` [PATCH 09/10] build: remove git submodule handling from main makefile Paolo Bonzini
@ 2023-06-05 9:52 ` Paolo Bonzini
2023-06-06 10:00 ` Daniel P. Berrangé
2023-06-07 7:41 ` [PATCH v2 00/10] meson: replace submodules with wrap files Michal Prívozník
10 siblings, 1 reply; 32+ messages in thread
From: Paolo Bonzini @ 2023-06-05 9:52 UTC (permalink / raw)
To: qemu-devel; +Cc: thuth, berrange
Reuse --enable/--disable-download to control git submodules as well.
Adjust the error messages of git-submodule.sh to refer to the new
option.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
configure | 40 +++++--------------
.../ci/org.centos/stream/8/x86_64/configure | 1 -
scripts/git-submodule.sh | 8 ++--
3 files changed, 12 insertions(+), 37 deletions(-)
diff --git a/configure b/configure
index bc0660f5a32..8765b88e12f 100755
--- a/configure
+++ b/configure
@@ -246,13 +246,7 @@ for opt do
done
-if test -e "$source_path/.git"
-then
- git_submodules_action="update"
-else
- git_submodules_action="ignore"
-fi
-
+git_submodules_action="update"
git="git"
debug_tcg="no"
docs="auto"
@@ -738,12 +732,9 @@ for opt do
;;
--disable-cfi) cfi="false"
;;
- --with-git-submodules=*)
- git_submodules_action="$optarg"
+ --disable-download) download="disabled"; git_submodules_action=validate;
;;
- --disable-download) download="disabled"
- ;;
- --enable-download) download="enabled"
+ --enable-download) download="enabled"; git_submodules_action=update;
;;
--enable-plugins) if test "$mingw32" = "yes"; then
error_exit "TCG plugins not currently supported on Windows platforms"
@@ -765,6 +756,11 @@ for opt do
esac
done
+if ! test -e "$source_path/.git"
+then
+ git_submodules_action="ignore"
+fi
+
# test for any invalid configuration combinations
if test "$plugins" = "yes" -a "$tcg" = "disabled"; then
error_exit "Can't enable plugins on non-TCG builds"
@@ -796,21 +792,6 @@ then
exit 1
fi
-case $git_submodules_action in
- update|validate)
- if test ! -e "$source_path/.git" || ! has git; then
- echo "ERROR: cannot $git_submodules_action git submodules without .git"
- exit 1
- fi
- ;;
- ignore)
- ;;
- *)
- echo "ERROR: invalid --with-git-submodules= value '$git_submodules_action'"
- exit 1
- ;;
-esac
-
default_target_list=""
mak_wilds=""
@@ -877,9 +858,6 @@ Advanced options (experts only):
--python=PYTHON use specified python [$python]
--ninja=NINJA use specified ninja [$ninja]
--smbd=SMBD use specified smbd [$smbd]
- --with-git-submodules=update update git submodules (default if .git dir exists)
- --with-git-submodules=validate fail if git submodules are not up to date
- --with-git-submodules=ignore do not update or check git submodules (default if no .git dir)
--static enable static build [$static]
--bindir=PATH install binaries in PATH
--with-suffix=SUFFIX suffix for QEMU data inside datadir/libdir/sysconfdir/docdir [$qemu_suffix]
@@ -1024,7 +1002,7 @@ fi
# Consult white-list to determine whether to enable werror
# by default. Only enable by default for git builds
if test -z "$werror" ; then
- if test "$git_submodules_action" != "ignore" && \
+ if test -e "$source_path/.git" && \
{ test "$linux" = "yes" || test "$mingw32" = "yes"; }; then
werror="yes"
else
diff --git a/scripts/ci/org.centos/stream/8/x86_64/configure b/scripts/ci/org.centos/stream/8/x86_64/configure
index de76510978f..d02b09a4b9b 100755
--- a/scripts/ci/org.centos/stream/8/x86_64/configure
+++ b/scripts/ci/org.centos/stream/8/x86_64/configure
@@ -29,7 +29,6 @@
--extra-cflags="-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection" \
--with-suffix="qemu-kvm" \
--firmwarepath=/usr/share/qemu-firmware \
---with-git-submodules=update \
--target-list="x86_64-softmmu" \
--block-drv-rw-whitelist="qcow2,raw,file,host_device,nbd,iscsi,rbd,blkdebug,luks,null-co,nvme,copy-on-read,throttle,gluster" \
--audio-drv-list="" \
diff --git a/scripts/git-submodule.sh b/scripts/git-submodule.sh
index 38b55c90e11..11fad2137cd 100755
--- a/scripts/git-submodule.sh
+++ b/scripts/git-submodule.sh
@@ -9,7 +9,7 @@ command=$1
shift
maybe_modules="$@"
-# if --with-git-submodules=ignore, do nothing
+# if not running in a git checkout, do nothing
test "$command" = "ignore" && exit 0
test -z "$GIT" && GIT=$(command -v git)
@@ -24,7 +24,7 @@ update_error() {
echo "enable use of a transparent proxy), please disable automatic"
echo "GIT submodule checkout with:"
echo
- echo " $ ./configure --with-git-submodules=validate"
+ echo " $ ./configure --disable-download"
echo
echo "and then manually update submodules prior to running make, with:"
echo
@@ -39,9 +39,7 @@ validate_error() {
echo "configured for validate only. Please run"
echo " scripts/git-submodule.sh update $maybe_modules"
echo "from the source directory or call configure with"
- echo " --with-git-submodules=update"
- echo "To disable GIT submodules validation, use"
- echo " --with-git-submodules=ignore"
+ echo " --enable-download"
fi
exit 1
}
--
2.40.1
^ permalink raw reply related [flat|nested] 32+ messages in thread
* Re: [PATCH 01/10] configure: remove --with-git= option
2023-06-05 9:52 ` [PATCH 01/10] configure: remove --with-git= option Paolo Bonzini
@ 2023-06-05 10:27 ` Alex Bennée
2023-06-05 11:17 ` Thomas Huth
1 sibling, 0 replies; 32+ messages in thread
From: Alex Bennée @ 2023-06-05 10:27 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: thuth, berrange, qemu-devel
Paolo Bonzini <pbonzini@redhat.com> writes:
> The scenario for which --with-git= was introduced was to use a SOCKS proxy
> such as tsocks. However, this was back in 2017 when QEMU's submodules
> used the git:// protocol, and it is not as important when using the
> "smart HTTP" backend; for example, neither "meson subprojects download"
> nor scripts/checkpatch.pl do not obey the GIT environment variable.
>
> So remove the knob, but test for the presence of git in the configure and
> git-submodule.sh scripts, and suggest using --with-git-submodules=validate
> + a manual invocation of git-submodule.sh when git does not work. Hopefully
> in the future the GIT environment variable will be supported by Meson.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
--
Alex Bennée
Virtualisation Tech Lead @ Linaro
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH 02/10] configure: rename --enable-pypi to --enable-download, control subprojects too
2023-06-05 9:52 ` [PATCH 02/10] configure: rename --enable-pypi to --enable-download, control subprojects too Paolo Bonzini
@ 2023-06-05 10:28 ` Alex Bennée
0 siblings, 0 replies; 32+ messages in thread
From: Alex Bennée @ 2023-06-05 10:28 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: thuth, berrange, qemu-devel
Paolo Bonzini <pbonzini@redhat.com> writes:
> The behavior of --{enable,disable}-pypi is similar to that of
> -Dwrapmode={default,nodownload} respectively. In particular,
> in both cases a feature needs to be explicitly enabled for the
> dependency to be downloaded.
>
> So, use a single option to control both cases. Now, --enable-slirp
> will trigger cloning and building of libslirp if the .pc file
> is not found on the machine.
>
> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
> Reviewed-by: Thomas Huth <thuth@redhat.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
--
Alex Bennée
Virtualisation Tech Lead @ Linaro
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH 03/10] git-submodule: allow partial update of .git-submodule-status
2023-06-05 9:52 ` [PATCH 03/10] git-submodule: allow partial update of .git-submodule-status Paolo Bonzini
@ 2023-06-05 10:55 ` Alex Bennée
0 siblings, 0 replies; 32+ messages in thread
From: Alex Bennée @ 2023-06-05 10:55 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: thuth, berrange, qemu-devel
Paolo Bonzini <pbonzini@redhat.com> writes:
> Allow a specific subdirectory to run git-submodule.sh with only a
> subset of submodules, without removing the others from the
> .git-submodule-status file.
>
> This also allows scripts/git-submodule.sh to be more lenient:
> validating an empty set of submodules is not a mistake.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
--
Alex Bennée
Virtualisation Tech Lead @ Linaro
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH 04/10] build: log submodule update from git-submodule.sh
2023-06-05 9:52 ` [PATCH 04/10] build: log submodule update from git-submodule.sh Paolo Bonzini
@ 2023-06-05 10:56 ` Alex Bennée
2023-06-05 11:11 ` Alex Bennée
1 sibling, 0 replies; 32+ messages in thread
From: Alex Bennée @ 2023-06-05 10:56 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: thuth, berrange, qemu-devel
Paolo Bonzini <pbonzini@redhat.com> writes:
> Print exactly which submodules have been updated, by reusing the logic of
> "git-submodule.sh validate" after executing "git submodule update --init'.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
--
Alex Bennée
Virtualisation Tech Lead @ Linaro
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH 04/10] build: log submodule update from git-submodule.sh
2023-06-05 9:52 ` [PATCH 04/10] build: log submodule update from git-submodule.sh Paolo Bonzini
2023-06-05 10:56 ` Alex Bennée
@ 2023-06-05 11:11 ` Alex Bennée
1 sibling, 0 replies; 32+ messages in thread
From: Alex Bennée @ 2023-06-05 11:11 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: thuth, berrange, qemu-devel
Paolo Bonzini <pbonzini@redhat.com> writes:
> Print exactly which submodules have been updated, by reusing the logic of
> "git-submodule.sh validate" after executing "git submodule update --init'.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
--
Alex Bennée
Virtualisation Tech Lead @ Linaro
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH 01/10] configure: remove --with-git= option
2023-06-05 9:52 ` [PATCH 01/10] configure: remove --with-git= option Paolo Bonzini
2023-06-05 10:27 ` Alex Bennée
@ 2023-06-05 11:17 ` Thomas Huth
1 sibling, 0 replies; 32+ messages in thread
From: Thomas Huth @ 2023-06-05 11:17 UTC (permalink / raw)
To: Paolo Bonzini, qemu-devel; +Cc: berrange
On 05/06/2023 11.52, Paolo Bonzini wrote:
> The scenario for which --with-git= was introduced was to use a SOCKS proxy
> such as tsocks. However, this was back in 2017 when QEMU's submodules
> used the git:// protocol, and it is not as important when using the
> "smart HTTP" backend; for example, neither "meson subprojects download"
> nor scripts/checkpatch.pl do not obey the GIT environment variable.
Either "neither ... nor" or "not", but not both, please.
With the sentenced fixed:
Reviewed-by: Thomas Huth <thuth@redhat.com>
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH 05/10] meson: subprojects: replace submodules with wrap files
2023-06-05 9:52 ` [PATCH 05/10] meson: subprojects: replace submodules with wrap files Paolo Bonzini
@ 2023-06-06 9:54 ` Daniel P. Berrangé
0 siblings, 0 replies; 32+ messages in thread
From: Daniel P. Berrangé @ 2023-06-06 9:54 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: qemu-devel, thuth
On Mon, Jun 05, 2023 at 11:52:18AM +0200, Paolo Bonzini wrote:
> Compared to submodules, .wrap files have several advantages:
>
> * option parsing and downloading is delegated to meson
>
> * the commit is stored in a text file instead of a magic entry in the
> git tree object
>
> * we could stop shipping external dependencies that are only used as a
> fallback, but not break compilation on platforms that lack them.
> For example it may make sense to download dtc at build time, controlled
> by --enable-download, even when building from a tarball. Right now,
> this patch does the opposite: make-release treats dtc like libvfio-user
> (which is not stable API and therefore hasn't found its way into any
> distros) and keycodemap (which is a copylib, for better or worse).
>
> dependency() can fall back to a wrap automatically. However, this
> is only possible for libraries that come with a .pc file, and this
> is not very common for libfdt even though the upstream project in
> principle provides it; it also removes the control that we provide with
> --enable-fdt={system,internal}. Therefore, the logic to pick system
> vs. internal libfdt is left untouched.
>
> --enable-fdt=git is removed; it was already a synonym for
> --enable-fdt=internal.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> .gitlab-ci.d/buildtest-template.yml | 1 +
> .gitmodules | 9 ----
> configure | 77 ++++++++++++-----------------
> meson.build | 15 +-----
> scripts/archive-source.sh | 11 ++++-
> scripts/make-release | 5 ++
> subprojects/.gitignore | 3 ++
> subprojects/dtc | 1 -
> subprojects/dtc.wrap | 4 ++
> subprojects/keycodemapdb | 1 -
> subprojects/keycodemapdb.wrap | 4 ++
> subprojects/libvfio-user | 1 -
> subprojects/libvfio-user.wrap | 4 ++
> 13 files changed, 63 insertions(+), 73 deletions(-)
> delete mode 160000 subprojects/dtc
> create mode 100644 subprojects/dtc.wrap
> delete mode 160000 subprojects/keycodemapdb
> create mode 100644 subprojects/keycodemapdb.wrap
> delete mode 160000 subprojects/libvfio-user
> create mode 100644 subprojects/libvfio-user.wrap
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH 06/10] configure: move SLOF submodule handling to pc-bios/s390-ccw
2023-06-05 9:52 ` [PATCH 06/10] configure: move SLOF submodule handling to pc-bios/s390-ccw Paolo Bonzini
@ 2023-06-06 9:56 ` Daniel P. Berrangé
2023-06-06 10:07 ` Thomas Huth
1 sibling, 0 replies; 32+ messages in thread
From: Daniel P. Berrangé @ 2023-06-06 9:56 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: qemu-devel, thuth
On Mon, Jun 05, 2023 at 11:52:19AM +0200, Paolo Bonzini wrote:
> Move the handling of the roms/SLOF submodule out of the main Makefile,
> since we are going to remove submodules from the build process of QEMU.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> .gitlab-ci.d/buildtest-template.yml | 2 +-
> configure | 7 +++----
> pc-bios/s390-ccw/Makefile | 11 +++++++++++
> 3 files changed, 15 insertions(+), 5 deletions(-)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH 07/10] pc-bios/s390-ccw: always build network bootloader
2023-06-05 9:52 ` [PATCH 07/10] pc-bios/s390-ccw: always build network bootloader Paolo Bonzini
@ 2023-06-06 9:56 ` Daniel P. Berrangé
2023-06-06 10:08 ` Thomas Huth
2023-06-16 15:20 ` Nina Schoetterl-Glausch
2 siblings, 0 replies; 32+ messages in thread
From: Daniel P. Berrangé @ 2023-06-06 9:56 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: qemu-devel, thuth
On Mon, Jun 05, 2023 at 11:52:20AM +0200, Paolo Bonzini wrote:
> In the beginning, the network bootloader was considered experimental and
> thus optional, but it is well established nowadays and configure always
> checks for roms/SLOF before compiling pc-bios/s390-ccw.
>
> Therefore, it makes sense to always build it together with the other
> part of the s390-ccw bios.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> pc-bios/s390-ccw/Makefile | 5 -----
> 1 file changed, 5 deletions(-)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH 08/10] meson: subprojects: replace berkeley-{soft,test}float-3 with wraps
2023-06-05 9:52 ` [PATCH 08/10] meson: subprojects: replace berkeley-{soft, test}float-3 with wraps Paolo Bonzini
@ 2023-06-06 9:58 ` Daniel P. Berrangé
0 siblings, 0 replies; 32+ messages in thread
From: Daniel P. Berrangé @ 2023-06-06 9:58 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: qemu-devel, thuth
On Mon, Jun 05, 2023 at 11:52:21AM +0200, Paolo Bonzini wrote:
> Unlike other subprojects, these require an overlay directory to include
> meson rules to build the libraries. The rules are basically lifted
> from tests/fp/meson.build, with a few changes to create platform.h
> and publish a dependency.
>
> The build defines are passed through a subproject option, and posted
> back to users of the library via the dependency's compile_args.
>
> The only remaining user of GIT_SUBMODULES and GIT_SUBMODULES_ACTION
> is roms/SLOF, which is used to build pc-bios/s390-ccw. All other
> roms submodules are only present to satisfy the license on pre-built
> firmware blobs.
>
> Best reviewed with --color-moved.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> .gitmodules | 6 -
> configure | 27 -
> scripts/archive-source.sh | 22 +-
> scripts/make-release | 2 +-
> subprojects/.gitignore | 2 +
> subprojects/berkeley-softfloat-3.wrap | 5 +
> subprojects/berkeley-testfloat-3.wrap | 5 +
> .../berkeley-softfloat-3/meson.build | 339 +++++++++++
> .../berkeley-softfloat-3/meson_options.txt | 1 +
> .../berkeley-testfloat-3/meson.build | 220 +++++++
> .../berkeley-testfloat-3/meson_options.txt | 1 +
> tests/fp/meson.build | 541 +-----------------
> 12 files changed, 590 insertions(+), 581 deletions(-)
> create mode 100644 subprojects/berkeley-softfloat-3.wrap
> create mode 100644 subprojects/berkeley-testfloat-3.wrap
> create mode 100644 subprojects/packagefiles/berkeley-softfloat-3/meson.build
> create mode 100644 subprojects/packagefiles/berkeley-softfloat-3/meson_options.txt
> create mode 100644 subprojects/packagefiles/berkeley-testfloat-3/meson.build
> create mode 100644 subprojects/packagefiles/berkeley-testfloat-3/meson_options.txt
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH 09/10] build: remove git submodule handling from main makefile
2023-06-05 9:52 ` [PATCH 09/10] build: remove git submodule handling from main makefile Paolo Bonzini
@ 2023-06-06 9:59 ` Daniel P. Berrangé
0 siblings, 0 replies; 32+ messages in thread
From: Daniel P. Berrangé @ 2023-06-06 9:59 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: qemu-devel, thuth
On Mon, Jun 05, 2023 at 11:52:22AM +0200, Paolo Bonzini wrote:
> The only remaining user of submodules at build time is roms/SLOF,
> which is handled in pc-bios/s390-ccw/Makefile. Remove the relevant
> code from the main makefile.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> .gitlab-ci.d/buildtest-template.yml | 3 +--
> Makefile | 10 ----------
> configure | 7 -------
> meson.build | 1 -
> 4 files changed, 1 insertion(+), 20 deletions(-)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH 10/10] configure: remove --with-git-submodules=
2023-06-05 9:52 ` [PATCH 10/10] configure: remove --with-git-submodules= Paolo Bonzini
@ 2023-06-06 10:00 ` Daniel P. Berrangé
0 siblings, 0 replies; 32+ messages in thread
From: Daniel P. Berrangé @ 2023-06-06 10:00 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: qemu-devel, thuth
On Mon, Jun 05, 2023 at 11:52:23AM +0200, Paolo Bonzini wrote:
> Reuse --enable/--disable-download to control git submodules as well.
> Adjust the error messages of git-submodule.sh to refer to the new
> option.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> configure | 40 +++++--------------
> .../ci/org.centos/stream/8/x86_64/configure | 1 -
> scripts/git-submodule.sh | 8 ++--
> 3 files changed, 12 insertions(+), 37 deletions(-)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH 06/10] configure: move SLOF submodule handling to pc-bios/s390-ccw
2023-06-05 9:52 ` [PATCH 06/10] configure: move SLOF submodule handling to pc-bios/s390-ccw Paolo Bonzini
2023-06-06 9:56 ` Daniel P. Berrangé
@ 2023-06-06 10:07 ` Thomas Huth
1 sibling, 0 replies; 32+ messages in thread
From: Thomas Huth @ 2023-06-06 10:07 UTC (permalink / raw)
To: Paolo Bonzini, qemu-devel; +Cc: berrange
On 05/06/2023 11.52, Paolo Bonzini wrote:
> Move the handling of the roms/SLOF submodule out of the main Makefile,
> since we are going to remove submodules from the build process of QEMU.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> .gitlab-ci.d/buildtest-template.yml | 2 +-
> configure | 7 +++----
> pc-bios/s390-ccw/Makefile | 11 +++++++++++
> 3 files changed, 15 insertions(+), 5 deletions(-)
Acked-by: Thomas Huth <thuth@redhat.com>
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH 07/10] pc-bios/s390-ccw: always build network bootloader
2023-06-05 9:52 ` [PATCH 07/10] pc-bios/s390-ccw: always build network bootloader Paolo Bonzini
2023-06-06 9:56 ` Daniel P. Berrangé
@ 2023-06-06 10:08 ` Thomas Huth
2023-06-16 15:20 ` Nina Schoetterl-Glausch
2 siblings, 0 replies; 32+ messages in thread
From: Thomas Huth @ 2023-06-06 10:08 UTC (permalink / raw)
To: Paolo Bonzini, qemu-devel; +Cc: berrange
On 05/06/2023 11.52, Paolo Bonzini wrote:
> In the beginning, the network bootloader was considered experimental and
> thus optional, but it is well established nowadays and configure always
> checks for roms/SLOF before compiling pc-bios/s390-ccw.
>
> Therefore, it makes sense to always build it together with the other
> part of the s390-ccw bios.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> pc-bios/s390-ccw/Makefile | 5 -----
> 1 file changed, 5 deletions(-)
>
> diff --git a/pc-bios/s390-ccw/Makefile b/pc-bios/s390-ccw/Makefile
> index 9c5276f8ade..2e8cc015aa0 100644
> --- a/pc-bios/s390-ccw/Makefile
> +++ b/pc-bios/s390-ccw/Makefile
> @@ -67,12 +67,7 @@ s390-ccw.img: s390-ccw.elf
>
> $(OBJECTS): Makefile
>
> -ifneq ($(wildcard $(SRC_PATH)/../../roms/SLOF/lib/libnet),)
> include $(SRC_PATH)/netboot.mak
> -else
> -s390-netboot.img:
> - @echo "s390-netboot.img not built since roms/SLOF/ is not available."
> -endif
>
> ALL_OBJS = $(sort $(OBJECTS) $(NETOBJS) $(LIBCOBJS) $(LIBNETOBJS))
> -include $(ALL_OBJS:%.o=%.d)
Reviewed-by: Thomas Huth <thuth@redhat.com>
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH v2 00/10] meson: replace submodules with wrap files
2023-06-05 9:52 [PATCH v2 00/10] meson: replace submodules with wrap files Paolo Bonzini
` (9 preceding siblings ...)
2023-06-05 9:52 ` [PATCH 10/10] configure: remove --with-git-submodules= Paolo Bonzini
@ 2023-06-07 7:41 ` Michal Prívozník
2023-06-07 7:47 ` Daniel P. Berrangé
10 siblings, 1 reply; 32+ messages in thread
From: Michal Prívozník @ 2023-06-07 7:41 UTC (permalink / raw)
To: Paolo Bonzini, qemu-devel; +Cc: thuth, berrange
On 6/5/23 11:52, Paolo Bonzini wrote:
> This series replaces git submodules for bundled libraries with .wrap
> files that can be used directly by meson for subprojects.
Pardon my lack of knowledge, but even after I clone new repo and run:
./configure --enable-donwload && make && make test
I still see berkeley-softfloat-3 submodule missing:
git submodule status
...
0c37a43527f0ee2b9584e7fb2fdc805e902635ac roms/vbootrom
fatal: no submodule mapping found in .gitmodules for path
'tests/fp/berkeley-softfloat-3'
Is this expected?
Michal
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH v2 00/10] meson: replace submodules with wrap files
2023-06-07 7:41 ` [PATCH v2 00/10] meson: replace submodules with wrap files Michal Prívozník
@ 2023-06-07 7:47 ` Daniel P. Berrangé
2023-06-07 8:54 ` Michal Prívozník
0 siblings, 1 reply; 32+ messages in thread
From: Daniel P. Berrangé @ 2023-06-07 7:47 UTC (permalink / raw)
To: Michal Prívozník; +Cc: Paolo Bonzini, qemu-devel, thuth
On Wed, Jun 07, 2023 at 09:41:40AM +0200, Michal Prívozník wrote:
> On 6/5/23 11:52, Paolo Bonzini wrote:
> > This series replaces git submodules for bundled libraries with .wrap
> > files that can be used directly by meson for subprojects.
>
> Pardon my lack of knowledge, but even after I clone new repo and run:
>
> ./configure --enable-donwload && make && make test
>
> I still see berkeley-softfloat-3 submodule missing:
>
> git submodule status
> ...
> 0c37a43527f0ee2b9584e7fb2fdc805e902635ac roms/vbootrom
> fatal: no submodule mapping found in .gitmodules for path
> 'tests/fp/berkeley-softfloat-3'
>
> Is this expected?
Yet another example of submodules sucking. Once we removed the submodules
from .gitmodules, git doesn't know what to do with the existing chcked
out submodules from before this time.
Best thing todo is purge all existing submodules, eg
git submodule deinit --all --force
and if there are stale directories left over, manually delete those too,
so you get back to a more pristine checkout state.
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH v2 00/10] meson: replace submodules with wrap files
2023-06-07 7:47 ` Daniel P. Berrangé
@ 2023-06-07 8:54 ` Michal Prívozník
2023-06-07 8:56 ` Paolo Bonzini
0 siblings, 1 reply; 32+ messages in thread
From: Michal Prívozník @ 2023-06-07 8:54 UTC (permalink / raw)
To: Daniel P. Berrangé; +Cc: Paolo Bonzini, qemu-devel, thuth
On 6/7/23 09:47, Daniel P. Berrangé wrote:
> On Wed, Jun 07, 2023 at 09:41:40AM +0200, Michal Prívozník wrote:
>> On 6/5/23 11:52, Paolo Bonzini wrote:
>>> This series replaces git submodules for bundled libraries with .wrap
>>> files that can be used directly by meson for subprojects.
>>
>> Pardon my lack of knowledge, but even after I clone new repo and run:
>>
>> ./configure --enable-donwload && make && make test
>>
>> I still see berkeley-softfloat-3 submodule missing:
>>
>> git submodule status
>> ...
>> 0c37a43527f0ee2b9584e7fb2fdc805e902635ac roms/vbootrom
>> fatal: no submodule mapping found in .gitmodules for path
>> 'tests/fp/berkeley-softfloat-3'
>>
>> Is this expected?
>
> Yet another example of submodules sucking. Once we removed the submodules
> from .gitmodules, git doesn't know what to do with the existing chcked
> out submodules from before this time.
>
> Best thing todo is purge all existing submodules, eg
>
> git submodule deinit --all --force
>
> and if there are stale directories left over, manually delete those too,
> so you get back to a more pristine checkout state.
I'm not sure that helps. I mean:
git clone https://gitlab.com/qemu-project/qemu.git qemu2.git && \
cd qemu2.git/ && \
git submodule status
still complains:
fatal: no submodule mapping found in .gitmodules for path
'tests/fp/berkeley-softfloat-3'
Michal
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH v2 00/10] meson: replace submodules with wrap files
2023-06-07 8:54 ` Michal Prívozník
@ 2023-06-07 8:56 ` Paolo Bonzini
0 siblings, 0 replies; 32+ messages in thread
From: Paolo Bonzini @ 2023-06-07 8:56 UTC (permalink / raw)
To: Michal Prívozník; +Cc: Daniel P. Berrangé, qemu-devel, thuth
No, Michal is correct. Patch "meson: subprojects: replace
berkeley-{soft,test}float-3 with wraps" did not remove the submodules.
Paolo
On Wed, Jun 7, 2023 at 10:54 AM Michal Prívozník <mprivozn@redhat.com> wrote:
>
> On 6/7/23 09:47, Daniel P. Berrangé wrote:
> > On Wed, Jun 07, 2023 at 09:41:40AM +0200, Michal Prívozník wrote:
> >> On 6/5/23 11:52, Paolo Bonzini wrote:
> >>> This series replaces git submodules for bundled libraries with .wrap
> >>> files that can be used directly by meson for subprojects.
> >>
> >> Pardon my lack of knowledge, but even after I clone new repo and run:
> >>
> >> ./configure --enable-donwload && make && make test
> >>
> >> I still see berkeley-softfloat-3 submodule missing:
> >>
> >> git submodule status
> >> ...
> >> 0c37a43527f0ee2b9584e7fb2fdc805e902635ac roms/vbootrom
> >> fatal: no submodule mapping found in .gitmodules for path
> >> 'tests/fp/berkeley-softfloat-3'
> >>
> >> Is this expected?
> >
> > Yet another example of submodules sucking. Once we removed the submodules
> > from .gitmodules, git doesn't know what to do with the existing chcked
> > out submodules from before this time.
> >
> > Best thing todo is purge all existing submodules, eg
> >
> > git submodule deinit --all --force
> >
> > and if there are stale directories left over, manually delete those too,
> > so you get back to a more pristine checkout state.
>
> I'm not sure that helps. I mean:
>
> git clone https://gitlab.com/qemu-project/qemu.git qemu2.git && \
> cd qemu2.git/ && \
> git submodule status
>
> still complains:
>
> fatal: no submodule mapping found in .gitmodules for path
> 'tests/fp/berkeley-softfloat-3'
>
> Michal
>
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH 07/10] pc-bios/s390-ccw: always build network bootloader
2023-06-05 9:52 ` [PATCH 07/10] pc-bios/s390-ccw: always build network bootloader Paolo Bonzini
2023-06-06 9:56 ` Daniel P. Berrangé
2023-06-06 10:08 ` Thomas Huth
@ 2023-06-16 15:20 ` Nina Schoetterl-Glausch
2023-06-22 8:42 ` Thomas Huth
2 siblings, 1 reply; 32+ messages in thread
From: Nina Schoetterl-Glausch @ 2023-06-16 15:20 UTC (permalink / raw)
To: Paolo Bonzini, qemu-devel; +Cc: thuth, berrange
On Mon, 2023-06-05 at 11:52 +0200, Paolo Bonzini wrote:
> In the beginning, the network bootloader was considered experimental and
> thus optional, but it is well established nowadays and configure always
> checks for roms/SLOF before compiling pc-bios/s390-ccw.
Only if run in a git repository, not in a tree generated with archive-source.sh
which doesn't package roms/SLOF.
So without the check below the build fails.
This is not inteded, is it?
>
> Therefore, it makes sense to always build it together with the other
> part of the s390-ccw bios.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> pc-bios/s390-ccw/Makefile | 5 -----
> 1 file changed, 5 deletions(-)
>
> diff --git a/pc-bios/s390-ccw/Makefile b/pc-bios/s390-ccw/Makefile
> index 9c5276f8ade..2e8cc015aa0 100644
> --- a/pc-bios/s390-ccw/Makefile
> +++ b/pc-bios/s390-ccw/Makefile
> @@ -67,12 +67,7 @@ s390-ccw.img: s390-ccw.elf
>
> $(OBJECTS): Makefile
>
> -ifneq ($(wildcard $(SRC_PATH)/../../roms/SLOF/lib/libnet),)
> include $(SRC_PATH)/netboot.mak
> -else
> -s390-netboot.img:
> - @echo "s390-netboot.img not built since roms/SLOF/ is not available."
> -endif
>
> ALL_OBJS = $(sort $(OBJECTS) $(NETOBJS) $(LIBCOBJS) $(LIBNETOBJS))
> -include $(ALL_OBJS:%.o=%.d)
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH 07/10] pc-bios/s390-ccw: always build network bootloader
2023-06-16 15:20 ` Nina Schoetterl-Glausch
@ 2023-06-22 8:42 ` Thomas Huth
2023-06-22 9:47 ` Paolo Bonzini
0 siblings, 1 reply; 32+ messages in thread
From: Thomas Huth @ 2023-06-22 8:42 UTC (permalink / raw)
To: Nina Schoetterl-Glausch, Paolo Bonzini, qemu-devel; +Cc: berrange
On 16/06/2023 17.20, Nina Schoetterl-Glausch wrote:
> On Mon, 2023-06-05 at 11:52 +0200, Paolo Bonzini wrote:
>> In the beginning, the network bootloader was considered experimental and
>> thus optional, but it is well established nowadays and configure always
>> checks for roms/SLOF before compiling pc-bios/s390-ccw.
>
> Only if run in a git repository, not in a tree generated with archive-source.sh
> which doesn't package roms/SLOF.
> So without the check below the build fails.
> This is not inteded, is it?
I guess archive-source.sh needs to be changed to include the SLOF sources
now? Paolo, what would you recommend?
Thomas
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH 07/10] pc-bios/s390-ccw: always build network bootloader
2023-06-22 8:42 ` Thomas Huth
@ 2023-06-22 9:47 ` Paolo Bonzini
0 siblings, 0 replies; 32+ messages in thread
From: Paolo Bonzini @ 2023-06-22 9:47 UTC (permalink / raw)
To: Thomas Huth, Nina Schoetterl-Glausch, qemu-devel; +Cc: berrange
On 6/22/23 10:42, Thomas Huth wrote:
>>
>> Only if run in a git repository, not in a tree generated with
>> archive-source.sh
>> which doesn't package roms/SLOF.
>> So without the check below the build fails.
>> This is not inteded, is it?
>
> I guess archive-source.sh needs to be changed to include the SLOF
> sources now? Paolo, what would you recommend?
It's not strictly necessary, I have sent a patch at
https://patchew.org/QEMU/20230618212039.102052-1-pbonzini@redhat.com/
and I'll have to send v2 based on Nina's comments.
Paolo
^ permalink raw reply [flat|nested] 32+ messages in thread
end of thread, other threads:[~2023-06-22 9:47 UTC | newest]
Thread overview: 32+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-05 9:52 [PATCH v2 00/10] meson: replace submodules with wrap files Paolo Bonzini
2023-06-05 9:52 ` [PATCH 01/10] configure: remove --with-git= option Paolo Bonzini
2023-06-05 10:27 ` Alex Bennée
2023-06-05 11:17 ` Thomas Huth
2023-06-05 9:52 ` [PATCH 02/10] configure: rename --enable-pypi to --enable-download, control subprojects too Paolo Bonzini
2023-06-05 10:28 ` Alex Bennée
2023-06-05 9:52 ` [PATCH 03/10] git-submodule: allow partial update of .git-submodule-status Paolo Bonzini
2023-06-05 10:55 ` Alex Bennée
2023-06-05 9:52 ` [PATCH 04/10] build: log submodule update from git-submodule.sh Paolo Bonzini
2023-06-05 10:56 ` Alex Bennée
2023-06-05 11:11 ` Alex Bennée
2023-06-05 9:52 ` [PATCH 05/10] meson: subprojects: replace submodules with wrap files Paolo Bonzini
2023-06-06 9:54 ` Daniel P. Berrangé
2023-06-05 9:52 ` [PATCH 06/10] configure: move SLOF submodule handling to pc-bios/s390-ccw Paolo Bonzini
2023-06-06 9:56 ` Daniel P. Berrangé
2023-06-06 10:07 ` Thomas Huth
2023-06-05 9:52 ` [PATCH 07/10] pc-bios/s390-ccw: always build network bootloader Paolo Bonzini
2023-06-06 9:56 ` Daniel P. Berrangé
2023-06-06 10:08 ` Thomas Huth
2023-06-16 15:20 ` Nina Schoetterl-Glausch
2023-06-22 8:42 ` Thomas Huth
2023-06-22 9:47 ` Paolo Bonzini
2023-06-05 9:52 ` [PATCH 08/10] meson: subprojects: replace berkeley-{soft, test}float-3 with wraps Paolo Bonzini
2023-06-06 9:58 ` [PATCH 08/10] meson: subprojects: replace berkeley-{soft,test}float-3 " Daniel P. Berrangé
2023-06-05 9:52 ` [PATCH 09/10] build: remove git submodule handling from main makefile Paolo Bonzini
2023-06-06 9:59 ` Daniel P. Berrangé
2023-06-05 9:52 ` [PATCH 10/10] configure: remove --with-git-submodules= Paolo Bonzini
2023-06-06 10:00 ` Daniel P. Berrangé
2023-06-07 7:41 ` [PATCH v2 00/10] meson: replace submodules with wrap files Michal Prívozník
2023-06-07 7:47 ` Daniel P. Berrangé
2023-06-07 8:54 ` Michal Prívozník
2023-06-07 8:56 ` Paolo Bonzini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).