Re: Cross compiling lame 3.100 fails on macOS 11.0

桃源老師 via Lame-dev <[email protected]> Tue, 8 Dec 2020 15:32:50 +0900
Newsgroups gmane.comp.audio.mp3.lame
Message-ID <[email protected]>
Hi

> 2020/12/07 午後10:12、桃源老師 via Lame-dev <[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

I forgot to attach detailed error.  Here it is...

$ make
/Applications/Xcode.app/Contents/Developer/usr/bin/make  all-recursive
Making all in mpglib
/bin/sh ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H  -I. -I.. -I../include -I. -I../libmp3lame -I..    -O3 -march=native 				-mtune=native -Wall -arch arm64 -fno-common -MT common.lo -MD -MP -MF .deps/common.Tpo -c -o common.lo common.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I. -I../libmp3lame -I.. -O3 -march=native -mtune=native -Wall -arch arm64 -fno-common -MT common.lo -MD -MP -MF .deps/common.Tpo -c common.c  -fno-common -DPIC -o .libs/common.o
clang: error: the clang compiler does not support '-march=native'
make[2]: *** [common.lo] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Please help me...

Best Reagards,

// Kimio Miyamura

_______________________________________________
Lame-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/lame-dev