This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: build failure


Hi Tom,

The score port is a little weird. It is a 32-bit target with a few 48-bit instructions. So it needs a 64-bit bfd_vma in order to cope with those extra long instrcutions, but everything else is 32-bits.

Please try the attached patch which changes the score target so that it is grouped with the 64-bit targets in the bfd directory and changes the score-dis.c opcodes file so that it is basically empty unless BFD64 is defined. I think that this should work.

Cheers
  Nick


Index: bfd/Makefile.am
===================================================================
RCS file: /cvs/src/src/bfd/Makefile.am,v
retrieving revision 1.221
diff -c -3 -p -r1.221 Makefile.am
*** bfd/Makefile.am	3 Mar 2009 02:41:10 -0000	1.221
--- bfd/Makefile.am	13 Mar 2009 11:19:48 -0000
*************** BFD32_BACKENDS = \
*** 288,295 ****
  	elf32-pj.lo \
  	elf32-ppc.lo \
  	elf32-s390.lo \
- 	elf32-score.lo \
- 	elf32-score7.lo \
  	elf32-sh.lo \
  	elf32-sh-symbian.lo \
  	elf32-sh64.lo \
--- 288,293 ----
*************** BFD32_BACKENDS_CFILES = \
*** 474,481 ****
  	elf32-sh64.c \
  	elf32-sh64-com.c \
  	elf32-s390.c \
- 	elf32-score.c \
- 	elf32-score7.c \
  	elf32-sh.c \
  	elf32-sh-symbian.c \
  	elfxx-sparc.c \
--- 472,477 ----
*************** BFD64_BACKENDS = \
*** 588,593 ****
--- 584,591 ----
  	elfn32-mips.lo \
  	elf64-mips.lo \
  	elf64-mmix.lo \
+ 	elf32-score.lo \
+ 	elf32-score7.lo \
  	elf64-sh64.lo \
  	elf64-ppc.lo \
  	elf64-s390.lo \
*************** BFD64_BACKENDS_CFILES = \
*** 623,628 ****
--- 621,628 ----
  	elf64-mmix.c \
  	elf64-ppc.c \
  	elf64-s390.c \
+ 	elf32-score.c \
+ 	elf32-score7.c \
  	elf64-sh64.c \
  	elf64-sparc.c \
  	elf64.c \
Index: bfd/config.bfd
===================================================================
RCS file: /cvs/src/src/bfd/config.bfd,v
retrieving revision 1.244
diff -c -3 -p -r1.244 config.bfd
*** bfd/config.bfd	15 Jan 2009 12:42:51 -0000	1.244
--- bfd/config.bfd	13 Mar 2009 11:19:50 -0000
*************** case "${targ}" in
*** 1192,1205 ****
      targ_defvec=bfd_elf64_s390_vec
      want64=true
      ;;
- #endif
  
    score*-*-elf*)
      targ_defvec=bfd_elf32_bigscore_vec
      targ_selvecs=bfd_elf32_littlescore_vec
      ;;
  
- #ifdef BFD64
    sh64l*-*-elf*)
      targ_defvec=bfd_elf32_sh64l_vec
      targ_selvecs="bfd_elf32_sh64_vec bfd_elf64_sh64l_vec bfd_elf64_sh64_vec bfd_elf32_shl_vec bfd_elf32_sh_vec"
--- 1192,1203 ----
Index: bfd/configure.in
===================================================================
RCS file: /cvs/src/src/bfd/configure.in,v
retrieving revision 1.256
diff -c -3 -p -r1.256 configure.in
*** bfd/configure.in	4 Mar 2009 02:10:33 -0000	1.256
--- bfd/configure.in	13 Mar 2009 11:19:55 -0000
*************** do
*** 746,753 ****
      bfd_elf32_powerpcle_vec)	tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;;
      bfd_elf32_powerpc_vxworks_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;;
      bfd_elf32_s390_vec)		tb="$tb elf32-s390.lo elf32.lo $elf" ;;
