mkxp-z/subprojects/packagefiles/flac-emscripten-endian.patch
刘皓 b339eea1a7
Downgrade FLAC in libretro builds to 1.4.3
Some of the Android builds broke in the 1.5.0 update.
2025-06-04 11:38:25 -04:00

16 lines
613 B
Diff

# Disables checking for endianness when targeting Emscripten because it causes configuration errors, and because we already know Emscripten targets are always little-endian.
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -137,7 +137,10 @@ check_c_source_compiles("
}"
HAVE_LANGINFO_CODESET)
-test_big_endian(CPU_IS_BIG_ENDIAN)
+string(TOLOWER ${CMAKE_SYSTEM_NAME} SYSTEM_LOWER)
+if(NOT SYSTEM_LOWER STREQUAL "emscripten")
+ test_big_endian(CPU_IS_BIG_ENDIAN)
+endif()
check_c_compiler_flag(-Werror HAVE_WERROR_FLAG)
check_c_compiler_flag(-Wdeclaration-after-statement HAVE_DECL_AFTER_STMT_FLAG)