linux-mips
[Top] [All Lists]

RE: Differing results from cross and native compilers

To: "Jim Wilson" <wilson@specifix.com>
Subject: RE: Differing results from cross and native compilers
From: "Eric DeVolder" <edevolder@razamicroelectronics.com>
Date: Thu, 21 Sep 2006 07:26:29 -0700
Cc: "Thiemo Seufer" <ths@networkno.de>, <linux-mips@linux-mips.org>
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
Thread-index: AcbcQxypWCQgkRBYSXWUIjUa8tCK9QBRtEP/
Thread-topic: Differing results from cross and native compilers
Thanks Jim, you hit the nail on the head!
 
gcc/config.log:target_cpu_default='(MASK_GAS)|MASK_EXPLICIT_RELOCS'
gcc/config.status:s,@target_cpu_default@,(MASK_GAS)|MASK_EXPLICIT_RELOCS,;t t
gcc/Makefile:target_cpu_default=(MASK_GAS)|MASK_EXPLICIT_RELOCS
So yes, something went awry and the configure stage didn't think gas was in use...
 
Eric 


From: Jim Wilson [mailto:wilson@specifix.com]
Sent: Tue 9/19/2006 6:22 PM
To: Eric DeVolder
Cc: Thiemo Seufer; linux-mips@linux-mips.org
Subject: RE: Differing results from cross and native compilers

On Tue, 2006-09-19 at 09:57 -0700, Eric DeVolder wrote:

> -       lw      $4,%got($LC0)($28)
> +       la      $4,$LC0

The difference here is -mexplicit-relocs, which is the default for the
first one (cross) but not the second one (native).

The explicit-reloc support is enabled by a run-time configure test,
which tries to run the assembler to see if you have a new enough version
of GNU as that supports the necessary assembler reloc syntax.
Apparently this is going wrong with the native build.  Perhaps you have
a different binutils version, or perhaps there is a problem with your
PATH, or perhaps binutils and gcc weren't configured with the same
prefix, etc.

If you have the build trees, you can look at the gcc/config.h files and
note that one has HAVE_AS_EXPLICIT_RELOCS defined and the other doesn't.

--
Jim Wilson, GNU Tools Support, http://www.specifix.com




<Prev in Thread] Current Thread [Next in Thread>