Skip to content

Commit 5379e5e

Browse files
committed
Fix for libmp3lame compilation for x86 on Mac with arm processors
1 parent 8a0f0ff commit 5379e5e

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

scripts/libmp3lame/build.sh

+10
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
#!/usr/bin/env bash
22

3+
CFLAGS=
4+
if [ "$ANDROID_ABI" = "x86" ] ; then
5+
# mp3lame's configure script sets -mtune=native for i686,
6+
# which leads to compilation errors on Mac with arm processors,
7+
# because 'native' is recognized as apple-m1 processor.
8+
# Passing an empty mtune resets the value to default
9+
CFLAGS="-mtune="
10+
fi
11+
312
./configure \
413
--prefix=${INSTALL_DIR} \
514
--host=${TARGET} \
@@ -11,6 +20,7 @@
1120
--disable-analyzer-hooks \
1221
--disable-gtktest \
1322
--disable-frontend \
23+
CFLAGS=$CFLAGS \
1424
CC=${FAM_CC} \
1525
AR=${FAM_AR} \
1626
RANLIB=${FAM_RANLIB} || exit 1

0 commit comments

Comments
 (0)