Cross compiling lame 3.100 fails on macOS 11.0

桃源老師 via Lame-dev <[email protected]> Mon, 7 Dec 2020 22:12:12 +0900
Newsgroups gmane.comp.audio.mp3.lame
Message-ID <[email protected]>
Hi,

I'm now trying to cross compile lame 3.100 for Apple Silicon Mac.

My configure option is as follows:

./configure CFLAGS="-arch arm64" --host=i386-apple-darwin20.1.0 --disable-shared

And it fails with below error on make.

clang: error: the clang compiler does not support '-march=native'
clang: error: the clang compiler does not support '-mtune=native'

I looked into make file and found that those two compiler flag were defined in CFLAGS of make file.

CFLAGS = -O3 -march=native 				-mtune=native -Wall -arch arm64 -fno-common


I also tried to compile lame as native Intel-based:

./configure --disable-shared

And found that there are no -march and no -mtune.

CFLAGS = -O3 -Wall -fno-common

So I thought that those compiler flag -march=native -mtune=native are not supported = unneeded, and removed them from make file of cross compile mode. Then lame seems to built successfully.

But I'm not sure that my thought is correct or not...

Would you please check my thought is correct or not.  And also, if I'm doing wrong, please advice correct way to cross compile of lame 3.100?


Best Regards,

// Kimio Miyamura