qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] meson: replace submodules with wrap files
@ 2023-05-27  9:28 Paolo Bonzini
  2023-05-27  9:28 ` [PATCH 1/5] configure: remove --with-git= option Paolo Bonzini
                   ` (6 more replies)
  0 siblings, 7 replies; 24+ messages in thread
From: Paolo Bonzini @ 2023-05-27  9:28 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, 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;
more on this later in this cover letter.

I'm not sure what's the best way to proceed for roms/SLOF.  Some
possibilities, in no particular order, include:

* doing nothing

* merging --with-git-submodules with --enable-download, and
  moving the git-submodule.sh rules from the main Makefile to
  pc-bios/s390-ccw/ (my favorite option)

* copying the relevant SLOF files into pc-bios/

Also, getting into more overengineered territory:

* same as the second option, but also replace the roms/ submodules
  with text files, in a format similar to .wrap files; meson uses the
  standard configparser to read them, so it would not be a lot of
  code.  The files would be parsed by scripts/make-release and
  pc-bios/s390-ccw/Makefile.

* adding support for firmware with a meson build system to
  configure; turn SLOF into a wrap and roms/SLOF into a symlink
  for ../pc-bios/s390-ccw/subprojects/SLOF.  I'm mentioning this for
  completeness but this is not something I would like.  On the other
  hand it could reuse some (or most?) of the code currently used to
  generate config-meson.cross, so maybe it isn't that bad...


Patch 1 removes the --with-git= option for consistency, since git cannot
be overridden for "meson subprojects download".

Patch 2 renames the recently introduced --enable-pypi command line
option to --enable-download, and makes it control meson's -Dwrapmode
option as well.

Patch 3 replaces submodule update with meson's subproject download for
existing subprojects (including libfdt and keycodemapdb).

Patch 5 converts berkeley-{soft,test}float-3 to subprojects too.
However, those are the submodules that are used in configure to
check the validity of the source tree, so patch 4 adds an extra check
for the presence of the aforementioned SLOF submodule.


Still a bit RFCish, in case people prefer to have a solution for
git-submodule.sh and roms/SLOF before the switch to wraps.  For this
reason, and because I have exhausted my gitlab CI minutes for this month,
it's only tested lightly (it passed gitlab CI in a previous version and
passes vm-build-netbsd in this one).

Paolo

Supersedes: <20230519085647.1104775-1-pbonzini@redhat.com>

[1] https://patchew.org/QEMU/20230302131848.1527460-1-marcandre.lureau@redhat.com/20230302131848.1527460-5-marcandre.lureau@redhat.com/


Paolo Bonzini (5):
  configure: remove --with-git= option
  configure: rename --enable-pypi to --enable-download, control
    subprojects too
  meson: subprojects: replace submodules with wrap files
  configure: check for SLOF submodule before building pc-bios/s390-ccw
  meson: subprojects: replace berkeley-{soft,test}float-3 with wraps

 .gitlab-ci.d/buildtest-template.yml           |   1 +
 .gitmodules                                   |  15 -
 Makefile                                      |   2 +-
 configure                                     | 126 ++--
 meson.build                                   |  16 +-
 scripts/archive-source.sh                     |  27 +-
 scripts/git-submodule.sh                      |   8 +-
 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 +-----------------
 22 files changed, 668 insertions(+), 667 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] 24+ messages in thread

* [PATCH 1/5] configure: remove --with-git= option
  2023-05-27  9:28 [PATCH 0/5] meson: replace submodules with wrap files Paolo Bonzini
@ 2023-05-27  9:28 ` Paolo Bonzini
  2023-05-30 11:58   ` Thomas Huth
  2023-05-30 12:18   ` Daniel P. Berrangé
  2023-05-27  9:28 ` [PATCH 2/5] configure: rename --enable-pypi to --enable-download, control subprojects too Paolo Bonzini
                   ` (5 subsequent siblings)
  6 siblings, 2 replies; 24+ messages in thread
From: Paolo Bonzini @ 2023-05-27  9:28 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, thuth, berrange

There is not really any scenario where one would use any other git
binary than "the first git in the PATH" aka $(command -v git).  In
fact for example "meson subprojects download" or scripts/checkpatch.pl
do not obey the GIT environment variable.

Remove the unnecessary knob, but test for the presence of git in
the configure and git-submodule.sh scripts.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 Makefile                 | 2 +-
 configure                | 6 ++----
 meson.build              | 1 -
 scripts/git-submodule.sh | 8 +++++++-
 4 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/Makefile b/Makefile
index 08fb6a3b058a..eaeab979966c 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)), \
+		("$(SRC_PATH)/scripts/git-submodule.sh" $(GIT_SUBMODULES_ACTION) $(GIT_SUBMODULES)), \
 		"GIT","$(GIT_SUBMODULES)")
 endif
 
diff --git a/configure b/configure
index d674a9667310..370e038e63d7 100755
--- a/configure
+++ b/configure
@@ -791,7 +791,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 +892,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 +1698,7 @@ fi
 #######################################
 # generate config-host.mak
 
-if ! (GIT="$git" "$source_path/scripts/git-submodule.sh" "$git_submodules_action" "$git_submodules"); then
+if ! ("$source_path/scripts/git-submodule.sh" "$git_submodules_action" "$git_submodules"); then
     exit 1
 fi
 
@@ -1709,7 +1708,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 2d48aa1e2ef3..b11773ab39e8 100644
--- a/meson.build
+++ b/meson.build
@@ -4027,7 +4027,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/git-submodule.sh b/scripts/git-submodule.sh
index 7be41f594832..33e995bef1ff 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
+GIT=$(command -v git)
 
 cd "$(dirname "$0")/.."
 
@@ -57,6 +57,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] 24+ messages in thread

* [PATCH 2/5] configure: rename --enable-pypi to --enable-download, control subprojects too
  2023-05-27  9:28 [PATCH 0/5] meson: replace submodules with wrap files Paolo Bonzini
  2023-05-27  9:28 ` [PATCH 1/5] configure: remove --with-git= option Paolo Bonzini
