This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: cross compiled output differs
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Milan Ton <milan dot ton at yandex dot ru>
- Cc: GCC Development <gcc at gcc dot gnu dot org>
- Date: Mon, 12 Mar 2018 14:24:27 +0100
- Subject: Re: cross compiled output differs
- Authentication-results: sourceware.org; auth=none
- References: <7518971520683086@web38g.yandex.ru>
On Sat, Mar 10, 2018 at 12:58 PM, Milan Ton <milan.ton@yandex.ru> wrote:
> Hi:
>
> I built two versions -- linux/mingw -- of a 32-bit gcc cross compiler
> of codebase 7.3.0 on fedora 20 (gcc 4.8). Then I compiled an embedded
> project using the both cross compilers in the same build
> environment. An assemble code inspection showed that one function out
> of about thousand project functions differs in the two builds. Both
> run-time tests and visual inspection suggest that both variants of the
> compiled function are correct. I looked at the output of the switch
> `-fdump-tree-all' and realized that the path `ivopts' makes this difference.
> Once `-fno-ivopts' applied, the two compilations are binary equivalent.
>
> Shouldn't I expect in general same output of such cross compilers ?
> What could be reasons of such differences ? and options to fix it ?
Not sure if I understand but if one cross compiler targets linux-32bit and one
targets mingw-32bit then of course there are differences to be expected.
If I didn't understand please correct the two cross compiler host/target combos
below
x86_64-fedora -> i586-linux
x86_64-fedora -> i586-mingw32
> Milan