From 54f4d2f1ab6c2737c82e686db476946a4fb5c935 Mon Sep 17 00:00:00 2001 From: Sergej Schumilo Date: Wed, 11 May 2022 19:40:57 +0200 Subject: [PATCH 1/4] check arguments before compiling dependencies --- compile_qemu_nyx.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/compile_qemu_nyx.sh b/compile_qemu_nyx.sh index 0dc40aa558..b3b7ce4f7c 100755 --- a/compile_qemu_nyx.sh +++ b/compile_qemu_nyx.sh @@ -102,6 +102,14 @@ if [ "$#" -ne 1 ] ; then error fi +case $1 in + "dynamic"|"debug"|"debug_static"|"static"|"lto") + ;; + *) + error + ;; + esac + if [ -z "$LIBXDC_ROOT" -o -z "$CAPSTONE_ROOT" ]; then git submodule init git submodule update libxdc From b39169eca6c0fda7b653d94c58fc82c197e8f3dd Mon Sep 17 00:00:00 2001 From: Sergej Schumilo Date: Wed, 11 May 2022 19:50:43 +0200 Subject: [PATCH 2/4] =?UTF-8?q?don=E2=80=99t=20install=20libxdc=20or=20lib?= =?UTF-8?q?capstone=20(in=20non-static=20mode)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- compile_qemu_nyx.sh | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/compile_qemu_nyx.sh b/compile_qemu_nyx.sh index b3b7ce4f7c..aa9a44bd53 100755 --- a/compile_qemu_nyx.sh +++ b/compile_qemu_nyx.sh @@ -39,19 +39,14 @@ error() compile_libraries() { - echo "[!] Compiling capstone4..." - make -C $CAPSTONE_ROOT -j $(nproc) - - echo "[!] Compiling libxdc..." - LDFLAGS="-L$CAPSTONE_ROOT -L$LIBXDC_ROOT" CFLAGS="-I$CAPSTONE_ROOT/include/" make -C $LIBXDC_ROOT -j $(nproc) - case $1 in - "dynamic"|"debug") - echo "[!] Installing capstone4..." - sudo make -C $CAPSTONE_ROOT install - echo "[!] Installing libxdc..." - sudo make -C $LIBXDC_ROOT install - ;; + "debug_static"|"static"|"lto") + echo "[!] Compiling capstone4..." + make -C $CAPSTONE_ROOT -j $(nproc) + + echo "[!] Compiling libxdc..." + LDFLAGS="-L$CAPSTONE_ROOT -L$LIBXDC_ROOT" CFLAGS="-I$CAPSTONE_ROOT/include/" make -C $LIBXDC_ROOT -j $(nproc) + ;; esac } From dd901b5f84e1b63b0aaefa16d4189908184e7c5f Mon Sep 17 00:00:00 2001 From: Sergej Schumilo Date: Wed, 11 May 2022 19:53:11 +0200 Subject: [PATCH 3/4] fix build script (error in non-static mode) --- compile_qemu_nyx.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/compile_qemu_nyx.sh b/compile_qemu_nyx.sh index aa9a44bd53..a3702b0b10 100755 --- a/compile_qemu_nyx.sh +++ b/compile_qemu_nyx.sh @@ -60,7 +60,6 @@ configure_qemu() export QEMU_CFLAGS="-I$CAPSTONE_ROOT/include/ -I$LIBXDC_ROOT/ $QEMU_CFLAGS" ;; *) - error ;; esac From 847a32fbf24a88439aea14c869f248e1e3314990 Mon Sep 17 00:00:00 2001 From: Sergej Schumilo Date: Wed, 11 May 2022 19:53:55 +0200 Subject: [PATCH 4/4] update libxdc submodule --- libxdc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libxdc b/libxdc index df32642c98..78f0fb6394 160000 --- a/libxdc +++ b/libxdc @@ -1 +1 @@ -Subproject commit df32642c985864c187ad3db13be1dc8c3155d888 +Subproject commit 78f0fb6394ab297c78aa76bf671ebb0eae05ddc9