Bug 20985 - building mips/64 cross compiler on x86 produces incorrect assembler code for _divdi3 with -fnon-call-exceptions
Summary: building mips/64 cross compiler on x86 produces incorrect assembler code for ...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 3.3.5
: P2 normal
Target Milestone: 3.4.0
Assignee: Not yet assigned to anyone
URL:
Keywords: build
Depends on:
Blocks:
 
Reported: 2005-04-13 05:21 UTC by Herbert Pötzl
Modified: 2005-07-23 22:49 UTC (History)
1 user (show)

See Also:
Host: i686-pc-linux-gnu
Target: mips-unknown-linux-gnu
Build: i686-pc-linux-gnu
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Herbert Pötzl 2005-04-13 05:22:00 UTC
./configure --enable-languages=c --disable-nls --disable-threads
--disable-shared --disable-checking --prefix=/usr --target=mips-linux
make TARGET_LIBGCC2_CFLAGS='-Dinhibit_libc -D__gthr_posix_h'

results in ...
/gcc-3.3.5/gcc/xgcc -B/gcc-3.3.5/gcc/ -B/usr/mips-linux/bin/
-B/usr/mips-linux/lib/ -isystem /usr/mips-linux/include -O2  -DIN_GCC
-DCROSS_COMPILE   -W -Wall -Wwrite-strings -Wstrict-prototypes
-Wmissing-prototypes -isystem ./include  -fPIC -g  -DIN_LIBGCC2
-D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -I. -I. -I. -I./. -I./config
-I./../include  -DL_divdi3 -c ./libgcc2.c -fexceptions -fnon-call-exceptions -o
libgcc/./_divdi3.o
/root/tmp/ccI71cbx.s: Assembler messages:
/root/tmp/ccI71cbx.s:956: Error: operation combines symbols in different segments

955        .4byte  $LASFDE1-$Lframe1
956        .4byte  $LFB4-.
957        .4byte  $LFE4-$LFB4

(removing the '-.' in that line *G* makes it work with gas 2.15.94.0.2.2)
Comment 1 Andrew Pinski 2005-04-13 09:46:22 UTC
956        .4byte  $LFB4-.

Are you sure that this is not an assembler problem?
Comment 2 Daniel Jacobowitz 2005-04-13 17:50:51 UTC
Subject: Re:  New: building mips/64 cross compiler on x86 produces incorrect assembler code for _divdi3 with -fnon-call-exceptions

On Wed, Apr 13, 2005 at 05:22:07AM -0000, herbert at 13thfloor dot at wrote:
> ./configure --enable-languages=c --disable-nls --disable-threads
> --disable-shared --disable-checking --prefix=/usr --target=mips-linux
> make TARGET_LIBGCC2_CFLAGS='-Dinhibit_libc -D__gthr_posix_h'
> 
> results in ...
> /gcc-3.3.5/gcc/xgcc -B/gcc-3.3.5/gcc/ -B/usr/mips-linux/bin/
> -B/usr/mips-linux/lib/ -isystem /usr/mips-linux/include -O2  -DIN_GCC
> -DCROSS_COMPILE   -W -Wall -Wwrite-strings -Wstrict-prototypes
> -Wmissing-prototypes -isystem ./include  -fPIC -g  -DIN_LIBGCC2
> -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -I. -I. -I. -I./. -I./config
> -I./../include  -DL_divdi3 -c ./libgcc2.c -fexceptions -fnon-call-exceptions -o
> libgcc/./_divdi3.o
> /root/tmp/ccI71cbx.s: Assembler messages:
> /root/tmp/ccI71cbx.s:956: Error: operation combines symbols in different segments
> 
> 955        .4byte  $LASFDE1-$Lframe1
> 956        .4byte  $LFB4-.
> 957        .4byte  $LFE4-$LFB4
> 
> (removing the '-.' in that line *G* makes it work with gas 2.15.94.0.2.2)

The feature was removed from the assembler, because it is not ABI
compliant.  This is fixed in GCC 3.4 and later.  You can just delete
the definition in config/mips/linux.h that causes this.

ASM_PREFERRED_EH_DATA_FORMAT or something similar, I don't remember the
spelling.


Comment 3 Daniel Jacobowitz 2005-04-13 17:51:16 UTC
Subject: Re:  building mips/64 cross compiler on x86 produces incorrect assembler code for _divdi3 with -fnon-call-exceptions

On Wed, Apr 13, 2005 at 09:46:26AM -0000, pinskia at gcc dot gnu dot org wrote:
>           Component|bootstrap                   |debug

BTW, this has little to do with debugging; it's unwind information,
which is runtime.

