On 25/6/23 23:27, Yeqi Fu wrote:
This commit implements a shared library, where native functions are
rewritten as specialized instructions. At runtime, user programs load
the shared library, and specialized instructions are executed when
native functions are called.
Signed-off-by: Yeqi Fu <fufuyqqq...@gmail.com>
---
Makefile | 2 +
common-user/native/Makefile.include | 9 +++
common-user/native/Makefile.target | 26 +++++++
common-user/native/libnative.c | 112 ++++++++++++++++++++++++++++
configure | 84 ++++++++++++++++-----
include/native/libnative.h | 12 +++
include/native/native-defs.h | 65 ++++++++++++++++
7 files changed, 293 insertions(+), 17 deletions(-)
create mode 100644 common-user/native/Makefile.include
create mode 100644 common-user/native/Makefile.target
create mode 100644 common-user/native/libnative.c
create mode 100644 include/native/libnative.h
create mode 100644 include/native/native-defs.h
diff --git a/configure b/configure
index 2a556d14c9..64edbda892 100755
--- a/configure
+++ b/configure
@@ -1838,48 +1838,42 @@ if test "$ccache_cpp2" = "yes"; then
echo "export CCACHE_CPP2=y" >> $config_host_mak
fi
-# tests/tcg configuration
-(config_host_mak=tests/tcg/config-host.mak
-mkdir -p tests/tcg
-echo "# Automatically generated by configure - do not modify" >
$config_host_mak
-echo "SRC_PATH=$source_path" >> $config_host_mak
-echo "HOST_CC=$host_cc" >> $config_host_mak
+# prepare config files for cross build
+config_corss_build_host_mak=cross-build/config-host.mak
+mkdir -p cross-build
+echo "# Automatically generated by configure - do not modify" >
$config_corss_build_host_mak
+echo "SRC_PATH=$source_path" >> $config_corss_build_host_mak
+echo "HOST_CC=$host_cc" >> $config_corss_build_host_mak
Typo "cross". Possibly part of the 'configure' changes unrelated
to libnative could be split in a preliminary patch.