!     bfd_elf32_bigscore_vec)     tb="$tb elf32-score.lo elf32-score7.lo elf32.lo $elf"; want64=true;;
!     bfd_elf32_littlescore_vec)  tb="$tb elf32-score.lo elf32-score7.lo elf32.lo $elf"; want64=true;;
      # FIXME: We include cofflink.lo not because it's needed for
      # bfd_elf32_sh64[l]_vec, but because we include bfd_elf32_sh[l]_vec
      # which needs it but does not list it.  Should be fixed in right place.
--- 746,753 ----
      bfd_elf32_powerpcle_vec)	tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;;
      bfd_elf32_powerpc_vxworks_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;;
      bfd_elf32_s390_vec)		tb="$tb elf32-s390.lo elf32.lo $elf" ;;
!     bfd_elf32_bigscore_vec)     tb="$tb elf32-score.lo elf32-score7.lo elf32.lo $elf"; want64=true; target_size=64;;
!     bfd_elf32_littlescore_vec)  tb="$tb elf32-score.lo elf32-score7.lo elf32.lo $elf"; want64=true; target_size=64;;
      # FIXME: We include cofflink.lo not because it's needed for
      # bfd_elf32_sh64[l]_vec, but because we include bfd_elf32_sh[l]_vec
      # which needs it but does not list it.  Should be fixed in right place.
Index: bfd/targets.c
===================================================================
RCS file: /cvs/src/src/bfd/targets.c,v
retrieving revision 1.166
diff -c -3 -p -r1.166 targets.c
*** bfd/targets.c	15 Jan 2009 12:42:52 -0000	1.166
--- bfd/targets.c	13 Mar 2009 11:20:02 -0000
*************** static const bfd_target * const _bfd_tar
*** 980,987 ****
  	&bfd_elf32_powerpc_vxworks_vec,
  	&bfd_elf32_powerpcle_vec,
  	&bfd_elf32_s390_vec,
  	&bfd_elf32_bigscore_vec,
! 	&bfd_elf32_littlescore_vec, 
          &bfd_elf32_sh_vec,
          &bfd_elf32_shblin_vec,
          &bfd_elf32_shl_vec,
--- 980,989 ----
  	&bfd_elf32_powerpc_vxworks_vec,
  	&bfd_elf32_powerpcle_vec,
  	&bfd_elf32_s390_vec,
+ #ifdef BFD64
  	&bfd_elf32_bigscore_vec,
! 	&bfd_elf32_littlescore_vec,
! #endif
          &bfd_elf32_sh_vec,
          &bfd_elf32_shblin_vec,
          &bfd_elf32_shl_vec,
Index: opcodes/score-dis.c
===================================================================
RCS file: /cvs/src/src/opcodes/score-dis.c,v
retrieving revision 1.4
diff -c -3 -p -r1.4 score-dis.c
*** opcodes/score-dis.c	2 Mar 2009 10:33:08 -0000	1.4
--- opcodes/score-dis.c	13 Mar 2009 11:20:02 -0000
***************
*** 34,40 ****
  #include "elf/internal.h"
  #include "elf/score.h"
  
! /*****************************************************************************/
  /* s3_s7: opcodes and export prototypes.  */
  extern int 
  s7_print_insn (bfd_vma pc, struct disassemble_info *info, bfd_boolean little);
--- 33,39 ----
  #include "elf/internal.h"
  #include "elf/score.h"
  
! #ifdef BFD64
  /* s3_s7: opcodes and export prototypes.  */
  extern int 
  s7_print_insn (bfd_vma pc, struct disassemble_info *info, bfd_boolean little);
*************** print_insn_little_score (bfd_vma pc, str
*** 1194,1196 ****
--- 1193,1210 ----
    else
      return s7_print_insn (pc, info, TRUE);
  }
+ #else /* not BFD64 */
+ int
+ print_insn_big_score (bfd_vma pc ATTRIBUTE_UNUSED,
+ 		      struct disassemble_info * info ATTRIBUTE_UNUSED)
+ {
+   abort ();
+ }
+ 
+ int
+ print_insn_little_score (bfd_vma pc ATTRIBUTE_UNUSED,
+ 			 struct disassemble_info * info ATTRIBUTE_UNUSED)
+ {
+   abort ();
+ }
+ #endif 

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