From 5379e5efd542a3a585d21b236dd86c4444abb090 Mon Sep 17 00:00:00 2001 From: Javernaut Date: Sun, 24 Nov 2024 17:04:21 +0100 Subject: [PATCH 1/3] Fix for libmp3lame compilation for x86 on Mac with arm processors --- scripts/libmp3lame/build.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scripts/libmp3lame/build.sh b/scripts/libmp3lame/build.sh index 1bece1a..5ef1ec7 100755 --- a/scripts/libmp3lame/build.sh +++ b/scripts/libmp3lame/build.sh @@ -1,5 +1,14 @@ #!/usr/bin/env bash +CFLAGS= +if [ "$ANDROID_ABI" = "x86" ] ; then +# mp3lame's configure script sets -mtune=native for i686, +# which leads to compilation errors on Mac with arm processors, +# because 'native' is recognized as apple-m1 processor. +# Passing an empty mtune resets the value to default + CFLAGS="-mtune=" +fi + ./configure \ --prefix=${INSTALL_DIR} \ --host=${TARGET} \ @@ -11,6 +20,7 @@ --disable-analyzer-hooks \ --disable-gtktest \ --disable-frontend \ + CFLAGS=$CFLAGS \ CC=${FAM_CC} \ AR=${FAM_AR} \ RANLIB=${FAM_RANLIB} || exit 1 From 17d4a2710d74079cfd4be9e9b5bf5d19f89997d3 Mon Sep 17 00:00:00 2001 From: Javernaut Date: Mon, 25 Nov 2024 11:07:14 +0100 Subject: [PATCH 2/3] Building 16 kb page compatible shared libraries of FFmpeg --- scripts/ffmpeg/build.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/ffmpeg/build.sh b/scripts/ffmpeg/build.sh index 63a21c4..620d1c9 100755 --- a/scripts/ffmpeg/build.sh +++ b/scripts/ffmpeg/build.sh @@ -25,6 +25,10 @@ done DEP_CFLAGS="-I${BUILD_DIR_EXTERNAL}/${ANDROID_ABI}/include" DEP_LD_FLAGS="-L${BUILD_DIR_EXTERNAL}/${ANDROID_ABI}/lib $FFMPEG_EXTRA_LD_FLAGS" +# Android 15 with 16 kb page size support +# https://developer.android.com/guide/practices/page-sizes#compile-r27 +EXTRA_LDFLAGS="-Wl,-z,max-page-size=16384 $DEP_LD_FLAGS" + ./configure \ --prefix=${BUILD_DIR_FFMPEG}/${ANDROID_ABI} \ --enable-cross-compile \ @@ -40,7 +44,7 @@ DEP_LD_FLAGS="-L${BUILD_DIR_EXTERNAL}/${ANDROID_ABI}/lib $FFMPEG_EXTRA_LD_FLAGS" --ranlib=${FAM_RANLIB} \ --strip=${FAM_STRIP} \ --extra-cflags="-O3 -fPIC $DEP_CFLAGS" \ - --extra-ldflags="$DEP_LD_FLAGS" \ + --extra-ldflags="$EXTRA_LDFLAGS" \ --enable-shared \ --disable-static \ --disable-vulkan \ From 69bc3f2968e5335fff43123a2bef6c54428144ce Mon Sep 17 00:00:00 2001 From: Javernaut Date: Mon, 25 Nov 2024 11:35:57 +0100 Subject: [PATCH 3/3] Updating libx265 to 4.1 --- scripts/libx265/download.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/libx265/download.sh b/scripts/libx265/download.sh index 6f03f5a..97dae1d 100755 --- a/scripts/libx265/download.sh +++ b/scripts/libx265/download.sh @@ -2,7 +2,7 @@ source ${SCRIPTS_DIR}/common-functions.sh -LIBX265_VERSION=4.0 +LIBX265_VERSION=4.1 downloadTarArchive \ "libx265" \