Unverified Commit 26ea5dc6 authored by Amadej Kastelic's avatar Amadej Kastelic
Browse files

rizin: 0.7.4 -> 0.8.1

parent 7bbd8c41
Loading
Loading
Loading
Loading
+0 −30
Original line number Diff line number Diff line
From 93acbc13cf271faf6025e96991eb3ab65062f90f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= <joerg@thalheim.io>
Date: Sat, 9 Mar 2024 09:35:24 +0100
Subject: [PATCH] fix compilation with clang
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Jörg Thalheim <joerg@thalheim.io>
---
 librz/analysis/p/analysis_xtensa.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/librz/analysis/p/analysis_xtensa.c b/librz/analysis/p/analysis_xtensa.c
index 4a32d2037c..f7331ae376 100644
--- a/librz/analysis/p/analysis_xtensa.c
+++ b/librz/analysis/p/analysis_xtensa.c
@@ -21,7 +21,8 @@ typedef struct {
 static bool xtensa_init(void **user) {
 	XtensaContext *ctx = RZ_NEW0(XtensaContext);
 	rz_return_val_if_fail(ctx, false);
-	memcpy(ctx->length_table, (int[16]){ 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 8, 8 }, sizeof(ctx->length_table));
+	int temp_length_table[16] = { 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 8, 8 };
+	memcpy(ctx->length_table, temp_length_table, sizeof(ctx->length_table));
 	ctx->insn_buffer = NULL;
 	ctx->slot_buffer = NULL;
 	*user = ctx;
-- 
2.43.1
+0 −36
Original line number Diff line number Diff line
diff --git a/meson.build b/meson.build
index a8153a2ee5..787cbfae06 100644
--- a/meson.build
+++ b/meson.build
@@ -197,7 +197,7 @@ endif
 
 # Handle PCRE2
 cpu_jit_supported = [ 'aarch64', 'arm', 'mips', 'mips64', 'ppc', 'ppc64', 'riscv32', 'riscv64', 's390x', 'x86', 'x86_64' ]
-pcre2_jit_supported = target_machine.cpu_family() in cpu_jit_supported and cc.get_id() != 'tcc' and target_machine.system() != 'darwin'
+pcre2_jit_supported = false
 if pcre2_jit_supported
   add_project_arguments(['-DSUPPORTS_PCRE2_JIT'], language: 'c')
 endif
diff --git a/subprojects/packagefiles/pcre2/meson.build b/subprojects/packagefiles/pcre2/meson.build
index b40ea85740..f3ee7a02ed 100644
--- a/subprojects/packagefiles/pcre2/meson.build
+++ b/subprojects/packagefiles/pcre2/meson.build
@@ -60,18 +60,6 @@ cpu_jit_supported = [ 'aarch64', 'arm', 'mips', 'mips64', 'ppc', 'ppc64', 'riscv
 # tcc doesn't support the MSVC asm syntax PCRE2 uses (`__asm { ... }`).
 # Darwin kernel not as well, because of forbidden wx memory.
 # It is used in the JIT compiler code.
-if cc.get_id() != 'tcc' and target_machine.cpu_family() in cpu_jit_supported and target_machine.system() != 'darwin'
-  libpcre2_c_args += ['-DSUPPORT_JIT']
-  pcre2_files += ['src/pcre2_jit_compile.c']
-endif
-
-if target_machine.system() == 'openbsd'
-  # jit compilation fails with "no more memory" if wx allocations are allowed.
-  libpcre2_c_args += ['-DSLJIT_WX_EXECUTABLE_ALLOCATOR']
-elif target_machine.system() == 'netbsd'
-  # jit compilation fails with "no more memory" if wx allocations are allowed.
-  libpcre2_c_args += ['-DSLJIT_PROT_EXECUTABLE_ALLOCATOR']
-endif
 
 pcre2_includes = [
   include_directories('.'),
+2 −6
Original line number Diff line number Diff line
@@ -29,11 +29,11 @@
let
  rizin = stdenv.mkDerivation rec {
    pname = "rizin";
    version = "0.7.4";
    version = "0.8.1";

    src = fetchurl {
      url = "https://github.com/rizinorg/rizin/releases/download/v${version}/rizin-src-v${version}.tar.xz";
      hash = "sha256-9xGJEOXchDw4uqPgCzDsAZoc3VwTK6K8Fs8MdJdjEgE=";
      hash = "sha256-7yseZSXX3DasQ1JblWdJwcyge/F8H+2LZkAtggEKTsI=";
    };

    mesonFlags = [
@@ -60,10 +60,6 @@ let
      # caching it. This patch replaces the entire logic to only look at
      # the env var NIX_RZ_PREFIX
      ./librz-wrapper-support.patch

      ./0001-fix-compilation-with-clang.patch
      # Can be dropped when upstream fixes this: https://github.com/NixOS/nixpkgs/issues/300056
      ./0002-disable-pcre2-jit.patch
    ];

    nativeBuildInputs = [