This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[PATCH] Building cross compiler Linux/i386 -> sh-elf fails


Hi,

build a cross compiler for sh-elf failed with
the recent snapshot 2001-01-08:

make[3]: Leaving directory `/home/hsc/C/cross-sh/build-gcc/gcc/po'
../xgcc -B./ -B/home/hsc/sh-elf/bin/ -isystem /home/hsc/sh-elf/include -DCROSS_COMPILE -DIN_GCC    -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -isystem ./include  -I. -I. -I../../gcc-20010108/gcc -I../../gcc-20010108/gcc/. -I../../gcc-20010108/gcc/config -I../../gcc-20010108/gcc/../include -m2 -g0 \
  -finhibit-size-directive -fno-inline-functions \
  -fno-exceptions  -Dinhibit_libc \
  -c ../../gcc-20010108/gcc/crtstuff.c -DCRT_BEGIN -o m2/crtbegin.o
/tmp/ccPVOOwc.s: Assembler messages:
/tmp/ccPVOOwc.s:86: Error: operation combines symbols in different segments

The following patch should solve the problem.

Hartmut

*** sh.h.orig	Tue Jan  9 11:25:22 2001
--- sh.h	Tue Jan  9 13:51:57 2001
***************
*** 2433,2443 ****
         operand, but this breaks with -fPIC.  FIXME.  */			\
      asm \
        ("mov.l	1f,r1\n\
  	mova	2f,r0\n\
  	braf	r1\n\
  	lds	r0,pr\n\
  0:	.p2align 2\n\
! 1:	.long	" USER_LABEL_PREFIX #func " - 0b\n\
  2:")
  
  #endif /* sh.h */
--- 2433,2445 ----
         operand, but this breaks with -fPIC.  FIXME.  */			\
      asm \
        ("mov.l	1f,r1\n\
+ 	mova	0f,r0\n\
+ 	sub	r0,r1\n\
  	mova	2f,r0\n\
  	braf	r1\n\
  	lds	r0,pr\n\
  0:	.p2align 2\n\
! 1:	.long	" USER_LABEL_PREFIX #func "\n\
  2:")
  
  #endif /* sh.h */

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]