summary refs log tree commit diff
path: root/pkgs/development/libraries/pcre
diff options
context:
space:
mode:
authorSergei Trofimovich <slyich@gmail.com>2022-04-13 18:03:51 +0100
committerSergei Trofimovich <slyich@gmail.com>2022-04-13 18:07:16 +0100
commitae34f371428684713dbacdfaff578ecdf2571ff0 (patch)
tree8e96b3adb21367d23c471e64e490b74a9197d9bd /pkgs/development/libraries/pcre
parent7feda9ba09f47b6fb574dc34b9bddb0a1c6a1473 (diff)
downloadnixpkgs-ae34f371428684713dbacdfaff578ecdf2571ff0.tar
nixpkgs-ae34f371428684713dbacdfaff578ecdf2571ff0.tar.gz
nixpkgs-ae34f371428684713dbacdfaff578ecdf2571ff0.tar.bz2
nixpkgs-ae34f371428684713dbacdfaff578ecdf2571ff0.tar.lz
nixpkgs-ae34f371428684713dbacdfaff578ecdf2571ff0.tar.xz
nixpkgs-ae34f371428684713dbacdfaff578ecdf2571ff0.tar.zst
nixpkgs-ae34f371428684713dbacdfaff578ecdf2571ff0.zip
pcre, pcre2: autodetect jit support, don't force-enable
PCRE JIT is not supported on most architectores: m68k, s390,
ia64 to name a few.

Example build failure is:

    $ nix build -f. pkgsCross.s390.pcre
    ...
    pcre_jit_compile.c:65:2: error: #error Unsupported architecture

The change shifts from --enable-jit[=yes] to --enable-jit=auto which
allows nixpkgs to enable jit automatically only on supported targets.
Diffstat (limited to 'pkgs/development/libraries/pcre')
-rw-r--r--pkgs/development/libraries/pcre/default.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkgs/development/libraries/pcre/default.nix b/pkgs/development/libraries/pcre/default.nix
index 5fc8d496ba9..9d4e52acb4d 100644
--- a/pkgs/development/libraries/pcre/default.nix
+++ b/pkgs/development/libraries/pcre/default.nix
@@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
   outputs = [ "bin" "dev" "out" "doc" "man" ];
 
   # Disable jit on Apple Silicon, https://github.com/zherczeg/sljit/issues/51
-  configureFlags = optional (!stdenv.hostPlatform.isRiscV && !(stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64)) "--enable-jit" ++ [
+  configureFlags = optional (!(stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64)) "--enable-jit=auto" ++ [
     "--enable-unicode-properties"
     "--disable-cpp"
   ]