public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] Troubles building gcc for sh-elf
@ 2000-11-20 18:37 Stephen Williams
  2000-11-20 19:25 ` [ECOS] " kaz Kojima
  0 siblings, 1 reply; 4+ messages in thread
From: Stephen Williams @ 2000-11-20 18:37 UTC (permalink / raw)
  To: ecos-discuss; +Cc: steve

This is not working for me. I am able to build binutils-2.10.1 --target=sh-elf
no problem on my Linux/alpha machine, but when I try to compile the
gcc-20001113 snapshot,  get the error shown below. I believe it's getting
the right assembler, and when I try for example binutils-2.9 it fails
even earlier.

However, I don't see a problem with binutils. I generated the .s file
with that command and looked on line 86. It is here...

	.type	_fini_dummy,@function
_fini_dummy:
	mov.l	r14,@-r15
	mov	r15,r14
		.section	.fini
	mov.l	1f,r1
	mova	2f,r0
	braf	r1
	lds	r0,pr
0:	.p2align 2
1:	.long	___do_global_dtors_aux - 0b  # <--- line 86
2:

It seems to be failing on the expression ``___do_global_dtors_aux - 0b''.

Sure enough, 0b is on the previous line (and this code is in the .fini section)
but the __do_global_dtors_aux is way back around line 20, and in the .text
section. I can't be the only one who is trying to get eCos to happen on
an sh processor, it's listed as a supported product, for Pete's sake!
It's acting as if the target type is not supported and I should be using
something other the --target=sh-elf.

So what should I be doing differently, that will be compatible with
eCos?

make[3]: Entering directory `/usr/local/src/obj/sh-elf/gcc-20001113/gcc'
/usr/local/src/obj/sh-elf/gcc-20001113/gcc/xgcc -B/usr/local/src/obj/sh-elf/gcc-20001113/gcc/ -nostdinc -B/usr/local/src/obj/sh-elf/gcc-20001113/sh-elf/newlib/ -isystem /usr/local/src/obj/sh-elf/gcc-20001113/sh-elf/newlib/targ-include -isystem /usr/local/src/gcc-20001113/newlib/libc/include -B/usr/local/sh-elf/bin/ -B/usr/local/sh-elf/lib/ -isystem /usr/local/sh-elf/include -DCROSS_COMPILE -DIN_GCC    -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -isystem ./include  -I. -I. -I/usr/local/src/gcc-20001113/gcc -I/usr/local/src/gcc-20001113/gcc/. -I/usr/local/src/gcc-20001113/gcc/config -I/usr/local/src/gcc-20001113/gcc/../include  -g0 \
  -finhibit-size-directive -fno-inline-functions \
  -fno-exceptions  -Dinhibit_libc \
  -c /usr/local/src/gcc-20001113/gcc/crtstuff.c -DCRT_BEGIN -o crtbegin.o
