Unverified Commit 243b7dde authored by Atemu's avatar Atemu Committed by GitHub
Browse files

x265: fix cross-compiling to armv7 (#339822)

parents ae73301a 61cfeab4
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -79,6 +79,9 @@ stdenv.mkDerivation rec {
    "-DEXPORT_C_API=OFF"
  ] ++ lib.optionals stdenv.hostPlatform.isPower [
    "-DENABLE_ALTIVEC=OFF" # https://bitbucket.org/multicoreware/x265_git/issues/320/fail-to-build-on-power8-le
  ] ++ lib.optionals isCross [
    (mkFlag stdenv.hostPlatform.isAarch32 "CROSS_COMPILE_ARM")
    (mkFlag stdenv.hostPlatform.isAarch64 "CROSS_COMPILE_ARM64")
  ];

  preConfigure = lib.optionalString multibitdepthSupport ''
@@ -99,11 +102,6 @@ stdenv.mkDerivation rec {
      ${mkFlag cliSupport "ENABLE_CLI"}
      ${mkFlag unittestsSupport "ENABLE_TESTS"}
    )
  '' + lib.optionalString isCross ''
    cmakeFlagsArray+=(
      ${mkFlag (stdenv.hostPlatform.isAarch32) "CROSS_COMPILE_ARM"}
      ${mkFlag (stdenv.hostPlatform.isAarch64) "CROSS_COMPILE_ARM64"}
    )
  '';

  # Builds 10bits and 12bits static libs on the side if multi bit-depth is wanted