On Wed, Apr 18, 2012 at 9:30 AM, Josh Blum <[email protected]> wrote:
> > > On 04/18/2012 09:24 AM, Josh Blum wrote: > > > > > > On 04/18/2012 09:23 AM, Nick Foster wrote: > >> On Wed, Apr 18, 2012 at 8:03 AM, Michael Dickens <[email protected]> > wrote: > >> > >>> Yes: gcc 4.2.1. Apple is transitioning from pure gcc to using llvm / > >>> clang, so maybe they'll keep those more up to date? XCode 4.3.2 > (latest) > >>> provides gcc 4.2.1 using llvm / clang (3.0), which is the latest > release of > >>> those. llvm / clang 3.1 is coming out soon, it looks like; so, we'll > see. > >>> In the mean time, I'm stuck with Apple's gcc 4.2.1 variant. So, I'm > sure > >>> there's a way to make it work with what VOLK is trying to do; but, > that's > >>> an SEP < http://en.wikipedia.org/wiki/Somebody_Else's_Problem > both > >>> since I don't have time right now and that it's a little beyond my > current > >>> expertise in assembly language programming. Hopefully the > >>> VOLK-programmers-that-be can find a quick fix. - MLD > >>> > >>> On Apr 18, 2012, at 9:40 AM, Philip Balister wrote: > >>> > >>>> On 04/18/2012 09:28 AM, Michael Dickens wrote: > >>>>> I just pulled the latest GIT master, cleaned out everything old, then > >>> the usual cmake. Make errors out with: > >>>>> > >>>>> [ 3%] Building C object volk/lib/CMakeFiles/volk.dir/volk_cpu.c.o > >>>>> /var/tmp//ccrCnwC2.s:221:no such instruction: `xgetbv' > >>>>> > >>>>> I'm running OSX 10.6.8, XCode 3.2.3, gcc 4.2.1. - MLD > >>>> > >>>> gcc 4.2.1? Seriously? > >>> > >> > >> Thanks for the update, that's good to know Apple's antediluvian > assembler > >> doesn't yet support AVX instructions. Actually, now that I look at it, > >> looks like GCC didn't support AVX until 4.6.0. We'll put in a check > >> disabling AVX if CMake doesn't find GCC 4.6. Unfortunately, there's no > safe > >> way to enable AVX instructions without using xgetbv. > >> > > > > Maybe the xgetbv stuff still needs and ifdef __AVX__ around it > > > > __AVX__ is only defined when the -mavx is passed > > > > I take it back, we dont pass arch flags to volk_cpu.c > We can manually define something from the build system when -mavx > passes, or a compile time test, or maybe there is another gcc define. > > -josh > I was just going to eliminate AVX from the available arches list if GCC < 4.6 is detected. --- a/volk/lib/CMakeLists.txt +++ b/volk/lib/CMakeLists.txt @@ -84,6 +84,19 @@ foreach(line ${arch_flag_lines}) endforeach(line) ######################################################################## +# eliminate AVX on GCC < 4.6.0 +# even though it accepts -mavx, as won't assemble xgetbv, which we need +######################################################################## +if(COMPILER_NAME MATCHES "GNU") + execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion + OUTPUT_VARIABLE GCC_VERSION) + if(GCC_VERSION VERSION_LESS "4.6") + message(STATUS "GCC too old for AVX support, overruling AVX") + list(REMOVE_ITEM available_archs avx) + endif() +endif() + +######################################################################## # implement overruling in the ORC case, # since ORC always passes flag detection ######################################################################## --n > > _______________________________________________ > Discuss-gnuradio mailing list > [email protected] > https://lists.gnu.org/mailman/listinfo/discuss-gnuradio >
_______________________________________________ Discuss-gnuradio mailing list [email protected] https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