Comment 4 Andrew Pinski 2005-04-13 17:53:14 UTC
Closing as fixed then.
Comment 5 Herbert Pötzl 2005-04-13 19:36:06 UTC
Subject: Re:  building mips/64 cross compiler on x86 produces incorrect assembler code for _divdi3 with -fnon-call-exceptions

On Wed, Apr 13, 2005 at 05:51:18PM -0000, drow at false dot org wrote:
> 
> ------- Additional Comments From drow at false dot org  2005-04-13 17:51 -------
> Subject: Re:  building mips/64 cross compiler on x86 produces incorrect assembler code for _divdi3 with -fnon-call-exceptions
> 
> On Wed, Apr 13, 2005 at 09:46:26AM -0000, pinskia at gcc dot gnu dot org wrote:
> >           Component|bootstrap                   |debug
> 
> BTW, this has little to do with debugging; it's unwind information,
> which is runtime.

hmm, sorry about that, was (as usual) confused by the
bug tracking tool ... didn't even notice that I selected
debug (I probably did, or didn't I?)

best,
Herbert

> -- 
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20985
> 
> ------- You are receiving this mail because: -------
> You reported the bug, or are watching the reporter.
Comment 6 Herbert Pötzl 2005-04-13 21:11:19 UTC
Subject: Re:  building mips/64 cross compiler on x86 produces incorrect assembler code for _divdi3 with -fnon-call-exceptions

On Wed, Apr 13, 2005 at 09:46:24AM -0000, pinskia at gcc dot gnu dot org wrote:
> 
> ------- Additional Comments From pinskia at gcc dot gnu dot org  2005-04-13 09:46 -------
> 956        .4byte  $LFB4-.
> 
> Are you sure that this is not an assembler problem?

tested with binutils 2.15.91.0.1, at least those give
the very same message ...

/root/tmp/ccHAa3KN.s: Assembler messages:
/root/tmp/ccHAa3KN.s:955: Error: operation combines symbols in different segments

thanks,
Herbert

> 
> -- 
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
>            Severity|critical                    |normal
>           Component|bootstrap                   |debug
>            Keywords|                            |build
> 
> 
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20985
> 
> ------- You are receiving this mail because: -------
> You reported the bug, or are watching the reporter.
Comment 7 Herbert Pötzl 2005-04-13 21:31:27 UTC
Subject: Re:  building mips/64 cross compiler on x86 produces incorrect assembler code for _divdi3 with -fnon-call-exceptions

On Wed, Apr 13, 2005 at 05:50:59PM -0000, drow at false dot org wrote:
> 
> ------- Additional Comments From drow at false dot org  2005-04-13 17:50 -------
> Subject: Re:  New: building mips/64 cross compiler on x86 produces incorrect assembler code for _divdi3 with -fnon-call-exceptions
> 
> On Wed, Apr 13, 2005 at 05:22:07AM -0000, herbert at 13thfloor dot at wrote:
> > ./configure --enable-languages=c --disable-nls --disable-threads
> > --disable-shared --disable-checking --prefix=/usr --target=mips-linux
> > make TARGET_LIBGCC2_CFLAGS='-Dinhibit_libc -D__gthr_posix_h'
> > 
> > results in ...
> > /gcc-3.3.5/gcc/xgcc -B/gcc-3.3.5/gcc/ -B/usr/mips-linux/bin/
> > -B/usr/mips-linux/lib/ -isystem /usr/mips-linux/include -O2  -DIN_GCC
> > -DCROSS_COMPILE   -W -Wall -Wwrite-strings -Wstrict-prototypes
> > -Wmissing-prototypes -isystem ./include  -fPIC -g  -DIN_LIBGCC2
> > -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -I. -I. -I. -I./. -I./config
> > -I./../include  -DL_divdi3 -c ./libgcc2.c -fexceptions -fnon-call-exceptions -o
> > libgcc/./_divdi3.o
> > /root/tmp/ccI71cbx.s: Assembler messages:
> > /root/tmp/ccI71cbx.s:956: Error: operation combines symbols in different segments
> > 
> > 955        .4byte  $LASFDE1-$Lframe1
> > 956        .4byte  $LFB4-.
> > 957        .4byte  $LFE4-$LFB4
> > 
> > (removing the '-.' in that line *G* makes it work with gas 2.15.94.0.2.2)
> 
> The feature was removed from the assembler, because it is not ABI
> compliant.  This is fixed in GCC 3.4 and later.  You can just delete
> the definition in config/mips/linux.h that causes this.
> 
> ASM_PREFERRED_EH_DATA_FORMAT or something similar, I don't remember the
> spelling.

yep, that fixes it ...

thanks a lot!
Herbert

> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20985
> 
> ------- You are receiving this mail because: -------
> You reported the bug, or are watching the reporter.