Merge pull request #295243 from skeuchel/riscv-catch2

catch2_3: fix build on riscv
This commit is contained in:
K900 2024-05-07 11:06:05 +03:00 committed by GitHub
commit f4b6ee7b3f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -31,9 +31,12 @@ stdenv.mkDerivation rec {
"-DCMAKE_CTEST_ARGUMENTS=-E;ApprovalTests"
];
# Tests fail on x86_32 if compiled with x87 floats: https://github.com/catchorg/Catch2/issues/2796
env = lib.optionalAttrs stdenv.isx86_32 {
# Tests fail on x86_32 if compiled with x87 floats: https://github.com/catchorg/Catch2/issues/2796
NIX_CFLAGS_COMPILE = "-msse2 -mfpmath=sse";
} // lib.optionalAttrs (stdenv.hostPlatform.isRiscV || stdenv.hostPlatform.isAarch32) {
# Build failure caused by -Werror: https://github.com/catchorg/Catch2/issues/2808
NIX_CFLAGS_COMPILE = "-Wno-error=cast-align";
};
doCheck = true;