public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug bootstrap/18385] New: Bootstrap code contains 68040 instructions
@ 2004-11-09  0:07 bernhard dot walle at gmx dot de
  2004-11-09  0:10 ` [Bug target/18385] " pinskia at gcc dot gnu dot org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: bernhard dot walle at gmx dot de @ 2004-11-09  0:07 UTC (permalink / raw)
  To: gcc-bugs

If I compile and link a file with -m68000 option the code contains still 68040
instructions in startup and finish code. We use the linker script mvem162.ld
from Newlib which includes the .init and .fini sections (I think they are only
necessary in C++ and Java).

The problem is that the crtstuff.c code is compiled with xgcc without any
options which results in 68040. If the Makefile.in is patched so that it
contains -m68000, all works.

-- 
           Summary: Bootstrap code contains 68040 instructions
           Product: gcc
           Version: 3.4.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: bootstrap
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: bernhard dot walle at gmx dot de
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-linux-gnu
  GCC host triplet: i686-linux-gnu
GCC target triplet: m68k-elf


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18385


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug target/18385] code contains 68040 instructions
  2004-11-09  0:07 [Bug bootstrap/18385] New: Bootstrap code contains 68040 instructions bernhard dot walle at gmx dot de
@ 2004-11-09  0:10 ` pinskia at gcc dot gnu dot org
  2004-12-13  9:50 ` bernie at develer dot com
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-11-09  0:10 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|bootstrap                   |target
            Summary|Bootstrap code contains     |code contains 68040
                   |68040 instructions          |instructions


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18385


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug target/18385] code contains 68040 instructions
  2004-11-09  0:07 [Bug bootstrap/18385] New: Bootstrap code contains 68040 instructions bernhard dot walle at gmx dot de
  2004-11-09  0:10 ` [Bug target/18385] " pinskia at gcc dot gnu dot org
@ 2004-12-13  9:50 ` bernie at develer dot com
  2004-12-13 10:56 ` bernhard dot walle at gmx dot de
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: bernie at develer dot com @ 2004-12-13  9:50 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bernie at develer dot com  2004-12-13 09:49 -------
The top-level multilib directory is compiled for the
"default" target, which is in some cases m68000, and
in some cases m68020.

m68k-elf defaults to m68000.  Perhaps your linker
script doesn't look into the m68040 subdirectory to
fetch the correct version of crt0.o?

Please attach your linker script.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18385


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug target/18385] code contains 68040 instructions
  2004-11-09  0:07 [Bug bootstrap/18385] New: Bootstrap code contains 68040 instructions bernhard dot walle at gmx dot de
  2004-11-09  0:10 ` [Bug target/18385] " pinskia at gcc dot gnu dot org
  2004-12-13  9:50 ` bernie at develer dot com
@ 2004-12-13 10:56 ` bernhard dot walle at gmx dot de
  2004-12-14  1:23 ` bernie at develer dot com
  2004-12-14 11:22 ` bernhard dot walle at gmx dot de
  4 siblings, 0 replies; 6+ messages in thread
From: bernhard dot walle at gmx dot de @ 2004-12-13 10:56 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bernhard dot walle at gmx dot de  2004-12-13 10:55 -------
I don't understand. Why should it search in 68040 directory? There is probably
m68040 code, but if I compile with -m68000 I *don't* want 68040 code but plain
68000 code.



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18385


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug target/18385] code contains 68040 instructions
  2004-11-09  0:07 [Bug bootstrap/18385] New: Bootstrap code contains 68040 instructions bernhard dot walle at gmx dot de
                   ` (2 preceding siblings ...)
  2004-12-13 10:56 ` bernhard dot walle at gmx dot de
@ 2004-12-14  1:23 ` bernie at develer dot com
  2004-12-14 11:22 ` bernhard dot walle at gmx dot de
  4 siblings, 0 replies; 6+ messages in thread
From: bernie at develer dot com @ 2004-12-14  1:23 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bernie at develer dot com  2004-12-14 01:23 -------
Sorry, I've read your report vice-versa, because that's
the most likely thing that could have happened (there were
so many bogus uClinux reports that I finally decided to
remove m68000 libraries from the toolchain distribution).

Could you please add "-v" to your link command line and
see what it says?  You should see the m68k-elf-ld invocation
with its full command-line.

Now, I see that invoking gcc without any -m680x0 option
would not generate code for 68020 by default:

---cut---
m68020-*-elf* | m68k-*-elf*)
        tm_file="m68k/m68k.h m68k/m68k-none.h m68k/m68kelf.h dbxelf.h elfos.h
m68k/m68kemb.h m68k/m68020-elf.h"
        tm_defines="MOTOROLA USE_GAS"
        tmake_file=m68k/t-m68kelf
        extra_parts="crtbegin.o crtend.o"
        use_fixproto=yes
        ;;
---cut---

(don't get fooled by the m68020-elf.h header, it just
contains two harmless definitions).


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |SUSPENDED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18385


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug target/18385] code contains 68040 instructions
  2004-11-09  0:07 [Bug bootstrap/18385] New: Bootstrap code contains 68040 instructions bernhard dot walle at gmx dot de
                   ` (3 preceding siblings ...)
  2004-12-14  1:23 ` bernie at develer dot com
@ 2004-12-14 11:22 ` bernhard dot walle at gmx dot de
  4 siblings, 0 replies; 6+ messages in thread
From: bernhard dot walle at gmx dot de @ 2004-12-14 11:22 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bernhard dot walle at gmx dot de  2004-12-14 11:21 -------
It's

m68k-elf-gcc -o test.out test.o -lm -m68000 -Wl,-Tmvme162.ld -Wl,-v
collect2-Version 3.4.3 (68k, Motorola syntax)
/opt/m68k/lib/gcc/m68k-elf/3.4.3/../../../../m68k-elf/bin/ld -o test.out
/opt/m68k/lib/gcc/m68k-elf/3.4.3/crtbegin.o
-L/opt/m68k/lib/gcc/m68k-elf/3.4.3/m68000 -L/opt/m68k/lib/gcc/m68k-elf/3.4.3
-L/opt/m68k/lib/gcc/m68k-elf/3.4.3/../../../../m68k-elf/lib/m68000
-L/opt/m68k/lib/gcc/m68k-elf/3.4.3/../../../../m68k-elf/lib test.o -lm
-Tmvme162.ld -v -lgcc -lc -lgcc /opt/m68k/lib/gcc/m68k-elf/3.4.3/crtend.o

the problematic code is in /opt/m68k/lib/gcc/m68k-elf/3.4.3/crtend.o. The
attached patch for gcc (sorry, I thought I attached it) fixes the proxlem for me.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18385


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2004-12-14 11:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-09  0:07 [Bug bootstrap/18385] New: Bootstrap code contains 68040 instructions bernhard dot walle at gmx dot de
2004-11-09  0:10 ` [Bug target/18385] " pinskia at gcc dot gnu dot org
2004-12-13  9:50 ` bernie at develer dot com
2004-12-13 10:56 ` bernhard dot walle at gmx dot de
2004-12-14  1:23 ` bernie at develer dot com
2004-12-14 11:22 ` bernhard dot walle at gmx dot de

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).