@ 2023-05-27  9:28 ` Paolo Bonzini
  2023-05-27 16:49   ` BALATON Zoltan
  2023-05-30 12:00   ` Thomas Huth
  2023-05-27  9:28 ` [PATCH 3/5] meson: subprojects: replace submodules with wrap files Paolo Bonzini
                   ` (4 subsequent siblings)
  6 siblings, 2 replies; 24+ messages in thread
From: Paolo Bonzini @ 2023-05-27  9:28 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, 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>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 configure              | 17 +++++++----------
 subprojects/.gitignore |  3 +++
 2 files changed, 10 insertions(+), 10 deletions(-)
 create mode 100644 subprojects/.gitignore

diff --git a/configure b/configure
index 370e038e63d7..2f908660e4f1 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"
@@ -756,9 +756,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"
@@ -962,7 +962,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.
 
@@ -979,7 +979,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
 
@@ -1002,7 +1002,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
 
@@ -1942,11 +1942,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 000000000000..7560ebb0b1a0
--- /dev/null
+++ b/subprojects/.gitignore
@@ -0,0 +1,3 @@
+/packagecache
+
+/slirp
-- 
2.40.1



^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 3/5] meson: subprojects: replace submodules with wrap files
  2023-05-27  9:28 [PATCH 0/5] meson: replace submodules with wrap files Paolo Bonzini
  2023-05-27  9:28 ` [PATCH 1/5] configure: remove --with-git= option Paolo Bonzini
  2023-05-27  9:28 ` [PATCH 2/5] configure: rename --enable-pypi to --enable-download, control subprojects too Paolo Bonzini
@ 2023-05-27  9:28 ` Paolo Bonzini
  2023-05-30 12:23   ` Daniel P. Berrangé
  2023-05-27  9:28 ` [PATCH 4/5] configure: check for SLOF submodule before building pc-bios/s390-ccw Paolo Bonzini
                   ` (3 subsequent siblings)
  6 siblings, 1 reply; 24+ messages in thread
From: Paolo Bonzini @ 2023-05-27  9:28 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, 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                           | 75 ++++++++++++-----------------
 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, 61 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 c9f2e737c09a..3c997d7265b2 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 f8b2ddf3877c..a934c85e4e40 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 2f908660e4f1..1d1b8736c0eb 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=*) git="$optarg"
   ;;
   --with-git-submodules=*)
@@ -774,10 +762,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"
   ;;
@@ -789,6 +773,30 @@ 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 download subprojects."
+    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
@@ -797,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"
@@ -1166,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
@@ -1611,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
 
@@ -1953,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 b11773ab39e8..610f47d24593 100644
--- a/meson.build
+++ b/meson.build
@@ -3047,14 +3047,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
 
@@ -3082,12 +3075,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 dba5ae05b67e..b99cb66e4122 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 44a9d86a04a7..0604e61b8143 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 7560ebb0b1a0..935e9a72a8f9 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 b6910bec1161..000000000000
--- 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 000000000000..d1bc9174e913
--- /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 f5772a62ec52..000000000000
--- 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 000000000000..dda7b0e5716f
--- /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 0b28d205572c..000000000000
--- 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 000000000000..416955ca4515
--- /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] 24+ messages in thread

* [PATCH 4/5] configure: check for SLOF submodule before building pc-bios/s390-ccw
  2023-05-27  9:28 [PATCH 0/5] meson: replace submodules with wrap files Paolo Bonzini
                   ` (2 preceding siblings ...)
  2023-05-27  9:28 ` [PATCH 3/5] meson: subprojects: replace submodules with wrap files Paolo Bonzini
@ 2023-05-27  9:28 ` Paolo Bonzini
  2023-05-30 12:04   ` Thomas Huth
  2023-05-27  9:28 ` [PATCH 5/5] meson: subprojects: replace berkeley-{soft, test}float-3 with wraps Paolo Bonzini
                   ` (2 subsequent siblings)
  6 siblings, 1 reply; 24+ messages in thread
From: Paolo Bonzini @ 2023-05-27  9:28 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, thuth, berrange

SLOF is required for building the s390-ccw firmware on s390x,
since it is using the libnet code from SLOF for network booting.

If SLOF is absent and submodules are not updated, pc-bios/s390-ccw
cannot be built.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 configure | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/configure b/configure
index 1d1b8736c0eb..c92a3b30b9a4 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 && \
+    ( test "$git_submodules_action" != ignore || test -f roms/SLOF/VERSION ); then
   write_c_skeleton
   do_compiler "$target_cc" $target_cc_cflags -march=z900 -o $TMPO -c $TMPC
   has_z900=$?
-- 
2.40.1



^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 5/5] meson: subprojects: replace berkeley-{soft, test}float-3 with wraps
  2023-05-27  9:28 [PATCH 0/5] meson: replace submodules with wrap files Paolo Bonzini
                   ` (3 preceding siblings ...)
  2023-05-27  9:28 ` [PATCH 4/5] configure: check for SLOF submodule before building pc-bios/s390-ccw Paolo Bonzini
@ 2023-05-27  9:28 ` Paolo Bonzini
  2023-05-30 12:18 ` [PATCH 0/5] meson: replace submodules with wrap files Thomas Huth
  2023-05-30 12:30 ` Daniel P. Berrangé
  6 siblings, 0 replies; 24+ messages in thread
