discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] Compiler machine compatibility


From: Marcus D. Leech
Subject: Re: [Discuss-gnuradio] Compiler machine compatibility
Date: Fri, 08 Apr 2011 19:17:31 -0400
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.15) Gecko/20110307 Fedora/3.1.9-0.39.b3pre.fc14 Thunderbird/3.1.9

On 04/08/2011 01:06 PM, Nick Foster wrote:

Make sure you're compiling with optimization flags appropriate for the
hardware you're planning to run on. For instance, if you spec -msse3 or
newer on a pre-Prescott P4, you'll generate instructions the CPU can't
execute. I'm pretty sure GCC won't generate these instructions unless
you specify it using these flags so make sure your automake/cmake setup
isn't doing so.

Another issue is if you compile on a 32-bit compiler it'll barf on a
64-bit system, and this might generate an illegal instruction error.
This is the reason package maintainers keep a 32-bit and 64-bit version
of their packages. If you want to make code that runs on a 64-bit system
from your 32-bit system, you'll have to use a 64-bit GCC installation (I
think GCC is the same for either, but you need 64-bit libc) and use -m64
as a compile flag.

--n
OK, so it turns out that I lied, viciously and nastily. Brazenly, even :-)

I had -msse3 turned on, which won't work on an early Pentium 4, but will work on late-model Pentium 4.

So, I cranked-back the optimization flags to -msse2, which was available for Pentium 4.


--
Marcus Leech
Principal Investigator
Shirleys Bay Radio Astronomy Consortium
http://www.sbrac.org





reply via email to

[Prev in Thread] Current Thread [Next in Thread]