Skip to content

Commit

Permalink
Fix for libmp3lame compilation for x86 on Mac with arm processors
Browse files Browse the repository at this point in the history
  • Loading branch information
Javernaut committed Nov 24, 2024
1 parent 8a0f0ff commit 5379e5e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions scripts/libmp3lame/build.sh
Original file line number Diff line number Diff line change
@@ -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} \
Expand All @@ -11,6 +20,7 @@
--disable-analyzer-hooks \
--disable-gtktest \
--disable-frontend \
CFLAGS=$CFLAGS \
CC=${FAM_CC} \
AR=${FAM_AR} \
RANLIB=${FAM_RANLIB} || exit 1
Expand Down

0 comments on commit 5379e5e

Please sign in to comment.