From: Paolo Bonzini @ 2023-05-27  9:28 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, 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 a934c85e4e40..73cae4cd4da0 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 c92a3b30b9a4..119c6e161377 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 b99cb66e4122..489963049102 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 0604e61b8143..c5db87b3f91b 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 935e9a72a8f9..adca0266be69 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 000000000000..a8fd87740b15
--- /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 000000000000..6ad80a37b2aa
--- /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 000000000000..4ce964b8389c
--- /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 000000000000..868ae57e805e
--- /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 000000000000..a41673d616bf
--- /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 000000000000..868ae57e805e
--- /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 f9ca6a93b49d..cbc17392d678 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] 24+ messages in thread

* Re: [PATCH 2/5] configure: rename --enable-pypi to --enable-download,  control subprojects too
  2023-05-27  9:28 ` [PATCH 2/5] configure: rename --enable-pypi to --enable-download, control subprojects too Paolo Bonzini
@ 2023-05-27 16:49   ` BALATON Zoltan
  2023-05-27 19:18     ` Paolo Bonzini
  2023-05-30 12:00   ` Thomas Huth
  1 sibling, 1 reply; 24+ messages in thread
From: BALATON Zoltan @ 2023-05-27 16:49 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: qemu-devel, peter.maydell, thuth, berrange

[-- Attachment #1: Type: text/plain, Size: 3482 bytes --]

On Sat, 27 May 2023, Paolo Bonzini wrote:
> 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>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> configure              | 17 +++++++----------
> subprojects/.gitignore |  3 +++
> 2 files changed, 10 insertions(+), 10 deletions(-)
> create mode 100644 subprojects/.gitignore
>
> diff --git a/configure b/configure
> index 370e038e63d7..2f908660e4f1 100755
> --- a/configure
> +++ b/configure
> @@ -266,7 +266,7 @@ bsd_user=""
> plugins="$default_feature"
> ninja=""
> python=
> -pypi="enabled"
> +download="enabled"

Is this the default? Can it default to disabled so it won't download 
anytihng unless asked to do that? By default it should just report if 
something is missing and let the users decide how they want to install it.

Regards,
BALATON Zoltan

> bindir="bin"
> skip_meson=no
> vfio_user_server="disabled"
> @@ -756,9 +756,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"
> @@ -962,7 +962,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.
>
> @@ -979,7 +979,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
>
> @@ -1002,7 +1002,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
>
> @@ -1942,11 +1942,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 000000000000..7560ebb0b1a0
> --- /dev/null
> +++ b/subprojects/.gitignore
> @@ -0,0 +1,3 @@
> +/packagecache
> +
> +/slirp
>

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 2/5] configure: rename --enable-pypi to --enable-download,  control subprojects too
  2023-05-27 16:49   ` BALATON Zoltan
@ 2023-05-27 19:18     ` Paolo Bonzini
  0 siblings, 0 replies; 24+ messages in thread
From: Paolo Bonzini @ 2023-05-27 19:18 UTC (permalink / raw)
  To: BALATON Zoltan
  Cc: qemu-devel, Maydell, Peter, Thomas Huth, P. Berrange, Daniel

