On Sat, 2007-08-18 at 02:16 +0200, Alex Schuster wrote:
> Graham Murray writes:
> 
> > Iain Buchanan <[EMAIL PROTECTED]> writes:
> > > I'm compiling a program blah.cpp with g++ 4.1.2.  I've rebuilt lots
> > > of my system with 4.1.2.  I'm copying the binary onto another gentoo
> > > system which has gcc 4.1.1 as the default compiler.  When I run the
> > > binary on that system, I get this:
> > >
> > > $ ./blah
> > > Illegal instruction
> [...]
> > That sounds like you do not have the same processor in both systems and
> > the processor on the 2nd system is not the same architecture as the
> > -march= with which the program was compiled. eg if you compiled on a P4
> > and used -march=pentium4 then tried running the program on a Pentium.
> 
> At least the system was probably compiles with -march. Even if the actual 
> program then was compiled without, some static system library was, and 
> this gives the error.

hm, my system has always been compiled with the following options:

CFLAGS="-O2 -march=pentium4 -pipe ${DEBUG}"
CHOST="i686-pc-linux-gnu"

and the target system is
CFLAGS="-O2 -march=i686 -pipe"
CHOST="i686-pc-linux-gnu"

The problematic program in question is compiled with -static.

But what confuses me is why did this same setup work with gcc3.4.6?

thanks,
-- 
Iain Buchanan <iaindb at netspace dot net dot au>

"It is hard to overstate the debt that we owe to men and women of genius."
-- Robert G. Ingersoll

-- 
[EMAIL PROTECTED] mailing list

Reply via email to