Linux MIPS Architecture development
 help / color / mirror / Atom feed
* AW: Cross Compiler again
@ 2001-11-22 17:13 Andre.Messerschmidt
  2001-11-25 17:13 ` Daniel Jacobowitz
  2001-11-26 11:28 ` Ralf Baechle
  0 siblings, 2 replies; 14+ messages in thread
From: Andre.Messerschmidt @ 2001-11-22 17:13 UTC (permalink / raw)
  To: linux-mips

> I regularly use gcc 3.0.1 to build the latest oss cvs kernels without
> obvious incident.
> 
I am using a 2.4.2 Kernel from Montavista, which is not working with gcc
3.0.1.
Maybe it would be wise to upgrade. Does anybody know if there are any
problems using a MIPS 5Kc with the current kernel?

regards 
Andre

^ permalink raw reply	[flat|nested] 14+ messages in thread
* AW: Cross Compiler again
@ 2001-11-26 16:27 Andre.Messerschmidt
  2001-11-26 20:31 ` Daniel Jacobowitz
  0 siblings, 1 reply; 14+ messages in thread
From: Andre.Messerschmidt @ 2001-11-26 16:27 UTC (permalink / raw)
  To: ralf; +Cc: linux-mips


> -G 0.
Thanks that helped for the relocation error.
init/main.o(.text.init+0x7d8): relocation truncated to fit: R_MIPS_GPREL16
execute_command

But I still get a lot of undefined references.
arch/mips/kernel/kernel.o(.debug+0x32e14): undefined reference to `L_E660'
arch/mips/kernel/kernel.o(.debug+0x60e7c): undefined reference to `L_E549'
arch/mips/kernel/kernel.o(.debug+0x8d097): undefined reference to `L_E8015'
arch/mips/kernel/kernel.o(.debug+0x8d0b9): undefined reference to `L_E8015'
arch/mips/kernel/kernel.o(.debug+0x8d168): undefined reference to `L_E8015'
arch/mips/kernel/kernel.o(.debug+0x8d18a): undefined reference to `L_E8015'
...

I believe there is still something wrong with my glibc, but I need to check
that.

> What compiler are you using?  All compilers I've ever released did default
> to -G 0.
I compiled my own gcc using Bradley D. LaRonde's howto.

regards
Andre

^ permalink raw reply	[flat|nested] 14+ messages in thread
* AW: Cross Compiler again
@ 2001-11-26 13:38 Andre.Messerschmidt
  2001-11-26 13:48 ` Ralf Baechle
  0 siblings, 1 reply; 14+ messages in thread
From: Andre.Messerschmidt @ 2001-11-26 13:38 UTC (permalink / raw)
  To: ralf; +Cc: linux-mips


> Shit in, shit out.  You must be invoking the compiler with some option for
> GP relative optimization.  Won't work.
> 
A typical gcc call is like this:
gcc -Wall -Wstrict-prototypes -O2 -mno-abicalls -fno-pic -mcpu=r4000 -D_32_
-mips2 -Wa,--trap -pipe -c foo.c -o foo.o

Is there any option missing that might me defaulting to such an
optimization?
I have played with the different -O# options without success.

regards
Andre