[-- Attachment #1: Type: text/plain, Size: 3408 bytes --]

Il sab 27 mag 2023, 18:49 BALATON Zoltan <balaton@eik.bme.hu> ha scritto:

> On Sat, 27 May 2023, Paolo Bonzini wrote:
> > 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.
>
> Is this the default? Can it default to disabled so it won't download
> anytihng unless asked to do that? By default it should just report if
> something is missing and let the users decide how they want to install it.
>

It is the default but only for features that are explicitly enabled on the
configure command line. For example sphinx will not be installed unless
--enable-docs is present.

However, if in the future we remove the bundled dtc sources from the
tarball, that might be an exception in that dtc would be downloaded anyway.
To be clear, this is not something that is changed by this series.

Paolo


> Regards,
> BALATON Zoltan
>
> > bindir="bin"
> > skip_meson=no
> > vfio_user_server="disabled"
> > @@ -756,9 +756,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"
> > @@ -962,7 +962,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.
> >
> > @@ -979,7 +979,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
> >
> > @@ -1002,7 +1002,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
> >
> > @@ -1942,11 +1942,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 000000000000..7560ebb0b1a0
> > --- /dev/null
> > +++ b/subprojects/.gitignore
> > @@ -0,0 +1,3 @@
> > +/packagecache
> > +
> > +/slirp
> >

[-- Attachment #2: Type: text/html, Size: 4959 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 1/5] configure: remove --with-git= option
  2023-05-27  9:28 ` [PATCH 1/5] configure: remove --with-git= option Paolo Bonzini
@ 2023-05-30 11:58   ` Thomas Huth
  2023-05-30 12:03     ` Paolo Bonzini
  2023-05-30 12:18   ` Daniel P. Berrangé
  1 sibling, 1 reply; 24+ messages in thread
From: Thomas Huth @ 2023-05-30 11:58 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel, berrange; +Cc: peter.maydell

On 27/05/2023 11.28, Paolo Bonzini wrote:
> There is not really any scenario where one would use any other git
> binary than "the first git in the PATH" aka $(command -v git).  In
> fact for example "meson subprojects download" or scripts/checkpatch.pl
> do not obey the GIT environment variable.
> 
> Remove the unnecessary knob, but test for the presence of git in
> the configure and git-submodule.sh scripts.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>   Makefile                 | 2 +-
>   configure                | 6 ++----
>   meson.build              | 1 -
>   scripts/git-submodule.sh | 8 +++++++-
>   4 files changed, 10 insertions(+), 7 deletions(-)

The commit cc84d63a42e31c2a that introduce this switch gave a
rationale:

     Some users can't run a bare 'git' command, due to need for a transparent
     proxying solution such as 'tsocks'. This adds an argument to configure to
     let users specify such a thing:
     
       ./configure --with-git="tsocks git"

But if the plain "git" command is unusable on their system,
they should likely introduce a proper wrapper on their end
for this command anyway, so IMHO it's ok if we remove this
again. Daniel, what do you think?

  Thomas



^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 2/5] configure: rename --enable-pypi to --enable-download,  control subprojects too
  2023-05-27  9:28 ` [PATCH 2/5] configure: rename --enable-pypi to --enable-download, control subprojects too Paolo Bonzini
  2023-05-27 16:49   ` BALATON Zoltan
@ 2023-05-30 12:00   ` Thomas Huth
  1 sibling, 0 replies; 24+ messages in thread
From: Thomas Huth @ 2023-05-30 12:00 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel; +Cc: peter.maydell, berrange

On 27/05/2023 11.28, Paolo Bonzini wrote:
> 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>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>   configure              | 17 +++++++----------
>   subprojects/.gitignore |  3 +++
>   2 files changed, 10 insertions(+), 10 deletions(-)
>   create mode 100644 subprojects/.gitignore

Reviewed-by: Thomas Huth <thuth@redhat.com>



^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 1/5] configure: remove --with-git= option
  2023-05-30 11:58   ` Thomas Huth
@ 2023-05-30 12:03     ` Paolo Bonzini
  2023-05-30 12:17       ` Daniel P. Berrangé
  0 siblings, 1 reply; 24+ messages in thread
From: Paolo Bonzini @ 2023-05-30 12:03 UTC (permalink / raw)
  To: Thomas Huth; +Cc: qemu-devel, berrange, peter.maydell

On Tue, May 30, 2023 at 1:58 PM Thomas Huth <thuth@redhat.com> wrote:
> The commit cc84d63a42e31c2a that introduce this switch gave a
> rationale:
>
>      Some users can't run a bare 'git' command, due to need for a transparent
>      proxying solution such as 'tsocks'. This adds an argument to configure to
>      let users specify such a thing:
>
>        ./configure --with-git="tsocks git"

I see, thanks for the additional information--it makes sense to
include it in the commit message.

My impression is that the "smart HTTP" protocol has made this concern
less important. Smart HTTP was introduced in 2009, but back in 2017
the git protocol running on port 9418 was still quite common. QEMU
itself switched from git to https in 2018 with commit a897f22b596b62,
about a year after --with-git was introduced.

Paolo

> But if the plain "git" command is unusable on their system,
> they should likely introduce a proper wrapper on their end
> for this command anyway, so IMHO it's ok if we remove this
> again. Daniel, what do you think?



^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 4/5] configure: check for SLOF submodule before building pc-bios/s390-ccw
  2023-05-27  9:28 ` [PATCH 4/5] configure: check for SLOF submodule before building pc-bios/s390-ccw Paolo Bonzini
@ 2023-05-30 12:04   ` Thomas Huth
  2023-05-30 12:53     ` Paolo Bonzini
  0 siblings, 1 reply; 24+ messages in thread
From: Thomas Huth @ 2023-05-30 12:04 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel; +Cc: peter.maydell, berrange

On 27/05/2023 11.28, Paolo Bonzini wrote:
> SLOF is required for building the s390-ccw firmware on s390x,
> since it is using the libnet code from SLOF for network booting.
> 
> If SLOF is absent and submodules are not updated, pc-bios/s390-ccw
> cannot be built.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>   configure | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/configure b/configure
> index 1d1b8736c0eb..c92a3b30b9a4 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 && \
> +    ( test "$git_submodules_action" != ignore || test -f roms/SLOF/VERSION ); then
>     write_c_skeleton
>     do_compiler "$target_cc" $target_cc_cflags -march=z900 -o $TMPO -c $TMPC
>     has_z900=$?

Not sure if we really need this. Only the networking part of the s390-ccw 
bios cannot be build without SLOF, but the main binary still builds fine 
also without it.

  Thomas



^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 1/5] configure: remove --with-git= option
  2023-05-30 12:03     ` Paolo Bonzini
