Subject: 64 bit compile problems

From: David Kesselring <[email-masked]>
Date: Fri, 5 Sep 2003 10:04:01 -0400 (EDT)

I'm trying to build u-boot bootloader for a 5kc core in 64 bit mode. I'm
having problems with the compiler/linker. If anyone has any ideas, please
let me know.

When I use the toolchain that installs in
"/usr/cygnus/mips3264-020217/H-i686-pc-linux-gnulibc2.1/bin", I get a link
problem where all opcodes are not aligned on a 64 bit boundry. I get an
extra 32bit word of 0x0 between two 64bit opcodes in the binary file.
The cpp options I use are:-mips64 -EL -mlong64 -mcpu=r5k

When I use a toolchain which I think I ftp'd from linux-mips.org
(mips64el-linux), I get the following error. The cpp options I use are:-EL
-mabi=64 -mips4 -mlong64

/usr/bin/mips64el-linux-gcc  -O   -D__KERNEL__ -DTEXT_BASE=0x00000
-I/home/dkesselr/uboot/u-boot-0.4.5-atmel/include
-I/home/dkesselr/uboot/u-boot-0.4.5-atmel/include/asm -fno-builtin
-ffreestanding -nostdinc -isystem
/usr/lib/gcc-lib/mips64el-linux/2.95.4/include -pipe  -DCONFIG_MIPS
-D__MIPS__ -EL -mabi=64 -mips4
-mlong64 -Wall -Wstrict-prototypes -c -o atmel352.o atmel352.c
atmel352.c: In function `sdram_timing_init':
atmel352.c:82: warning: cast to pointer from integer of different size
atmel352.c:90: warning: cast to pointer from integer of different size
atmel352.c: In function `copydwords':
atmel352.c:186: Internal compiler error in `rtx_equal_for_memref_p', at
alias.c:682
Please submit a full bug report.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
cpp0: output pipe has been closed

Thanks,
David Kesselring
Atmel MMC
[email-masked] 919-462-6587

---

From: "Maciej W. Rozycki" <[email-masked]>
Date: Fri, 5 Sep 2003 18:44:40 +0200 (MET DST)

> The cpp options I use are:-mips64 -EL -mlong64 -mcpu=r5k

 I don't really understand -- MIPS regular opcodes (i.e. not in the MIPS16
mode) have to be aligned to 32-bit boundaries.  What do you mean by
"64-bit opcodes"?  If there is a null word (a "nop") between each pair of
emitted opcodes, then the resulting binary should still work, although
suboptimally.  It may be a bug in gcc or gas.  Does the output from gcc
contains the padding?  What are the versions of gcc and binutils? 

> (mips64el-linux), I get the following error. The cpp options I use
> are:-EL -mabi=64 -mips4 -mlong64
> 
> 

 That's interesting -- it's almost surely a bug in the RTL.  I may try to
reproduce it with my toolchain -- can you send me a preprocessed version
of this file?  If so, please run the following command and send me the
resulting atmel352.i file -- use `bzip2 -9' or `gzip -9' and send it
attached directly to me only to save net resources:

$ /usr/bin/mips64el-linux-gcc  -O   -D__KERNEL__ -DTEXT_BASE=0x00000
-I/home/dkesselr/uboot/u-boot-0.4.5-atmel/include
-I/home/dkesselr/uboot/u-boot-0.4.5-atmel/include/asm -fno-builtin
-ffreestanding -nostdinc -isystem
/usr/lib/gcc-lib/mips64el-linux/2.95.4/include -pipe  -DCONFIG_MIPS
-D__MIPS__ -EL -mabi=64 -mips4
-mlong64 -Wall -Wstrict-prototypes -E -o atmel352.i atmel352.c

  Maciej

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: [email-masked], PGP key available        +

---

From: "??\(zhufeng\)" <[email-masked]>
Date: Mon, 8 Sep 2003 20:46:14 +0800

how can I get dlltoo.exe for mips ? I cross compiled gcc-mips but found
there is no dlltool.exe . How can I get it? Thanks.

---

From: Ralf Baechle <[email-masked]>
Date: Wed, 10 Sep 2003 11:07:31 +0200

> there is no dlltool.exe . How can I get it? Thanks.

Well, there simply is no dlltool.exe.  This isn't windows.

  Ralf