Nick Foster <n...@ettus.com> writes:

> On 01/24/2013 07:37 AM, Michael Dickens wrote:
>> [New subject line]
>>
>> Albert sent me the build log for:
>>
>> {{{
>> sudo port install gnuradio +full configure.compiler=macports-gcc-4.7
>> }}}
>>
>> and I can replicate the error on my computer; so, this must be a GCC 4.7 
>> (or, MacPorts's GCC 4.7) issue.  The error is:
>>
>> {{{
>> build/volk/lib/volk_cpu.c:54:no such instruction: `xgetbv'
>> }}}
>>
>> VOLK folks: what other info do you need from me/us to address this issue? - 
>> MLD
> This is a compiler problem. xgetbv was added to vanilla GCC in
> 4.4. Apparently MacPorts' mutant GCC hasn't added it as of 4.7. The
> relevant check is line 128 of volk/lib/CMakeLists.txt. We could just
> disable AVX support on GCC < 4.7, but since 4.7 is basically the
> latest GCC out there it seems a little aggressive to disable AVX for
> everyone. I'd rather disable AVX on Mac. I haven't done Mac-specific
> platform detection in CMake; can anyone else suggest a Mac test to use
> here to disable AVX on Mac?

Hi, Nick and Michael,

After digging into this issue, I found an answer on MacPorts list, and
it's related to Apple's ancient assembler(version 1.38). In this post,
they try to replace Apple /usr/bin/as by clang's assembler.

http://lists.macosforge.org/pipermail/macports-dev/2011-October/016335.html


I tried this approach to compile gnuradio with gcc 4.7, it's still not
successful. But it seems to be an interesting and possible way -- to use
clang's assembler to optimize for AVX on MacOSX. GNU binutil on MacOSX
does not come with GNU assembler, so gcc 4.7 on MacOSX uses the built-in
GNU assembler, which is very old and does not support AVX. Only clang's
assembler on MacOSX provides support to AVX instruction set.


Albert

_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to