Skip to content

Commit d2dfe0b

Browse files
committed
meson: subprojects: replace berkeley-{soft,test}float-3 with wraps
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. Reviewed-by: Daniel P. Berrangé <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
1 parent bf6903f commit d2dfe0b

File tree

12 files changed

+590
-581
lines changed

12 files changed

+590
-581
lines changed

.gitmodules

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,6 @@
2828
[submodule "roms/u-boot-sam460ex"]
2929
path = roms/u-boot-sam460ex
3030
url = https://gitlab.com/qemu-project/u-boot-sam460ex.git
31-
[submodule "tests/fp/berkeley-testfloat-3"]
32-
path = tests/fp/berkeley-testfloat-3
33-
url = https://gitlab.com/qemu-project/berkeley-testfloat-3.git
34-
[submodule "tests/fp/berkeley-softfloat-3"]
35-
path = tests/fp/berkeley-softfloat-3
36-
url = https://gitlab.com/qemu-project/berkeley-softfloat-3.git
3731
[submodule "roms/edk2"]
3832
path = roms/edk2
3933
url = https://gitlab.com/qemu-project/edk2.git

configure

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -805,28 +805,6 @@ case $git_submodules_action in
805805
fi
806806
;;
807807
ignore)
808-
if ! test -f "$source_path/tests/fp/berkeley-testfloat-3/README.md"
809-
then
810-
echo
811-
echo "ERROR: missing GIT submodules"
812-
echo
813-
if test -e "$source_path/.git"; then
814-
echo "--with-git-submodules=ignore specified but submodules were not"
815-
echo "checked out. Please initialize and update submodules."
816-
else
817-
echo "This is not a GIT checkout but module content appears to"
818-
echo "be missing. Do not use 'git archive' or GitHub download links"
819-
echo "to acquire QEMU source archives. Non-GIT builds are only"
820-
echo "supported with source archives linked from:"
821-
echo
822-
echo " https://www.qemu.org/download/#source"
823-
echo
824-
echo "Developers working with GIT can use scripts/archive-source.sh"
825-
echo "if they need to create valid source archives."
826-
fi
827-
echo
828-
exit 1
829-
fi
830808
;;
831809
*)
832810
echo "ERROR: invalid --with-git-submodules= value '$git_submodules_action'"
@@ -1142,11 +1120,6 @@ if test "$tcg" = "auto"; then
11421120
fi
11431121
fi
11441122

1145-
if test "$tcg" = "enabled"; then
1146-
git_submodules="$git_submodules tests/fp/berkeley-testfloat-3"
1147-
git_submodules="$git_submodules tests/fp/berkeley-softfloat-3"
1148-
fi
1149-
11501123
##########################################
11511124
# big/little endian test
11521125
cat > $TMPC << EOF

scripts/archive-source.sh

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ sub_file="${sub_tdir}/submodule.tar"
2626
# independent of what the developer currently has initialized
2727
# in their checkout, because the build environment is completely
2828
# different to the host OS.
29-
subprojects="dtc keycodemapdb libvfio-user"
30-
submodules="tests/fp/berkeley-softfloat-3 tests/fp/berkeley-testfloat-3"
29+
subprojects="dtc keycodemapdb libvfio-user berkeley-softfloat-3 berkeley-testfloat-3"
3130
sub_deinit=""
3231

3332
function cleanup() {
@@ -51,25 +50,6 @@ function tree_ish() {
5150

5251
git archive --format tar "$(tree_ish)" > "$tar_file"
5352
test $? -ne 0 && error "failed to archive qemu"
54-
for sm in $submodules; do
55-
status="$(git submodule status "$sm")"
56-
smhash="${status#[ +-]}"
57-
smhash="${smhash%% *}"
58-
case "$status" in
59-
-*)
60-
sub_deinit="$sub_deinit $sm"
61-
git submodule update --init "$sm"
62-
test $? -ne 0 && error "failed to update submodule $sm"
63-
;;
64-
+*)
65-
echo "WARNING: submodule $sm is out of sync"
66-
;;
67-
esac
68-
(cd $sm; git archive --format tar --prefix "$sm/" $(tree_ish)) > "$sub_file"
69-
test $? -ne 0 && error "failed to archive submodule $sm ($smhash)"
70-
tar --concatenate --file "$tar_file" "$sub_file"
71-
test $? -ne 0 && error "failed append submodule $sm to $tar_file"
72-
done
7353

7454
for sp in $subprojects; do
7555
meson subprojects download $sp

scripts/make-release

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ if [ $# -ne 2 ]; then
1717
fi
1818

1919
# Only include wraps that are invoked with subproject()
20-
SUBPROJECTS="dtc libvfio-user keycodemapdb"
20+
SUBPROJECTS="dtc libvfio-user keycodemapdb berkeley-softfloat-3 berkeley-testfloat-3"
2121

2222
src="$1"
2323
version="$2"

subprojects/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
/packagecache
22

3+
/berkeley-softfloat-3
4+
/berkeley-testfloat-3
35
/dtc
46
/keycodemapdb
57
/libvfio-user
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[wrap-git]
2+
url = https://gitlab.com/qemu-project/berkeley-softfloat-3
3+
revision = b64af41c3276f97f0e181920400ee056b9c88037
4+
patch_directory = berkeley-softfloat-3
5+
depth = 1
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[wrap-git]
2+
url = https://gitlab.com/qemu-project/berkeley-testfloat-3
3+
revision = 40619cbb3bf32872df8c53cc457039229428a263
4+
patch_directory = berkeley-testfloat-3
5+
depth = 1

0 commit comments

Comments
 (0)