@ 2023-05-30 12:17       ` Daniel P. Berrangé
  0 siblings, 0 replies; 24+ messages in thread
From: Daniel P. Berrangé @ 2023-05-30 12:17 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: Thomas Huth, qemu-devel, peter.maydell

On Tue, May 30, 2023 at 02:03:11PM +0200, Paolo Bonzini wrote:
> On Tue, May 30, 2023 at 1:58 PM Thomas Huth <thuth@redhat.com> wrote:
> > The commit cc84d63a42e31c2a that introduce this switch gave a
> > rationale:
> >
> >      Some users can't run a bare 'git' command, due to need for a transparent
> >      proxying solution such as 'tsocks'. This adds an argument to configure to
> >      let users specify such a thing:
> >
> >        ./configure --with-git="tsocks git"
> 
> I see, thanks for the additional information--it makes sense to
> include it in the commit message.
> 
> My impression is that the "smart HTTP" protocol has made this concern
> less important. Smart HTTP was introduced in 2009, but back in 2017
> the git protocol running on port 9418 was still quite common. QEMU
> itself switched from git to https in 2018 with commit a897f22b596b62,
> about a year after --with-git was introduced.

Here is the original thread:

  https://lists.nongnu.org/archive/html/qemu-devel/2017-10/msg05005.html

yes it was about 'git://' protocol, and yes, creating a wrapper
script call 'git' was a viable option too.  I just added --with-git
as a convenience.

> > But if the plain "git" command is unusable on their system,
> > they should likely introduce a proper wrapper on their end
> > for this command anyway, so IMHO it's ok if we remove this
> > again. Daniel, what do you think?
> 

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] 24+ messages in thread

* Re: [PATCH 1/5] configure: remove --with-git= option
  2023-05-27  9:28 ` [PATCH 1/5] configure: remove --with-git= option Paolo Bonzini
  2023-05-30 11:58   ` Thomas Huth
@ 2023-05-30 12:18   ` Daniel P. Berrangé
  1 sibling, 0 replies; 24+ messages in thread
From: Daniel P. Berrangé @ 2023-05-30 12:18 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: qemu-devel, peter.maydell, thuth

On Sat, May 27, 2023 at 11:28:47AM +0200, Paolo Bonzini wrote:
> There is not really any scenario where one would use any other git
> binary than "the first git in the PATH" aka $(command -v git).  In
> fact for example "meson subprojects download" or scripts/checkpatch.pl
> do not obey the GIT environment variable.
> 
> Remove the unnecessary knob, but test for the presence of git in
> the configure and git-submodule.sh scripts.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  Makefile                 | 2 +-
>  configure                | 6 ++----
>  meson.build              | 1 -
>  scripts/git-submodule.sh | 8 +++++++-
>  4 files changed, 10 insertions(+), 7 deletions(-)

If you just update the commit message to say we are intentionally
reverting functionality from cc84d63a42e31c2afa884fc78610a65ab8ecc06a
and people should create a wrapper script instead:

  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] 24+ messages in thread

* Re: [PATCH 0/5] meson: replace submodules with wrap files
  2023-05-27  9:28 [PATCH 0/5] meson: replace submodules with wrap files Paolo Bonzini
                   ` (4 preceding siblings ...)
  2023-05-27  9:28 ` [PATCH 5/5] meson: subprojects: replace berkeley-{soft, test}float-3 with wraps Paolo Bonzini
@ 2023-05-30 12:18 ` Thomas Huth
  2023-05-30 12:57   ` Daniel P. Berrangé
  2023-05-30 12:30 ` Daniel P. Berrangé
  6 siblings, 1 reply; 24+ messages in thread
From: Thomas Huth @ 2023-05-30 12:18 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel; +Cc: peter.maydell, berrange, qemu-s390x

On 27/05/2023 11.28, Paolo Bonzini wrote:
> This series replaces git submodules for bundled libraries with .wrap
> files that can be used directly by meson for subprojects. 
...
> The remaining submodules consist of tests/lcitool/libvirt-ci and the
> firmware in roms/.

We talked about moving the contents of roms/ to a separate repository a 
couple of times ... maybe it's time now that we really do it?

(However, when I tried to tackle the "do we need to ship the firmware 
sources with the main tarball" problem the last time, there was no consensus 
how to do it best, see 
https://lore.kernel.org/qemu-devel/20221128092555.37102-1-thuth@redhat.com/ 
... maybe something to discuss at KVM forum...)

> 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;
> more on this later in this cover letter.
> 
> I'm not sure what's the best way to proceed for roms/SLOF.  Some
> possibilities, in no particular order, include:
> 
> * doing nothing
> 
> * merging --with-git-submodules with --enable-download, and
>    moving the git-submodule.sh rules from the main Makefile to
>    pc-bios/s390-ccw/ (my favorite option)
> 
> * copying the relevant SLOF files into pc-bios/

Considering that SLOF is also rather on life support already (there is now 
VOF for the sPAPR machine instead, Alexey left IBM, ...), I also wouldn't 
mind the third option, I think.

But of course we can also start with option 2 and go for option 3 later.

  Thomas



^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 3/5] meson: subprojects: replace submodules with wrap files
  2023-05-27  9:28 ` [PATCH 3/5] meson: subprojects: replace submodules with wrap files Paolo Bonzini
@ 2023-05-30 12:23   ` Daniel P. Berrangé
  2023-05-30 12:51     ` Paolo Bonzini
  0 siblings, 1 reply; 24+ messages in thread
From: Daniel P. Berrangé @ 2023-05-30 12:23 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: qemu-devel, peter.maydell, thuth

On Sat, May 27, 2023 at 11:28:49AM +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                           | 75 ++++++++++++-----------------
>  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, 61 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 c9f2e737c09a..3c997d7265b2 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 f8b2ddf3877c..a934c85e4e40 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 2f908660e4f1..1d1b8736c0eb 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=*) git="$optarg"
>    ;;
>    --with-git-submodules=*)
> @@ -774,10 +762,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"
>    ;;
> @@ -789,6 +773,30 @@ 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 download subprojects."