^ permalink raw reply	[flat|nested] 14+ messages in thread
* RE: Cross Compiler again
@ 2001-11-26  8:59 Andre.Messerschmidt
  2001-11-26 11:22 ` Ralf Baechle
  0 siblings, 1 reply; 14+ messages in thread
From: Andre.Messerschmidt @ 2001-11-26  8:59 UTC (permalink / raw)
  To: dan; +Cc: linux-mips

> If you simply fix the one declaration it complains about (it involves
> adding 'volatile' to one of the two declarations of xtime) then this
> kernel actually will work under GCC 3.0.1.  We haven't QA'd it, but I
> use it routinely for testing.
> 
Thanks. Compiling now works, but the linker complains about undefined
references:

init/main.o: In function `init':
init/main.c:794: relocation truncated to fit: R_MIPS_GPREL16 execute_command
init/main.o: In function `parse_options':
init/main.o(.text.init+0x7d8): relocation truncated to fit: R_MIPS_GPREL16
execute_command
arch/mips/kernel/kernel.o(.debug+0x32e14): undefined reference to `L_E660'
arch/mips/kernel/kernel.o(.debug+0x60e7c): undefined reference to `L_E549'
arch/mips/kernel/kernel.o(.debug+0x8d097): undefined reference to `L_E8015'
arch/mips/kernel/kernel.o(.debug+0x8d0b9): undefined reference to `L_E8015'
arch/mips/kernel/kernel.o(.debug+0x8d168): undefined reference to `L_E8015'
arch/mips/kernel/kernel.o(.debug+0x8d18a): undefined reference to `L_E8015'
arch/mips/kernel/kernel.o(.debug+0x8d31f): undefined reference to `L_E8867'
arch/mips/kernel/kernel.o(.debug+0x8d3b6): undefined reference to `L_E8015'
arch/mips/kernel/kernel.o(.debug+0x8d3d8): undefined reference to `L_E8015'
arch/mips/kernel/kernel.o(.debug+0x8d52d): undefined reference to `L_E8867'
arch/mips/kernel/kernel.o(.debug+0x8d5c4): undefined reference to `L_E8015'
arch/mips/kernel/kernel.o(.debug+0x8d5e6): undefined reference to `L_E8015'
arch/mips/kernel/kernel.o(.debug+0x8d6f2): undefined reference to `L_E8867'
arch/mips/kernel/kernel.o(.debug+0x8d718): undefined reference to `L_E8015'
arch/mips/kernel/kernel.o(.debug+0x8d762): undefined reference to `L_E8015'
arch/mips/kernel/kernel.o(.debug+0x172bec): undefined reference to `L_E8153'
arch/mips/kernel/kernel.o(.debug+0x19dea0): undefined reference to `L_E111'
arch/mips/kernel/kernel.o(.debug+0x19debe): undefined reference to `L_E1321'
arch/mips/kernel/kernel.o(.debug+0x1f64f2): undefined reference to `L_E7978'
arch/mips/kernel/kernel.o(.debug+0x1f662a): undefined reference to `L_E7978'

It goes on like this for 800 lines. Does anyone know why this happens?

regards
Andre

^ permalink raw reply	[flat|nested] 14+ messages in thread
* RE: Cross Compiler again
@ 2001-11-22 12:42 Andre.Messerschmidt
  2001-11-22 18:17 ` H . J . Lu
  0 siblings, 1 reply; 14+ messages in thread
From: Andre.Messerschmidt @ 2001-11-22 12:42 UTC (permalink / raw)
  To: hjl; +Cc: linux-mips


> May I ask why you want dwarf? FWIW, gcc 2.96 in my RedHat 7.1 mips port
> supports dwarf, but not as default. I don't know how well it works with
> dwarf. Yes, both cross compiler running on RedHat/x86 7.1/7.2 and
> native compiler are provided in my mips port.
> 
I need dwarf support because my debugger only supports dwarf. (It is an
integrated simulation environment, where I cannot change the debugger to
gdb).

Do you have a download link for your mips port?

regards
Andre

^ permalink raw reply	[flat|nested] 14+ messages in thread
* Cross Compiler again
@ 2001-11-22  9:08 Andre.Messerschmidt
  2001-11-22 10:03 ` H . J . Lu
  2001-11-22 15:53 ` Bradley D. LaRonde
  0 siblings, 2 replies; 14+ messages in thread
From: Andre.Messerschmidt @ 2001-11-22  9:08 UTC (permalink / raw)
  To: linux-mips

Hi.

For my environment I need a compiler that supports dwarf debug information.
Sadly my precompiled version does not have this support so I tried it on my
own, using Bradley D. LaRonde's  HowTo. 
All went well but I had to learn that GCC 3.0.1 is not able to compile a
current kernel. So I tried version 2.95.3, but I ran into the same problem
that I had last time I tried such a thing. When compiling glibc the process
failed because of a missing -D__PIC__ option. I was told that this has to do
with a non-MIPS compiler that is used, but the compiler used is my previous
build static version of gcc. 
I don't know what else may be wrong or where to look. Can anybody enlighten
me?

Or has anybody a precompiled gcc with dwarf support for download (That is
able to compile a current kernel, of course. ;-) )?

Best regards
--
Andre Messerschmidt

Application Engineer
Infineon Technologies AG

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

end of thread, other threads:[~2001-11-26 21:31 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-11-22 17:13 AW: Cross Compiler again Andre.Messerschmidt
2001-11-25 17:13 ` Daniel Jacobowitz
2001-11-26 11:28 ` Ralf Baechle
2001-11-26 12:06   ` Maciej W. Rozycki
  -- strict thread matches above, loose matches on Subject: below --
2001-11-26 16:27 AW: " Andre.Messerschmidt
2001-11-26 20:31 ` Daniel Jacobowitz
2001-11-26 13:38 AW: " Andre.Messerschmidt
2001-11-26 13:48 ` Ralf Baechle
2001-11-26  8:59 Andre.Messerschmidt
2001-11-26 11:22 ` Ralf Baechle
2001-11-22 12:42 Andre.Messerschmidt
2001-11-22 18:17 ` H . J . Lu
2001-11-22  9:08 Andre.Messerschmidt
2001-11-22 10:03 ` H . J . Lu
2001-11-22 15:53 ` Bradley D. LaRonde
2001-11-22 15:53   ` Bradley D. LaRonde

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox