2
0
Fork 0

solo5: 0.6.3 -> 0.6.4

This commit is contained in:
Emery Hemingway 2020-04-02 17:03:41 +05:30
parent 45c90b30b3
commit 33fa10e0c0
4 changed files with 110 additions and 323 deletions

View File

@ -38,13 +38,13 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"info": { "info": {
"lastModified": 1585225173, "lastModified": 1585835256,
"narHash": "sha256-wWMFs6+s7lv5u3eTuitrEna1vPx44tCxpllxmy+/SvE=" "narHash": "sha256-8+3D0tUeUEzGSBMTw0FNZBCMB0negok5VisXm9vkz1U="
}, },
"locked": { "locked": {
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "9ee46bfb230226118ea70c9ed364021834965d0b", "rev": "09190b9c16c6021fa29733874986c46c00144ed1",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@ -1,52 +1,45 @@
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
{ stdenv, buildPackages, fetchurl, pkgconfig, genodeLibcCross }: { stdenv, buildPackages, fetchurl, solo5-tools }:
# WARNING: recursive make ahead # WARNING: recursive make ahead
let version = "0.6.3"; let version = "0.6.4";
in stdenv.mkDerivation { in stdenv.mkDerivation {
pname = "solo5"; pname = "solo5";
inherit version; inherit version;
outputs = [ "out" "dev" "tests" ];
outputs = [ "out" "tests" ]; nativeBuildInputs = [ solo5-tools ];
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ genodeLibcCross ];
src = fetchurl { src = fetchurl {
url = url =
"https://github.com/Solo5/solo5/releases/download/v${version}/solo5-v${version}.tar.gz"; "https://github.com/Solo5/solo5/releases/download/v${version}/solo5-v${version}.tar.gz";
sha256 = "08z2gv0jlsq6r92vacapdj0hqhyfqfy3xdjn5k9c1pd23a2syq7w"; sha256 = "sha256-7KyBXM0ZaG2WLoHpq6o/VoP8/qyclIEY9Hh/aLhcQlA=";
}; };
enableParallelBuilding = true; enableParallelBuilding = true;
patches = [ ./genode.patch ]; patches = [ ./genode.patch ./elftool.patch ];
configurePhase = '' configurePhase = ''
runHook preConfigure runHook preConfigure
sh configure.sh
rm -fr tests/test_tls rm -fr tests/test_tls
HOSTCC=${buildPackages.stdenv.cc}/bin/cc sh configure.sh
runHook postConfigure runHook postConfigure
''; '';
makeFlags = "CXXFLAGS=-Wno-mismatched-tags";
installPhase = '' installPhase = ''
runHook preInstall runHook preInstall
mkdir -p $out/bin $tests/bin install -Dt $out/lib bindings/genode/solo5.lib.so
make install-opam-genode PREFIX=$out mkdir $dev
local wrong_path=`find $NIX_BUILD_TOP -name solo5.lib.so` cp -r include/solo5 $dev/include
for test in tests/*/*.genode; do for test in tests/*/*.genode; do
cp $test $tests/bin/solo5-`basename $test .genode` install -D $test $tests/bin/solo5-$(basename $test .genode)
done done
runHook postInstall runHook postInstall
''; '';
preFixup = "$STRIP $out/lib/solo5-bindings-genode/solo5.lib.so";
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "Sandboxed execution environment."; description = "Sandboxed execution environment.";
homepage = "https://github.com/solo5/solo5"; homepage = "https://github.com/solo5/solo5";

View File

@ -0,0 +1,38 @@
diff --git a/GNUmakefile b/GNUmakefile
index 2c6716a..9249c80 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -21,9 +21,9 @@ $(TOPDIR)/Makeconf:
$(error Makeconf not found, please run ./configure.sh)
include Makefile.common
-SUBDIRS := bindings tenders elftool tests
+SUBDIRS := bindings tenders tests
-tests: bindings elftool
+tests: bindings
.PHONY: $(SUBDIRS)
diff --git a/tests/Makefile.tests b/tests/Makefile.tests
index d4e1191..45560a8 100644
--- a/tests/Makefile.tests
+++ b/tests/Makefile.tests
@@ -34,15 +34,12 @@ BINDINGS.muen := $(TOPDIR)/bindings/muen/solo5_muen.o
LDS.genode := $(TOPDIR)/bindings/genode/genode_dyn.ld
BINDINGS.genode := $(TOPDIR)/bindings/genode/solo5.lib.so
-ELFTOOL := $(TOPDIR)/elftool/solo5-elftool
-
# As a test is currently a single source file, we don't try to do any
# dependency auto-generation here, and just hard-code all expected dependencies
# as pre-requisites below.
-manifest.c: manifest.json ../../include/solo5/mft_abi.h $(ELFTOOL)
- @echo "ELFTOOL $<"
- $(ELFTOOL) gen-manifest $< $@
+manifest.c: manifest.json ../../include/solo5/mft_abi.h
+ solo5-elftool gen-manifest $< $@
%.o: %.c ../../include/solo5/solo5.h
@echo "CC $<"

View File

@ -1,8 +1,8 @@
diff --git a/GNUmakefile b/GNUmakefile diff --git a/GNUmakefile b/GNUmakefile
index e168853..02d81e1 100644 index feca365..2c6716a 100644
--- a/GNUmakefile --- a/GNUmakefile
+++ b/GNUmakefile +++ b/GNUmakefile
@@ -98,9 +98,11 @@ install-opam-%: all opam/solo5-bindings-%.pc force-install @@ -111,9 +111,11 @@ install-opam-%: all opam/solo5-bindings-%.pc force-install
(echo "error: PREFIX not set or incorrect"; false) (echo "error: PREFIX not set or incorrect"; false)
mkdir -p $(PREFIX)/lib/pkgconfig \ mkdir -p $(PREFIX)/lib/pkgconfig \
$(PREFIX)/lib/solo5-bindings-$* \ $(PREFIX)/lib/solo5-bindings-$* \
@ -18,7 +18,7 @@ index e168853..02d81e1 100644
cp bindings/$*/solo5_$*.o bindings/$*/solo5_$*.lds \ cp bindings/$*/solo5_$*.o bindings/$*/solo5_$*.lds \
$(PREFIX)/lib/solo5-bindings-$* $(PREFIX)/lib/solo5-bindings-$*
diff --git a/Makefile.common b/Makefile.common diff --git a/Makefile.common b/Makefile.common
index 5ccc2ea..2653a8b 100644 index 5ccc2ea..d64732c 100644
--- a/Makefile.common --- a/Makefile.common
+++ b/Makefile.common +++ b/Makefile.common
@@ -30,8 +30,10 @@ include $(TOPDIR)/Makeconf @@ -30,8 +30,10 @@ include $(TOPDIR)/Makeconf
@ -28,7 +28,7 @@ index 5ccc2ea..2653a8b 100644
+CXX := $(MAKECONF_CXX) +CXX := $(MAKECONF_CXX)
CFLAGS := -std=c11 -Wall -Wextra -Werror -O2 -g CFLAGS := -std=c11 -Wall -Wextra -Werror -O2 -g
CFLAGS += -ffreestanding -fstack-protector-strong $(MAKECONF_CFLAGS) CFLAGS += -ffreestanding -fstack-protector-strong $(MAKECONF_CFLAGS)
+CXXFLAGS += -Wall -Wextra -Werror -O2 -g +CXXFLAGS += -Wall -Wextra -Werror -O2 -g $(MAKECONF_CXXFLAGS)
CPPFLAGS := -isystem $(TOPDIR)/include/crt -I$(TOPDIR)/include/solo5 CPPFLAGS := -isystem $(TOPDIR)/include/crt -I$(TOPDIR)/include/solo5
LD := $(MAKECONF_LD) LD := $(MAKECONF_LD)
LDFLAGS := -nostdlib -z max-page-size=$(CONFIG_GUEST_PAGE_SIZE) -static \ LDFLAGS := -nostdlib -z max-page-size=$(CONFIG_GUEST_PAGE_SIZE) -static \
@ -45,15 +45,6 @@ index 5ccc2ea..2653a8b 100644
define COMPILE.S define COMPILE.S
@echo "AS $<" @echo "AS $<"
$(CC) $(DEPFLAGS) $(CFLAGS) $(CPPFLAGS) -DASM_FILE -c $< -o $@ $(CC) $(DEPFLAGS) $(CFLAGS) $(CPPFLAGS) -DASM_FILE -c $< -o $@
@@ -63,7 +71,7 @@ endef
# The following variables and recpies apply to building tenders, i.e.
# artifacts built to run on the (Solo5 tender's) *host*.
#
-HOSTCC := $(MAKECONF_CC)
+HOSTCC := $(MAKECONF_HOSTCC)
HOSTCFLAGS := -Wall -Werror -std=c11 -fstack-protector-strong -O2 -g
HOSTCPPFLAGS := -I$(TOPDIR)/include/solo5
HOSTLDFLAGS :=
diff --git a/bindings/GNUmakefile b/bindings/GNUmakefile diff --git a/bindings/GNUmakefile b/bindings/GNUmakefile
index 147c245..d3efb36 100644 index 147c245..d3efb36 100644
--- a/bindings/GNUmakefile --- a/bindings/GNUmakefile
@ -89,20 +80,10 @@ index 147c245..d3efb36 100644
GENODE_LDFLAGS := -nostdlib -z max-page-size=$(CONFIG_GUEST_PAGE_SIZE) -shared \ GENODE_LDFLAGS := -nostdlib -z max-page-size=$(CONFIG_GUEST_PAGE_SIZE) -shared \
-gc-sections --eh-frame-hdr --entry=0x0 -T genode/genode_rel.ld -gc-sections --eh-frame-hdr --entry=0x0 -T genode/genode_rel.ld
diff --git a/bindings/genode/bindings.cc b/bindings/genode/bindings.cc diff --git a/bindings/genode/bindings.cc b/bindings/genode/bindings.cc
index eb55ffb..2b7db70 100644 index 5785ae5..2b7db70 100644
--- a/bindings/genode/bindings.cc --- a/bindings/genode/bindings.cc
+++ b/bindings/genode/bindings.cc +++ b/bindings/genode/bindings.cc
@@ -35,15 +35,15 @@ @@ -44,8 +44,6 @@ extern struct mft1_note __solo5_mft1_note;
#include <base/component.h>
#include <base/sleep.h>
+#define restrict __restrict__
+
/* Solo5 includes */
extern "C" {
#include "../bindings.h"
-extern struct mft_note __solo5_manifest_note;
+extern struct mft1_note __solo5_mft1_note;
} }
// Compile the MFT utilities as C++ // Compile the MFT utilities as C++
@ -111,7 +92,7 @@ index eb55ffb..2b7db70 100644
#include "../../tenders/common/mft.c" #include "../../tenders/common/mft.c"
namespace Solo5 namespace Solo5
@@ -109,32 +109,32 @@ struct Solo5::Device @@ -111,32 +109,32 @@ struct Solo5::Device
{ {
virtual virtual
solo5_result_t solo5_result_t
@ -150,80 +131,7 @@ index eb55ffb..2b7db70 100644
return SOLO5_R_EINVAL; } return SOLO5_R_EINVAL; }
}; };
@@ -162,7 +162,7 @@ struct Solo5::Net_device final : Device @@ -610,11 +608,44 @@ solo5_block_read(solo5_handle_t handle, solo5_off_t offset,
Net_device(struct mft_entry &me,
Genode::Env &env,
Range_allocator &alloc,
- solo5_handle_set_t ready_set,
+ solo5_handle_set_t &ready_set,
solo5_handle_t handle)
: _nic(env, &alloc, NIC_BUFFER_SIZE, NIC_BUFFER_SIZE, me.name)
, _signal_handler(env.ep(), *this, &Net_device::_handle_signal)
@@ -330,7 +330,7 @@ struct Solo5::Platform
static Platform *instance;
static Device *devices[MFT_MAX_ENTRIES];
- struct mft &mft;
+ struct mft const &mft;
/**
* Reference to the Genode base enviroment
@@ -376,7 +376,7 @@ struct Solo5::Platform
*
* TODO: periodic RTC synchronization
*/
- Genode::uint64_t _initial_epoch { rtc_epoch(env) };
+ Genode::uint64_t _initial_epoch { 0 };
/**
* Commandline buffer
@@ -387,7 +387,8 @@ struct Solo5::Platform
/**
* Constructor
*/
- Platform(struct mft &mft, Genode::Env &env) : mft(mft), env(env)
+ Platform(struct mft const &mft, Genode::Env &env)
+ : mft(mft), env(env)
{
/**
* Acquire and attach a ROM dataspace (shared
@@ -400,7 +401,7 @@ struct Solo5::Platform
// Copy-out the cmdline if configured.
try { cmdline = config.sub_node("cmdline").decoded_content<Cmdline>(); }
- catch (...) { }
+ catch (Genode::Xml_node::Nonexistent_sub_node) { }
for (solo5_handle_t i = 0U; i < MFT_MAX_ENTRIES; ++i) {
devices[i] = &invalid_device;
@@ -422,6 +423,15 @@ struct Solo5::Platform
** Solo5 bindings **
********************/
+ solo5_time_t clock_wall()
+ {
+ if (_initial_epoch == 0)
+ _initial_epoch = rtc_epoch(env);
+
+ return _initial_epoch * 1000000000ULL
+ + timer.curr_time().trunc_to_plain_us().value * 1000ULL;
+ }
+
void
yield(solo5_time_t deadline_ns, solo5_handle_set_t *ready_set)
{
@@ -526,9 +536,7 @@ solo5_time_t solo5_clock_monotonic(void)
solo5_time_t solo5_clock_wall(void)
{
- return Platform::instance->_initial_epoch * 1000000000ULL
- + Platform::instance->timer.curr_time()
- .trunc_to_plain_us().value * 1000ULL;
+ return Platform::instance->clock_wall();
}
@@ -600,11 +608,44 @@ solo5_block_read(solo5_handle_t handle, solo5_off_t offset,
solo5_result_t solo5_result_t
@ -269,51 +177,15 @@ index eb55ffb..2b7db70 100644
} // extern "C" } // extern "C"
@@ -616,16 +657,19 @@ solo5_set_tls_base(uintptr_t base) @@ -632,7 +663,7 @@ void Component::construct(Genode::Env &env)
void Component::construct(Genode::Env &env) mft_get_builtin_mft1(&__solo5_mft1_note, &mft, &mft_size);
{
/* Validate the device manifest */ if (mft_validate(mft, mft_size) != 0) {
- struct mft &mft = __solo5_manifest_note.m; - Genode::error("Solo5: ", res, " Built-in manifest validation failed. Aborting.");
- size_t mft_size = __solo5_manifest_note.h.descsz;
- if (mft_validate(&mft, mft_size) != 0) {
- Genode::error("Solo5: Built-in manifest validation failed. Aborting");
+ const struct mft *mft;
+ size_t mft_size;
+
+ mft_get_builtin_mft1(&__solo5_mft1_note, &mft, &mft_size);
+
+ if (mft_validate(mft, mft_size) != 0) {
+ Genode::error("Solo5: Built-in manifest validation failed. Aborting."); + Genode::error("Solo5: Built-in manifest validation failed. Aborting.");
env.parent().exit(~0); env.parent().exit(~0);
return; return;
} }
/* Construct a statically allocated platform object */
- static Solo5::Platform inst(mft, env);
+ static Solo5::Platform inst(*mft, env);
Platform::instance = &inst;
static struct solo5_start_info si {
@@ -641,12 +685,14 @@ void Component::construct(Genode::Env &env)
if (si.heap_size > 1<<20)
si.heap_size -= 1<<19;
- /* allocate a contiguous memory region for the application */
- Genode::Dataspace_capability heap_ds =
- env.pd().alloc(si.heap_size);
+ {
+ /* allocate a contiguous memory region for the application */
+ Genode::Dataspace_capability heap_ds =
+ env.pd().alloc(si.heap_size);
- /* attach into our address-space */
- si.heap_start = env.rm().attach(heap_ds);
+ /* attach into our address-space */
+ si.heap_start = env.rm().attach(heap_ds);
+ }
/* block for application then exit */
env.parent().exit(solo5_app_main(&si));
diff --git a/bindings/genode/stubs.c b/bindings/genode/stubs.c diff --git a/bindings/genode/stubs.c b/bindings/genode/stubs.c
deleted file mode 100644 deleted file mode 100644
index 0f1ca5c..0000000 index 0f1ca5c..0000000
@ -344,10 +216,34 @@ index 0f1ca5c..0000000
-uintptr_t SSP_GUARD; -uintptr_t SSP_GUARD;
-void SSP_FAIL (void) { } -void SSP_FAIL (void) { }
diff --git a/configure.sh b/configure.sh diff --git a/configure.sh b/configure.sh
index be0f3a2..d5d0c14 100755 index f762933..e75f41a 100755
--- a/configure.sh --- a/configure.sh
+++ b/configure.sh +++ b/configure.sh
@@ -89,6 +89,7 @@ ld_is_lld() @@ -233,6 +233,23 @@ config_host_openbsd()
CONFIG_GENODE=
}
+config_host_genode()
+{
+ cc_is_clang || die "Only Clang is supported on Genode"
+ [ "${CONFIG_ARCH}" = "x86_64" ] ||
+ die "Only 'x86_64' is supported on Genode"
+
+ MAKECONF_CXXFLAGS="-mno-retpoline -Wno-mismatched-tags -Wno-undefined-bool-conversion -Wno-uninitialized -Wno-unknown-attributes -Wno-unused-variable -Wno-unused-parameter"
+ MAKECONF_LDFLAGS="-nopie"
+
+ [ -n "${OPT_ONLY_TOOLS}" ] && return
+ CONFIG_GENODE=1
+ CONFIG_HVT=
+ CONFIG_MUEN=
+ CONFIG_SPT=
+ CONFIG_VIRTIO=
+}
+
# Check for a tools-only build.
OPT_ONLY_TOOLS=
if [ -n "$1" ]; then
@@ -245,6 +262,7 @@ fi
# Allow external override of CC. # Allow external override of CC.
CC=${CC:-cc} CC=${CC:-cc}
@ -355,7 +251,7 @@ index be0f3a2..d5d0c14 100755
LD=${LD:-ld} LD=${LD:-ld}
CC_MACHINE=$(${CC} -dumpmachine) CC_MACHINE=$(${CC} -dumpmachine)
@@ -116,6 +117,10 @@ case ${CC_MACHINE} in @@ -272,6 +290,10 @@ case ${CC_MACHINE} in
CONFIG_ARCH=x86_64 CONFIG_HOST=OpenBSD CONFIG_ARCH=x86_64 CONFIG_HOST=OpenBSD
CONFIG_GUEST_PAGE_SIZE=0x1000 CONFIG_GUEST_PAGE_SIZE=0x1000
;; ;;
@ -366,77 +262,30 @@ index be0f3a2..d5d0c14 100755
*) *)
die "Unsupported toolchain target: ${CC_MACHINE}" die "Unsupported toolchain target: ${CC_MACHINE}"
;; ;;
@@ -131,6 +136,7 @@ CONFIG_SPT= @@ -303,6 +325,9 @@ case "${CONFIG_HOST}" in
CONFIG_VIRTIO= OpenBSD)
CONFIG_MUEN= config_host_openbsd
CONFIG_GENODE=
+CONFIG_HOST_CRT=
MAKECONF_CFLAGS=
MAKECONF_LDFLAGS=
MAKECONF_SPT_CFLAGS=
@@ -143,6 +149,8 @@ case "${CONFIG_HOST}" in
cc_is_gcc || die "Only 'gcc' 4.x+ is supported on Linux"
CC_INCDIR=$(${CC} -print-file-name=include)
[ -d "${CC_INCDIR}" ] || die "Cannot determine gcc include directory"
+
+ CONFIG_HOST_CRT=1
mkdir -p ${HOST_INCDIR}
cp -R ${CC_INCDIR}/. ${HOST_INCDIR}
@@ -202,8 +210,8 @@ case "${CONFIG_HOST}" in
fi
[ "${CONFIG_ARCH}" = "x86_64" ] && CONFIG_VIRTIO=1
[ "${CONFIG_ARCH}" = "x86_64" ] && CONFIG_MUEN=1
- [ "${CONFIG_ARCH}" = "x86_64" ] && CONFIG_GENODE=1
[ "${CONFIG_ARCH}" = "ppc64le" ] && CONFIG_HVT=
+ CONFIG_GENODE=
;;
FreeBSD)
# On FreeBSD/clang we use -nostdlibinc which gives us access to the
@@ -221,6 +229,7 @@ case "${CONFIG_HOST}" in
x86/_types.h x86/_limits.h"
SRCS="float.h osreldate.h stddef.h stdint.h stdbool.h stdarg.h"
+ CONFIG_HOST_CRT=1
mkdir -p ${HOST_INCDIR}
mkdir -p ${HOST_INCDIR}/machine ${HOST_INCDIR}/sys ${HOST_INCDIR}/x86
for f in ${SRCS_MACH}; do cp -f ${INCDIR}/$f ${HOST_INCDIR}/machine; done
@@ -240,6 +249,21 @@ case "${CONFIG_HOST}" in
[ "${CONFIG_ARCH}" = "x86_64" ] && CONFIG_MUEN=1
CONFIG_GENODE=
;; ;;
+ Genode) + Genode)
+ cc_is_clang || die "Only 'clang' is supported on Genode" + config_host_genode
+ [ "${CONFIG_ARCH}" = "x86_64" ] ||
+ die "Only 'x86_64' is supported on Genode"
+ ld_is_lld || die "Using GNU 'ld' is not supported on Genode"
+
+ MAKECONF_CFLAGS="-mno-retpoline -nostdlibinc"
+ MAKECONF_LDFLAGS="-nopie"
+
+ CONFIG_HVT=
+ CONFIG_SPT=
+ CONFIG_VIRTIO=
+ CONFIG_MUEN=
+ CONFIG_GENODE=1
+ ;; + ;;
OpenBSD) *)
# On OpenBSD/clang we use -nostdlibinc which gives us access to the die "Unsupported build OS: ${CONFIG_HOST}"
# clang-provided headers for compiler instrinsics. We copy the rest ;;
@@ -259,6 +283,7 @@ case "${CONFIG_HOST}" in @@ -315,7 +340,7 @@ esac
SRCS_AMD64="amd64/_float.h amd64/stdarg.h amd64/endian.h" # GNU make. Given the differences in quoting rules between the two
SRCS="float.h stddef.h stdint.h stdbool.h stdarg.h" # (unable to sensibly use VAR="VALUE"), our convention is as follows:
#
+ CONFIG_HOST_CRT=1 -# 1. GNU make parses the entire file, i.e. all variables defined below are
mkdir -p ${HOST_INCDIR} +# 1. GNU make parses the entire file, i.e. all variables defined below are
mkdir -p ${HOST_INCDIR}/machine ${HOST_INCDIR}/sys ${HOST_INCDIR}/amd64 # available to Makefiles.
for f in ${SRCS_MACH}; do cp -f ${INCDIR}/$f ${HOST_INCDIR}/machine; done #
@@ -304,13 +329,16 @@ CONFIG_SPT=${CONFIG_SPT} # 2. Shell scripts parse the subset of *lines* starting with "CONFIG_". I.e.
CONFIG_VIRTIO=${CONFIG_VIRTIO} @@ -333,11 +358,13 @@ CONFIG_VIRTIO=${CONFIG_VIRTIO}
CONFIG_MUEN=${CONFIG_MUEN} CONFIG_MUEN=${CONFIG_MUEN}
CONFIG_GENODE=${CONFIG_GENODE} CONFIG_GENODE=${CONFIG_GENODE}
+CONFIG_HOST_CRT=${CONFIG_HOST_CRT}
MAKECONF_CFLAGS=${MAKECONF_CFLAGS} MAKECONF_CFLAGS=${MAKECONF_CFLAGS}
+MAKECONF_CXXFLAGS=${MAKECONF_CXXFLAGS}
MAKECONF_LDFLAGS=${MAKECONF_LDFLAGS} MAKECONF_LDFLAGS=${MAKECONF_LDFLAGS}
CONFIG_ARCH=${CONFIG_ARCH} CONFIG_ARCH=${CONFIG_ARCH}
CONFIG_HOST=${CONFIG_HOST} CONFIG_HOST=${CONFIG_HOST}
@ -444,10 +293,8 @@ index be0f3a2..d5d0c14 100755
MAKECONF_CC=${CC} MAKECONF_CC=${CC}
+MAKECONF_CXX=${CXX} +MAKECONF_CXX=${CXX}
MAKECONF_LD=${LD} MAKECONF_LD=${LD}
+MAKECONF_HOSTCC=${HOSTCC:-$CC}
MAKECONF_SPT_CFLAGS=${MAKECONF_SPT_CFLAGS} MAKECONF_SPT_CFLAGS=${MAKECONF_SPT_CFLAGS}
MAKECONF_SPT_LDLIBS=${MAKECONF_SPT_LDLIBS} MAKECONF_SPT_LDLIBS=${MAKECONF_SPT_LDLIBS}
CONFIG_SPT_NO_PIE=${CONFIG_SPT_NO_PIE}
diff --git a/include/solo5/mft_abi.h b/include/solo5/mft_abi.h diff --git a/include/solo5/mft_abi.h b/include/solo5/mft_abi.h
index 537c7bc..47927b0 100644 index 537c7bc..47927b0 100644
--- a/include/solo5/mft_abi.h --- a/include/solo5/mft_abi.h
@ -462,97 +309,6 @@ index 537c7bc..47927b0 100644
_Static_assert((offsetof(struct mft1_note, m) & (MFT1_NOTE_ALIGN - 1)) == 0, _Static_assert((offsetof(struct mft1_note, m) & (MFT1_NOTE_ALIGN - 1)) == 0,
"struct mft1_note.m is not aligned to a MFT1_NOTE_ALIGN boundary"); "struct mft1_note.m is not aligned to a MFT1_NOTE_ALIGN boundary");
diff --git a/opam/solo5-bindings-genode.opam b/opam/solo5-bindings-genode.opam
index eba9ac0..e8ea3ba 100644
--- a/opam/solo5-bindings-genode.opam
+++ b/opam/solo5-bindings-genode.opam
@@ -16,7 +16,10 @@ remove: [
["touch" "./Makeconf"]
[make "V=1" "uninstall-opam-genode" "PREFIX=%{prefix}%"]
]
-depends: "conf-pkg-config"
+depends: [
+ "conf-pkg-config"
+ "conf-libseccomp" {build & os = "linux"}
+]
conflicts: [
"solo5-bindings-hvt"
"solo5-bindings-spt"
diff --git a/opam/solo5-bindings-hvt.opam b/opam/solo5-bindings-hvt.opam
index 81a2d70..04dd3f4 100644
--- a/opam/solo5-bindings-hvt.opam
+++ b/opam/solo5-bindings-hvt.opam
@@ -18,7 +18,10 @@ remove: [
["touch" "./Makeconf"]
[make "V=1" "uninstall-opam-hvt" "PREFIX=%{prefix}%"]
]
-depends: "conf-pkg-config"
+depends: [
+ "conf-pkg-config"
+ "conf-libseccomp" {build & os = "linux"}
+]
depexts: [
["linux-headers"] {os-distribution = "alpine"}
["linux-libc-dev"] {os-distribution = "debian"}
diff --git a/opam/solo5-bindings-muen.opam b/opam/solo5-bindings-muen.opam
index c180646..60b0356 100644
--- a/opam/solo5-bindings-muen.opam
+++ b/opam/solo5-bindings-muen.opam
@@ -18,7 +18,10 @@ remove: [
["touch" "./Makeconf"]
[make "V=1" "uninstall-opam-muen" "PREFIX=%{prefix}%"]
]
-depends: "conf-pkg-config"
+depends: [
+ "conf-pkg-config"
+ "conf-libseccomp" {build & os = "linux"}
+]
conflicts: [
"solo5-bindings-genode"
"solo5-bindings-hvt"
diff --git a/opam/solo5-bindings-spt.opam b/opam/solo5-bindings-spt.opam
index 416605c..74940f9 100644
--- a/opam/solo5-bindings-spt.opam
+++ b/opam/solo5-bindings-spt.opam
@@ -18,18 +18,16 @@ remove: [
["touch" "./Makeconf"]
[make "V=1" "uninstall-opam-spt" "PREFIX=%{prefix}%"]
]
-depends: "conf-pkg-config"
+depends: [
+ "conf-pkg-config"
+ "conf-libseccomp" {os = "linux"}
+]
depexts: [
["linux-headers"] {os-distribution = "alpine"}
["linux-libc-dev"] {os-distribution = "debian"}
["kernel-headers"] {os-distribution = "fedora"}
["kernel-headers"] {os-distribution = "rhel"}
["linux-libc-dev"] {os-distribution = "ubuntu"}
- ["libseccomp-dev"] {os-distribution = "alpine"}
- ["libseccomp-dev"] {os-distribution = "debian"}
- ["libseccomp-devel"] {os-distribution = "fedora"}
- ["libseccomp-devel"] {os-distribution = "rhel"}
- ["libseccomp-dev"] {os-distribution = "ubuntu"}
]
conflicts: [
"solo5-bindings-hvt"
diff --git a/opam/solo5-bindings-virtio.opam b/opam/solo5-bindings-virtio.opam
index 7171244..a10655f 100644
--- a/opam/solo5-bindings-virtio.opam
+++ b/opam/solo5-bindings-virtio.opam
@@ -18,7 +18,10 @@ remove: [
["touch" "./Makeconf"]
[make "V=1" "uninstall-opam-virtio" "PREFIX=%{prefix}%"]
]
-depends: "conf-pkg-config"
+depends: [
+ "conf-pkg-config"
+ "conf-libseccomp" {build & os = "linux"}
+]
conflicts: [
"solo5-bindings-hvt"
"solo5-bindings-spt"
diff --git a/tests/Makefile.tests b/tests/Makefile.tests diff --git a/tests/Makefile.tests b/tests/Makefile.tests
index 2cd0dcd..d4e1191 100644 index 2cd0dcd..d4e1191 100644
--- a/tests/Makefile.tests --- a/tests/Makefile.tests