Building from tarball will be ok as we bundle everything affected. This
errror will hit anyone building from git with --disable-download though.

How should developers/users download the subprojects ? Can we tell them
what command is needed ?


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] 24+ messages in thread

* Re: [PATCH 0/5] meson: replace submodules with wrap files
  2023-05-27  9:28 [PATCH 0/5] meson: replace submodules with wrap files Paolo Bonzini
                   ` (5 preceding siblings ...)
  2023-05-30 12:18 ` [PATCH 0/5] meson: replace submodules with wrap files Thomas Huth
@ 2023-05-30 12:30 ` Daniel P. Berrangé
  2023-05-30 12:47   ` Paolo Bonzini
  6 siblings, 1 reply; 24+ messages in thread
From: Daniel P. Berrangé @ 2023-05-30 12:30 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: qemu-devel, peter.maydell, thuth

On Sat, May 27, 2023 at 11:28:46AM +0200, Paolo Bonzini wrote:
> 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;
> more on this later in this cover letter.
> 
> I'm not sure what's the best way to proceed for roms/SLOF.  Some
> possibilities, in no particular order, include:
> 
> * doing nothing
> 
> * merging --with-git-submodules with --enable-download, and
>   moving the git-submodule.sh rules from the main Makefile to
>   pc-bios/s390-ccw/ (my favorite option)
> 
> * copying the relevant SLOF files into pc-bios/
> 
> Also, getting into more overengineered territory:
> 
> * same as the second option, but also replace the roms/ submodules
>   with text files, in a format similar to .wrap files; meson uses the
>   standard configparser to read them, so it would not be a lot of
>   code.  The files would be parsed by scripts/make-release and
>   pc-bios/s390-ccw/Makefile.
> 
> * adding support for firmware with a meson build system to
>   configure; turn SLOF into a wrap and roms/SLOF into a symlink
>   for ../pc-bios/s390-ccw/subprojects/SLOF.  I'm mentioning this for
>   completeness but this is not something I would like.  On the other
>   hand it could reuse some (or most?) of the code currently used to
>   generate config-meson.cross, so maybe it isn't that bad...


Is there a reason why SLOF/s390-ccw is handled differently from
the other ROMs ?  ie, why haven't we checked in the pre-built
firmware binaries, such that we don't build SLOF by default ?


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] 24+ messages in thread

* Re: [PATCH 0/5] meson: replace submodules with wrap files
  2023-05-30 12:30 ` Daniel P. Berrangé
@ 2023-05-30 12:47   ` Paolo Bonzini
  0 siblings, 0 replies; 24+ messages in thread
From: Paolo Bonzini @ 2023-05-30 12:47 UTC (permalink / raw)
  To: Daniel P. Berrangé; +Cc: qemu-devel, peter.maydell, thuth

On Tue, May 30, 2023 at 2:31 PM Daniel P. Berrangé <berrange@redhat.com> wrote:
> > * adding support for firmware with a meson build system to
> >   configure; turn SLOF into a wrap and roms/SLOF into a symlink
> >   for ../pc-bios/s390-ccw/subprojects/SLOF.  I'm mentioning this for
> >   completeness but this is not something I would like.  On the other
> >   hand it could reuse some (or most?) of the code currently used to
> >   generate config-meson.cross, so maybe it isn't that bad...
>
> Is there a reason why SLOF/s390-ccw is handled differently from
> the other ROMs ?  ie, why haven't we checked in the pre-built
> firmware binaries, such that we don't build SLOF by default ?

The SLOF ROM is checked in.

s390-ccw is also checked in, but it is a QEMU-specific ROM like, on
x86, linuxboot.bin or multiboot.bin. Therefore it's rebuilt by "make"
and its build system is part of QEMU's.

The relationship between s390-ccw and SLOF is that s390-ccw _reuses_
the network stack of SLOF, and pc-bios/s390-ccw/Makefile does so by
simply looking at sources at $(SOURCE_PATH)../../roms/SLOF.

Paolo

>
>
> 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] 24+ messages in thread

* Re: [PATCH 3/5] meson: subprojects: replace submodules with wrap files
  2023-05-30 12:23   ` Daniel P. Berrangé
@ 2023-05-30 12:51     ` Paolo Bonzini
  2023-05-30 12:54       ` Daniel P. Berrangé
  0 siblings, 1 reply; 24+ messages in thread
From: Paolo Bonzini @ 2023-05-30 12:51 UTC (permalink / raw)
  To: Daniel P. Berrangé; +Cc: qemu-devel, peter.maydell, thuth

On Tue, May 30, 2023 at 2:24 PM Daniel P. Berrangé <berrange@redhat.com> wrote:
> > +    if test -e "$source_path/.git"; then
> > +        echo "--disable-download specified but subprojects were not"
> > +        echo "checked out.  Please download subprojects."
>
> Building from tarball will be ok as we bundle everything affected. This
> errror will hit anyone building from git with --disable-download though.

Right, just like it hits people doing --with-git-submodule=ignore; but
you're right that --disable-download is more generic and therefore
this error is more likely to happen.

> How should developers/users download the subprojects ? Can we tell them
> what command is needed ?

For those that want to use --disable-download, I can include "meson
subprojects download" in the error message, e.g "Please invoke "meson
subprojects download" before configuring QEMU, or remove
--disable-download from the command line."

Paolo



^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 4/5] configure: check for SLOF submodule before building pc-bios/s390-ccw
  2023-05-30 12:04   ` Thomas Huth
@ 2023-05-30 12:53     ` Paolo Bonzini
  2023-05-30 13:00       ` Thomas Huth
  0 siblings, 1 reply; 24+ messages in thread
From: Paolo Bonzini @ 2023-05-30 12:53 UTC (permalink / raw)
  To: Thomas Huth; +Cc: qemu-devel, peter.maydell, berrange

On Tue, May 30, 2023 at 2:04 PM Thomas Huth <thuth@redhat.com> wrote:
> On 27/05/2023 11.28, Paolo Bonzini wrote:
> > SLOF is required for building the s390-ccw firmware on s390x,
> > since it is using the libnet code from SLOF for network booting.
> >
> > If SLOF is absent and submodules are not updated, pc-bios/s390-ccw
> > cannot be built.
> >
> > Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> > ---
> >   configure | 3 ++-
> >   1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/configure b/configure
> > index 1d1b8736c0eb..c92a3b30b9a4 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 && \
> > +    ( test "$git_submodules_action" != ignore || test -f roms/SLOF/VERSION ); then
> >     write_c_skeleton
> >     do_compiler "$target_cc" $target_cc_cflags -march=z900 -o $TMPO -c $TMPC
> >     has_z900=$?
>
> Not sure if we really need this. Only the networking part of the s390-ccw
> bios cannot be build without SLOF, but the main binary still builds fine
> also without it.

Thinking more about it---considering we have prebuilt s390-ccw
binaries, why would someone want to rebuild only one of the ROMs and
risk breaking the other? Should we keep this patch, and also include
$(SRC_PATH)/netboot.mak unconditionally from
pc-bios/s390-ccw/Makefile?

Paolo



^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 3/5] meson: subprojects: replace submodules with wrap files
  2023-05-30 12:51     ` Paolo Bonzini
@ 2023-05-30 12:54       ` Daniel P. Berrangé
  0 siblings, 0 replies; 24+ messages in thread
From: Daniel P. Berrangé @ 2023-05-30 12:54 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: qemu-devel, peter.maydell, thuth

On Tue, May 30, 2023 at 02:51:07PM +0200, Paolo Bonzini wrote:
> On Tue, May 30, 2023 at 2:24 PM Daniel P. Berrangé <berrange@redhat.com> wrote:
> > > +    if test -e "$source_path/.git"; then
> > > +        echo "--disable-download specified but subprojects were not"
> > > +        echo "checked out.  Please download subprojects."
> >
> > Building from tarball will be ok as we bundle everything affected. This
> > errror will hit anyone building from git with --disable-download though.
> 
> Right, just like it hits people doing --with-git-submodule=ignore; but
> you're right that --disable-download is more generic and therefore
> this error is more likely to happen.
> 
> > How should developers/users download the subprojects ? Can we tell them
> > what command is needed ?
> 
> For those that want to use --disable-download, I can include "meson
> subprojects download" in the error message, e.g "Please invoke "meson
> subprojects download" before configuring QEMU, or remove
> --disable-download from the command line."

Ok, that sounds reasonable to add to the message.

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] 24+ messages in thread

* Re: [PATCH 0/5] meson: replace submodules with wrap files
  2023-05-30 12:18 ` [PATCH 0/5] meson: replace submodules with wrap files Thomas Huth
@ 2023-05-30 12:57   ` Daniel P. Berrangé
  2023-05-30 13:22     ` Paolo Bonzini
  0 siblings, 1 reply; 24+ messages in thread
From: Daniel P. Berrangé @ 2023-05-30 12:57 UTC (permalink / raw)
  To: Thomas Huth; +Cc: Paolo Bonzini, qemu-devel, peter.maydell, qemu-s390x

On Tue, May 30, 2023 at 02:18:30PM +0200, Thomas Huth wrote:
> On 27/05/2023 11.28, Paolo Bonzini wrote:
> > This series replaces git submodules for bundled libraries with .wrap
> > files that can be used directly by meson for subprojects.
> ...
> > The remaining submodules consist of tests/lcitool/libvirt-ci and the
> > firmware in roms/.
> 
> We talked about moving the contents of roms/ to a separate repository a
> couple of times ... maybe it's time now that we really do it?
> 
> (However, when I tried to tackle the "do we need to ship the firmware
> sources with the main tarball" problem the last time, there was no consensus
> how to do it best, see
> https://lore.kernel.org/qemu-devel/20221128092555.37102-1-thuth@redhat.com/
> ... maybe something to discuss at KVM forum...)
> 
> > 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;
> > more on this later in this cover letter.
> > 
> > I'm not sure what's the best way to proceed for roms/SLOF.  Some
> > possibilities, in no particular order, include:
> > 
> > * doing nothing
> > 
> > * merging --with-git-submodules with --enable-download, and
> >    moving the git-submodule.sh rules from the main Makefile to
> >    pc-bios/s390-ccw/ (my favorite option)
> > 
> > * copying the relevant SLOF files into pc-bios/
> 
> Considering that SLOF is also rather on life support already (there is now
> VOF for the sPAPR machine instead, Alexey left IBM, ...), I also wouldn't
> mind the third option, I think.
> 
> But of course we can also start with option 2 and go for option 3 later.

My inclination would be for option 3 too, just copy the relevant files
into s390-ccw dir, so the two distinct ROMs are fully separated from
each other.

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] 24+ messages in thread

* Re: [PATCH 4/5] configure: check for SLOF submodule before building pc-bios/s390-ccw
  2023-05-30 12:53     ` Paolo Bonzini
