diff --git a/packages/emulators/standalone/mupen64plus-sa/mupen64plus-sa-audio-sdl/package.mk b/packages/emulators/standalone/mupen64plus-sa/mupen64plus-sa-audio-sdl/package.mk index 0b7d5fe0b..b6dc338fd 100644 --- a/packages/emulators/standalone/mupen64plus-sa/mupen64plus-sa-audio-sdl/package.mk +++ b/packages/emulators/standalone/mupen64plus-sa/mupen64plus-sa-audio-sdl/package.mk @@ -27,6 +27,7 @@ make_target() { export USE_GLES=1 ;; x86_64) + export HOST_CPU=x86_64 PKG_MAKE_OPTS_TARGET+="USE_GLES=0" ;; esac diff --git a/packages/emulators/standalone/mupen64plus-sa/mupen64plus-sa-core/package.mk b/packages/emulators/standalone/mupen64plus-sa/mupen64plus-sa-core/package.mk index 9fd22f3b5..5202c6651 100644 --- a/packages/emulators/standalone/mupen64plus-sa/mupen64plus-sa-core/package.mk +++ b/packages/emulators/standalone/mupen64plus-sa/mupen64plus-sa-core/package.mk @@ -27,6 +27,7 @@ make_target() { export USE_GLES=1 ;; x86_64) + export HOST_CPU=x86_64 PKG_MAKE_OPTS_TARGET+="USE_GLES=0" ;; esac diff --git a/packages/emulators/standalone/mupen64plus-sa/mupen64plus-sa-input-sdl/package.mk b/packages/emulators/standalone/mupen64plus-sa/mupen64plus-sa-input-sdl/package.mk index 7ebda6ecb..6ea2dda3c 100644 --- a/packages/emulators/standalone/mupen64plus-sa/mupen64plus-sa-input-sdl/package.mk +++ b/packages/emulators/standalone/mupen64plus-sa/mupen64plus-sa-input-sdl/package.mk @@ -27,6 +27,7 @@ make_target() { export USE_GLES=1 ;; x86_64) + export HOST_CPU=x86_64 PKG_MAKE_OPTS_TARGET+="USE_GLES=0" ;; esac diff --git a/packages/emulators/standalone/mupen64plus-sa/mupen64plus-sa-rsp-cxd4/package.mk b/packages/emulators/standalone/mupen64plus-sa/mupen64plus-sa-rsp-cxd4/package.mk index 0cd09b4b3..5486ba7a1 100644 --- a/packages/emulators/standalone/mupen64plus-sa/mupen64plus-sa-rsp-cxd4/package.mk +++ b/packages/emulators/standalone/mupen64plus-sa/mupen64plus-sa-rsp-cxd4/package.mk @@ -34,6 +34,7 @@ make_target() { CPPFLAGS="-DUSE_SSE2NEON" ;; x86_64) + export HOST_CPU=x86_64 PKG_MAKE_OPTS_TARGET+="USE_GLES=0" ;; esac diff --git a/packages/emulators/standalone/mupen64plus-sa/mupen64plus-sa-rsp-hle/package.mk b/packages/emulators/standalone/mupen64plus-sa/mupen64plus-sa-rsp-hle/package.mk index 3869c667a..227b89a51 100644 --- a/packages/emulators/standalone/mupen64plus-sa/mupen64plus-sa-rsp-hle/package.mk +++ b/packages/emulators/standalone/mupen64plus-sa/mupen64plus-sa-rsp-hle/package.mk @@ -27,6 +27,7 @@ make_target() { export USE_GLES=1 ;; x86_64) + export HOST_CPU=x86_64 PKG_MAKE_OPTS_TARGET+="USE_GLES=0" ;; esac diff --git a/packages/emulators/standalone/mupen64plus-sa/mupen64plus-sa-ui-console/package.mk b/packages/emulators/standalone/mupen64plus-sa/mupen64plus-sa-ui-console/package.mk index 18e7468fe..0ff98eaeb 100644 --- a/packages/emulators/standalone/mupen64plus-sa/mupen64plus-sa-ui-console/package.mk +++ b/packages/emulators/standalone/mupen64plus-sa/mupen64plus-sa-ui-console/package.mk @@ -27,6 +27,7 @@ make_target() { export USE_GLES=1 ;; x86_64) + export HOST_CPU=x86_64 PKG_MAKE_OPTS_TARGET+="USE_GLES=0" ;; esac diff --git a/packages/emulators/standalone/mupen64plus-sa/mupen64plus-sa-video-glide64mk2/package.mk b/packages/emulators/standalone/mupen64plus-sa/mupen64plus-sa-video-glide64mk2/package.mk index 2658e785e..3fa88540d 100644 --- a/packages/emulators/standalone/mupen64plus-sa/mupen64plus-sa-video-glide64mk2/package.mk +++ b/packages/emulators/standalone/mupen64plus-sa/mupen64plus-sa-video-glide64mk2/package.mk @@ -27,6 +27,7 @@ make_target() { export USE_GLES=1 ;; x86_64) + export HOST_CPU=x86_64 PKG_MAKE_OPTS_TARGET+="USE_GLES=0" ;; esac diff --git a/packages/emulators/standalone/mupen64plus-sa/mupen64plus-sa-video-gliden64/package.mk b/packages/emulators/standalone/mupen64plus-sa/mupen64plus-sa-video-gliden64/package.mk index cbb9976a4..de9ed8c7c 100644 --- a/packages/emulators/standalone/mupen64plus-sa/mupen64plus-sa-video-gliden64/package.mk +++ b/packages/emulators/standalone/mupen64plus-sa/mupen64plus-sa-video-gliden64/package.mk @@ -27,6 +27,7 @@ make_target() { PKG_MAKE_OPTS_TARGET+="-DNOHQ=On -DCRC_ARMV8=On -DEGL=On -DNEON_OPT=On" ;; x86_64) + export HOST_CPU=x86_64 PKG_MAKE_OPTS_TARGET+="USE_GLES=0" ;; esac diff --git a/packages/emulators/standalone/mupen64plus-sa/mupen64plus-sa-video-rice/package.mk b/packages/emulators/standalone/mupen64plus-sa/mupen64plus-sa-video-rice/package.mk index c4a2e33e3..4bb23a54d 100644 --- a/packages/emulators/standalone/mupen64plus-sa/mupen64plus-sa-video-rice/package.mk +++ b/packages/emulators/standalone/mupen64plus-sa/mupen64plus-sa-video-rice/package.mk @@ -27,6 +27,7 @@ make_target() { export USE_GLES=1 ;; x86_64) + export HOST_CPU=x86_64 PKG_MAKE_OPTS_TARGET+="USE_GLES=0" ;; esac diff --git a/packages/emulators/standalone/simple64-sa/package.mk b/packages/emulators/standalone/simple64-sa/package.mk index fb196d23f..faf659c27 100644 --- a/packages/emulators/standalone/simple64-sa/package.mk +++ b/packages/emulators/standalone/simple64-sa/package.mk @@ -11,11 +11,14 @@ PKG_LONGDESC="Simple64, a N64 Emulator" PKG_TOOLCHAIN="manual" pre_configure_target() { - case ${TARGET_ARCH} in + case ${ARCH} in aarch64|arm) + export HOST_CPU=aarch64 find . -type f -name CMakeLists.txt -exec sed -i 's/x86-64-v3/armv8-a/g' {} \; ;; - esac + x86_64) + export HOST_CPU=x86_64 + ;; } make_target() { diff --git a/packages/emulators/standalone/simple64-sa/patches/004-enable-cross-comp.patch b/packages/emulators/standalone/simple64-sa/patches/004-enable-cross-comp.patch new file mode 100644 index 000000000..0d51be5f5 --- /dev/null +++ b/packages/emulators/standalone/simple64-sa/patches/004-enable-cross-comp.patch @@ -0,0 +1,115 @@ +diff --git a/mupen64plus-core/CMakeLists.txt b/mupen64plus-core/CMakeLists.txt +index fad5e48..f20a8ab 100644 +--- a/mupen64plus-core/CMakeLists.txt ++++ b/mupen64plus-core/CMakeLists.txt +@@ -128,13 +128,13 @@ set_property(TARGET mupen64plus PROPERTY CXX_VISIBILITY_PRESET hidden) + set_property(TARGET mupen64plus PROPERTY VISIBILITY_INLINES_HIDDEN ON) + target_compile_options(mupen64plus PRIVATE -Ofast) + target_link_options(mupen64plus PRIVATE -Ofast) +-if (CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64") +- target_compile_options(mupen64plus PRIVATE -march=armv8-a) +- target_link_options(mupen64plus PRIVATE -march=armv8-a) +-else() ++# if (CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64") ++# target_compile_options(mupen64plus PRIVATE -march=armv8-a) ++# target_link_options(mupen64plus PRIVATE -march=armv8-a) ++# else() + target_compile_options(mupen64plus PRIVATE -march=x86-64-v3) + target_link_options(mupen64plus PRIVATE -march=x86-64-v3) +-endif() ++# endif() + if (NOT APPLE) + target_link_options(mupen64plus PRIVATE -Wl,-Bsymbolic -Wl,-Bsymbolic-functions) + endif (NOT APPLE) +diff --git a/parallel-rdp-standalone/CMakeLists.txt b/parallel-rdp-standalone/CMakeLists.txt +index 01d32ed..a4d777e 100644 +--- a/parallel-rdp-standalone/CMakeLists.txt ++++ b/parallel-rdp-standalone/CMakeLists.txt +@@ -74,13 +74,13 @@ set_property(TARGET ${NAME_PLUGIN_SIMPLE64} PROPERTY CXX_VISIBILITY_PRESET hidde + set_property(TARGET ${NAME_PLUGIN_SIMPLE64} PROPERTY VISIBILITY_INLINES_HIDDEN ON) + target_compile_options(${NAME_PLUGIN_SIMPLE64} PRIVATE -Ofast) + target_link_options(${NAME_PLUGIN_SIMPLE64} PRIVATE -Ofast) +-if (CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64") +- target_compile_options(${NAME_PLUGIN_SIMPLE64} PRIVATE -march=armv8-a) +- target_link_options(${NAME_PLUGIN_SIMPLE64} PRIVATE -march=armv8-a) +-else() ++# if (CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64") ++# target_compile_options(${NAME_PLUGIN_SIMPLE64} PRIVATE -march=armv8-a) ++# target_link_options(${NAME_PLUGIN_SIMPLE64} PRIVATE -march=armv8-a) ++# else() + target_compile_options(${NAME_PLUGIN_SIMPLE64} PRIVATE -march=x86-64-v3) + target_link_options(${NAME_PLUGIN_SIMPLE64} PRIVATE -march=x86-64-v3) +-endif() ++# endif() + if (NOT APPLE) + target_link_options(${NAME_PLUGIN_SIMPLE64} PRIVATE -Wl,-Bsymbolic -Wl,-Bsymbolic-functions) + endif (NOT APPLE) +diff --git a/parallel-rsp/CMakeLists.txt b/parallel-rsp/CMakeLists.txt +index 9c5bfcf..96a6b92 100644 +--- a/parallel-rsp/CMakeLists.txt ++++ b/parallel-rsp/CMakeLists.txt +@@ -89,13 +89,13 @@ set_property(TARGET ${NAME_PLUGIN_SIMPLE64} PROPERTY CXX_VISIBILITY_PRESET hidde + set_property(TARGET ${NAME_PLUGIN_SIMPLE64} PROPERTY VISIBILITY_INLINES_HIDDEN ON) + target_compile_options(${NAME_PLUGIN_SIMPLE64} PRIVATE -DHAVE_MMAP -Ofast) + target_link_options(${NAME_PLUGIN_SIMPLE64} PRIVATE -DHAVE_MMAP -Ofast) +-if (CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64") +- target_compile_options(${NAME_PLUGIN_SIMPLE64} PRIVATE -march=armv8-a) +- target_link_options(${NAME_PLUGIN_SIMPLE64} PRIVATE -march=armv8-a) +-else() ++# if (CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64") ++# target_compile_options(${NAME_PLUGIN_SIMPLE64} PRIVATE -march=armv8-a) ++# target_link_options(${NAME_PLUGIN_SIMPLE64} PRIVATE -march=armv8-a) ++# else() + target_compile_options(${NAME_PLUGIN_SIMPLE64} PRIVATE -march=x86-64-v3) + target_link_options(${NAME_PLUGIN_SIMPLE64} PRIVATE -march=x86-64-v3) +-endif() ++# endif() + if (NOT APPLE) + target_link_options(${NAME_PLUGIN_SIMPLE64} PRIVATE -Wl,-Bsymbolic -Wl,-Bsymbolic-functions) + endif (NOT APPLE) +diff --git a/simple64-audio-sdl2/CMakeLists.txt b/simple64-audio-sdl2/CMakeLists.txt +index d80a484..6d4d691 100644 +--- a/simple64-audio-sdl2/CMakeLists.txt ++++ b/simple64-audio-sdl2/CMakeLists.txt +@@ -26,13 +26,13 @@ set_property(TARGET simple64-audio-sdl2 PROPERTY VISIBILITY_INLINES_HIDDEN ON) + set_target_properties(simple64-audio-sdl2 PROPERTIES PREFIX "") + target_compile_options(simple64-audio-sdl2 PRIVATE -Ofast) + target_link_options(simple64-audio-sdl2 PRIVATE -Ofast) +-if (CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64") +- target_compile_options(simple64-audio-sdl2 PRIVATE -march=armv8-a) +- target_link_options(simple64-audio-sdl2 PRIVATE -march=armv8-a) +-else() ++# if (CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64") ++# target_compile_options(simple64-audio-sdl2 PRIVATE -march=armv8-a) ++# target_link_options(simple64-audio-sdl2 PRIVATE -march=armv8-a) ++# else() + target_compile_options(simple64-audio-sdl2 PRIVATE -march=x86-64-v3) + target_link_options(simple64-audio-sdl2 PRIVATE -march=x86-64-v3) +-endif() ++# endif() + if (NOT APPLE) + target_link_options(simple64-audio-sdl2 PRIVATE -Wl,-Bsymbolic -Wl,-Bsymbolic-functions) + endif (NOT APPLE) +diff --git a/simple64-gui/CMakeLists.txt b/simple64-gui/CMakeLists.txt +index a5d3ccb..c19cdeb 100644 +--- a/simple64-gui/CMakeLists.txt ++++ b/simple64-gui/CMakeLists.txt +@@ -76,13 +76,13 @@ set_property(TARGET simple64-gui PROPERTY CXX_VISIBILITY_PRESET hidden) + set_property(TARGET simple64-gui PROPERTY VISIBILITY_INLINES_HIDDEN ON) + target_compile_options(simple64-gui PRIVATE -Ofast) + target_link_options(simple64-gui PRIVATE -Ofast) +-if (CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64") +- target_compile_options(simple64-gui PRIVATE -march=armv8-a) +- target_link_options(simple64-gui PRIVATE -march=armv8-a) +-else() ++# if (CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64") ++# target_compile_options(simple64-gui PRIVATE -march=armv8-a) ++# target_link_options(simple64-gui PRIVATE -march=armv8-a) ++# else() + target_compile_options(simple64-gui PRIVATE -march=x86-64-v3) + target_link_options(simple64-gui PRIVATE -march=x86-64-v3) +-endif() ++# endif() + if (NOT APPLE) + target_link_options(simple64-gui PRIVATE -Wl,-Bsymbolic -Wl,-Bsymbolic-functions) + endif (NOT APPLE) diff --git a/packages/multimedia/x265/package.mk b/packages/multimedia/x265/package.mk index 4a8d791f8..32252f1de 100644 --- a/packages/multimedia/x265/package.mk +++ b/packages/multimedia/x265/package.mk @@ -11,7 +11,19 @@ PKG_DEPENDS_TARGET="toolchain" PKG_LONGDESC="x265 is a H.265/HEVC video encoder application library" PKG_TOOLCHAIN="make" +if [ "${TARGET_ARCH}" = "x86_64" ]; then + PKG_DEPENDS_TARGET+=" nasm:host" +fi + + pre_configure_target() { LDFLAGS="${LDFLAGS} -ldl" - cmake -G "Unix Makefiles" ./source -} + + # custom cmake build to override the LOCAL_CC/CXX + cp ${CMAKE_CONF} cmake-x265.conf + + echo "SET(CMAKE_C_COMPILER ${CC})" >> cmake-x265.conf + echo "SET(CMAKE_CXX_COMPILER ${CXX})" >> cmake-x265.conf + + cmake -DCMAKE_TOOLCHAIN_FILE=cmake-x265.conf -G "Unix Makefiles" ./source +} \ No newline at end of file