diff --git a/scripts/ffmpeg/build.sh b/scripts/ffmpeg/build.sh index 6eff6aa..dc84e56 100755 --- a/scripts/ffmpeg/build.sh +++ b/scripts/ffmpeg/build.sh @@ -28,7 +28,11 @@ done DEP_CFLAGS="-I${BUILD_DIR_EXTERNAL}/${ANDROID_ABI}/include" DEP_LD_FLAGS="-L${BUILD_DIR_EXTERNAL}/${ANDROID_ABI}/lib $FFMPEG_EXTRA_LD_FLAGS" -# Everything that goes below ${EXTRA_BUILD_CONFIGURATION_FLAGS} is my project-specific. +# 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" + +# Everything that goes below ${EXTRA_BUILD_CONFIGURATION_FLAGS} is specific to MediaFile. # You are free to enable/disable whatever you actually need. ./configure \ @@ -46,7 +50,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 \ 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 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" \