@ 2023-05-30 13:00       ` Thomas Huth
  0 siblings, 0 replies; 24+ messages in thread
From: Thomas Huth @ 2023-05-30 13:00 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: qemu-devel, peter.maydell, berrange

On 30/05/2023 14.53, Paolo Bonzini wrote:
> On Tue, May 30, 2023 at 2:04 PM Thomas Huth <thuth@redhat.com> wrote:
>> On 27/05/2023 11.28, Paolo Bonzini wrote:
>>> SLOF is required for building the s390-ccw firmware on s390x,
>>> since it is using the libnet code from SLOF for network booting.
>>>
>>> If SLOF is absent and submodules are not updated, pc-bios/s390-ccw
>>> cannot be built.
>>>
>>> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
>>> ---
>>>    configure | 3 ++-
>>>    1 file changed, 2 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/configure b/configure
>>> index 1d1b8736c0eb..c92a3b30b9a4 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 && \
>>> +    ( test "$git_submodules_action" != ignore || test -f roms/SLOF/VERSION ); then
>>>      write_c_skeleton
>>>      do_compiler "$target_cc" $target_cc_cflags -march=z900 -o $TMPO -c $TMPC
>>>      has_z900=$?
>>
>> Not sure if we really need this. Only the networking part of the s390-ccw
>> bios cannot be build without SLOF, but the main binary still builds fine
>> also without it.
> 
> Thinking more about it---considering we have prebuilt s390-ccw
> binaries, why would someone want to rebuild only one of the ROMs and
> risk breaking the other? Should we keep this patch, and also include
> $(SRC_PATH)/netboot.mak unconditionally from
> pc-bios/s390-ccw/Makefile?

Yes, I think it makes sense nowadays. In the beginning, the network 
bootloader was considered experimental and thus optional, but I think it is 
well established nowadays, so it makes sense to always build it together 
with the other part of the s390-ccw bios.

  Thomas



^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 0/5] meson: replace submodules with wrap files
  2023-05-30 12:57   ` Daniel P. Berrangé
@ 2023-05-30 13:22     ` Paolo Bonzini
  0 siblings, 0 replies; 24+ messages in thread
From: Paolo Bonzini @ 2023-05-30 13:22 UTC (permalink / raw)
  To: Daniel P. Berrangé
  Cc: Thomas Huth, qemu-devel, peter.maydell, qemu-s390x

On Tue, May 30, 2023 at 2:57 PM Daniel P. Berrangé <berrange@redhat.com> wrote:
> > > I'm not sure what's the best way to proceed for roms/SLOF.  Some
> > > possibilities, in no particular order, include:
> > >
> > > * doing nothing
> > >
> > > * merging --with-git-submodules with --enable-download, and
> > >    moving the git-submodule.sh rules from the main Makefile to
> > >    pc-bios/s390-ccw/ (my favorite option)
> > >
> > > * copying the relevant SLOF files into pc-bios/
> >
> > Considering that SLOF is also rather on life support already (there is now
> > VOF for the sPAPR machine instead, Alexey left IBM, ...), I also wouldn't
> > mind the third option, I think.
> >
> > But of course we can also start with option 2 and go for option 3 later.
>
> My inclination would be for option 3 too, just copy the relevant files
> into s390-ccw dir, so the two distinct ROMs are fully separated from
> each other.

Note that the amount of code is not small (7.000 lines of source for the
network stack and 1.000 for libc); but yeah, that can be done.

Paolo



^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2023-05-30 13:23 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-27  9:28 [PATCH 0/5] meson: replace submodules with wrap files Paolo Bonzini
2023-05-27  9:28 ` [PATCH 1/5] configure: remove --with-git= option Paolo Bonzini
2023-05-30 11:58   ` Thomas Huth
2023-05-30 12:03     ` Paolo Bonzini
2023-05-30 12:17       ` Daniel P. Berrangé
2023-05-30 12:18   ` Daniel P. Berrangé
2023-05-27  9:28 ` [PATCH 2/5] configure: rename --enable-pypi to --enable-download, control subprojects too Paolo Bonzini
2023-05-27 16:49   ` BALATON Zoltan
2023-05-27 19:18     ` Paolo Bonzini
2023-05-30 12:00   ` Thomas Huth
2023-05-27  9:28 ` [PATCH 3/5] meson: subprojects: replace submodules with wrap files Paolo Bonzini
2023-05-30 12:23   ` Daniel P. Berrangé
2023-05-30 12:51     ` Paolo Bonzini
2023-05-30 12:54       ` Daniel P. Berrangé
2023-05-27  9:28 ` [PATCH 4/5] configure: check for SLOF submodule before building pc-bios/s390-ccw Paolo Bonzini
2023-05-30 12:04   ` Thomas Huth
2023-05-30 12:53     ` Paolo Bonzini
2023-05-30 13:00       ` Thomas Huth
2023-05-27  9:28 ` [PATCH 5/5] meson: subprojects: replace berkeley-{soft, test}float-3 with wraps Paolo Bonzini
2023-05-30 12:18 ` [PATCH 0/5] meson: replace submodules with wrap files Thomas Huth
2023-05-30 12:57   ` Daniel P. Berrangé
2023-05-30 13:22     ` Paolo Bonzini
2023-05-30 12:30 ` Daniel P. Berrangé
2023-05-30 12:47   ` 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).