/tmp/ccJ5bmCL.s: Assembler messages:
/tmp/ccJ5bmCL.s:86: Error: operation combines symbols in different segments
make[3]: *** [crtbegin.o] Error 1
make[3]: Leaving directory `/usr/local/src/obj/sh-elf/gcc-20001113/gcc'
make[2]: *** [crtbegin.o] Error 2
make[2]: Leaving directory `/usr/local/src/obj/sh-elf/gcc-20001113/gcc'
make[1]: *** [stmp-multilib] Error 2
make[1]: Leaving directory `/usr/local/src/obj/sh-elf/gcc-20001113/gcc'
make: *** [all-gcc] Error 2

-- 
Steve Williams                "The woods are lovely, dark and deep.
steve@icarus.com              But I have promises to keep,
steve@picturel.com            and lines to code before I sleep,
http://www.picturel.com       And lines to code before I sleep."


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

* [ECOS] Re: Troubles building gcc for sh-elf
  2000-11-20 18:37 [ECOS] Troubles building gcc for sh-elf Stephen Williams
@ 2000-11-20 19:25 ` kaz Kojima
  2000-11-21 11:41   ` Stephen Williams
  0 siblings, 1 reply; 4+ messages in thread
From: kaz Kojima @ 2000-11-20 19:25 UTC (permalink / raw)
  To: ecos-discuss

Stephen Williams <steve@icarus.com> wrote:
>This is not working for me. I am able to build binutils-2.10.1 --target=sh-elf
>no problem on my Linux/alpha machine, but when I try to compile the
>gcc-20001113 snapshot,  get the error shown below. I believe it's getting
>the right assembler, and when I try for example binutils-2.9 it fails
>even earlier.
[snip]
> /tmp/ccJ5bmCL.s: Assembler messages:
> /tmp/ccJ5bmCL.s:86: Error: operation combines symbols in different segments

I've seen this error once, not in ECOS work but our Linux work.
Please try CVS or the latest snapshot of binutils. My as (GNU
assembler version 2.10.91 (sh-unknown-linux-gnu)) can assemble
the above source without problem.

--
kkojima@rr.iij4u.or.jp
http://rr.iij4u.or.jp/~kkojima

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

* Re: [ECOS] Re: Troubles building gcc for sh-elf
  2000-11-20 19:25 ` [ECOS] " kaz Kojima
@ 2000-11-21 11:41   ` Stephen Williams
  2000-11-21 17:49     ` Jonathan Larmour
  0 siblings, 1 reply; 4+ messages in thread
From: Stephen Williams @ 2000-11-21 11:41 UTC (permalink / raw)
  To: kaz Kojima; +Cc: ecos-discuss

> /tmp/ccJ5bmCL.s: Assembler messages:
> /tmp/ccJ5bmCL.s:86: Error: operation combines symbols in different segments


kkojima@rr.iij4u.or.jp said:
> I've seen this error once, not in ECOS work but our Linux work. Please
> try CVS or the latest snapshot of binutils.

OK, this took care of it. With binutils-001118, the C and C++ compilers
for sh-elf compiled just fine, and libgcc.a compiled as well.

Someone should update the "Building the Hitachi SH development tools for Linux"
page, which directly recommends binutils 2.10.1, which definitely does not
work with the gcc snapshots, which the page also insists is required.

  < http://sources.redhat.com/ecos/tools/linux-sh-elf.html >

And now I figure out where to go from here. Thanks for the help.
-- 
Steve Williams                "The woods are lovely, dark and deep.
steve@icarus.com              But I have promises to keep,
steve@picturel.com            and lines to code before I sleep,
http://www.picturel.com       And lines to code before I sleep."


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

* Re: [ECOS] Re: Troubles building gcc for sh-elf
  2000-11-21 11:41   ` Stephen Williams
@ 2000-11-21 17:49     ` Jonathan Larmour
  0 siblings, 0 replies; 4+ messages in thread
From: Jonathan Larmour @ 2000-11-21 17:49 UTC (permalink / raw)
  To: Stephen Williams; +Cc: kaz Kojima, ecos-discuss

Stephen Williams wrote:
> 
> Someone should update the "Building the Hitachi SH development tools for Linux"
> page, which directly recommends binutils 2.10.1, which definitely does not
> work with the gcc snapshots, which the page also insists is required.
> 
>   < http://sources.redhat.com/ecos/tools/linux-sh-elf.html >

I'll do that. Thanks for the report - it *used* to work, but those gcc guys
have a habit of moving the goalposts :).

Jifl
-- 
Red Hat, 35 Cambridge Place, Cambridge, UK. CB2 1NS  Tel: +44 (1223) 728762
"Plan to be spontaneous tomorrow."  ||  These opinions are all my own fault

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

end of thread, other threads:[~2000-11-21 17:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-11-20 18:37 [ECOS] Troubles building gcc for sh-elf Stephen Williams
2000-11-20 19:25 ` [ECOS] " kaz Kojima
2000-11-21 11:41   ` Stephen Williams
2000-11-21 17:49     ` Jonathan Larmour

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).