Unverified Commit 03dcb2b3 authored by John Ericson's avatar John Ericson Committed by GitHub
Browse files

libblake3: fix FreeBSD cross-compile builds (#401250)

parents b974a8a0 d15765c0
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -38,6 +38,15 @@ stdenv.mkDerivation (finalAttrs: {
    tbb_2021_11
  ];

  patches = [
    # build(cmake): Relax Clang frontend variant detection (BLAKE3-team/BLAKE3#477)
    (fetchpatch {
      url = "https://patch-diff.githubusercontent.com/raw/BLAKE3-team/BLAKE3/pull/477.patch";
      hash = "sha256-kidCMGd/i9D9HLLTt7l1DbiU71sFTEyr3Vew4XHUHls=";
      relative = "c";
    })
  ];

  cmakeFlags = [
    (lib.cmakeBool "BLAKE3_USE_TBB" useTBB)
    (lib.cmakeBool "BUILD_SHARED_LIBS" (!stdenv.hostPlatform.isStatic))
+6 −5
Original line number Diff line number Diff line
@@ -34,11 +34,12 @@ stdenv.mkDerivation rec {
      url = "https://patch-diff.githubusercontent.com/raw/oneapi-src/oneTBB/pull/899.patch";
      hash = "sha256-kU6RRX+sde0NrQMKlNtW3jXav6J4QiVIUmD50asmBPU=";
    })
  ];

  cmakeFlags = [
    # Skip tests to work around https://github.com/uxlfoundation/oneTBB/issues/1695
    (lib.cmakeBool "TBB_TEST" (!stdenv.hostPlatform.isWindows))
    # Fix tests on FreeBSD and Windows
    (fetchpatch {
      name = "fix-tbb-freebsd-and-windows-tests.patch";
      url = "https://patch-diff.githubusercontent.com/raw/uxlfoundation/oneTBB/pull/1696.patch";
      hash = "sha256-yjX2FkOK8bz29a/XSA7qXgQw9lxzx8VIgEBREW32NN4=";
    })
  ];

  # Fix build with modern gcc
+6 −5
Original line number Diff line number Diff line
@@ -44,11 +44,12 @@ stdenv.mkDerivation rec {
      url = "https://patch-diff.githubusercontent.com/raw/oneapi-src/oneTBB/pull/1193.patch";
      hash = "sha256-ZQbwUmuIZoGVBof8QNR3V8vU385e2X7EvU3+Fbj4+M8=";
    })
  ];

  cmakeFlags = [
    # Skip tests to work around https://github.com/uxlfoundation/oneTBB/issues/1695
    (lib.cmakeBool "TBB_TEST" (!stdenv.hostPlatform.isWindows))
    # Fix tests on FreeBSD and Windows
    (fetchpatch {
      name = "fix-tbb-freebsd-and-windows-tests.patch";
      url = "https://patch-diff.githubusercontent.com/raw/uxlfoundation/oneTBB/pull/1696.patch";
      hash = "sha256-yjX2FkOK8bz29a/XSA7qXgQw9lxzx8VIgEBREW32NN4=";
    })
  ];

  # Fix build with modern gcc