WinCE support in BINUTILS

Nick Clifton nickc@cygnus.com
Wed Feb 23 15:06:00 GMT 2000


Hi Guys,

  Unless anyone has any objections I would like ot apply the following
  patch.  It adds support to BINUTILS for toolchains targeted at
  Microsoft's Windows CE operating system.  At the moment these
  targets are mips-pe, sh-pe and arm-wince.

  Note - the ARM target used to be called arm-wince-pe, but it has
  been pointed out to me that this is wrong, and that it ought to be
  arm-wince instead.  I will be fixing the patches for the other parts
  of the toolchain that I have already sent out.

  Patch for other parts of binutils will follow.

Cheers
	Nick

2000-02-23  Nick Clifton  <nickc@cygnus.com>

	* configure.in: Add arm-wince, mips-pe and sh-pe targets.
	* configure: Regenerate.

	* dlltoolc.: Add support for sh-pe and mips-pe targets.
	* rescoff.c: Add support for sh-pe and mips-pe targets.

Index: configure
===================================================================
RCS file: /cvs/src//src/binutils/configure,v
retrieving revision 1.9
diff -p -w -r1.9 configure
*** configure	1999/09/14 23:26:47	1.9
--- configure	2000/02/23 23:04:31
*************** do
*** 5176,5182 ****
  	*-*-hms*) BUILD_SRCONV='$(SRCONV_PROG)' ;;
  	esac
  	case $targ in
! 	arm-*pe*)
    	  BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
  	  DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM"
  	  BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
--- 5176,5182 ----
  	*-*-hms*) BUILD_SRCONV='$(SRCONV_PROG)' ;;
  	esac
  	case $targ in
! 	arm-*pe* | arm-*-wince)
    	  BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
  	  DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM"
  	  BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
*************** do
*** 5199,5204 ****
--- 5199,5214 ----
  	powerpc*-*-*pe* | powerpc*-*-cygwin*)
    	  BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
  	  DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_PPC"
+ 	  BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
+ 	  ;;
+ 	sh*-*-*pe)
+   	  BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
+ 	  DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_SH"
+ 	  BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
+ 	  ;;
+ 	mips*-*-*pe)
+   	  BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
+ 	  DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MIPS"
  	  BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
  	  ;;
  	mcore-*pe)

Index: configure.in
===================================================================
RCS file: /cvs/src//src/binutils/configure.in,v
retrieving revision 1.9
diff -p -w -r1.9 configure.in
*** configure.in	1999/09/14 23:26:47	1.9
--- configure.in	2000/02/23 23:04:31
*************** changequote([,])dnl
*** 182,188 ****
  	*-*-hms*) BUILD_SRCONV='$(SRCONV_PROG)' ;;
  	esac
  	case $targ in
! 	arm-*pe*)
    	  BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
  	  DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM"
  	  BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
--- 182,188 ----
  	*-*-hms*) BUILD_SRCONV='$(SRCONV_PROG)' ;;
  	esac
  	case $targ in
! 	arm-*pe* | arm-*-wince)
    	  BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
  	  DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM"
  	  BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
*************** changequote([,])dnl
*** 207,212 ****
--- 207,222 ----
  	powerpc*-*-*pe* | powerpc*-*-cygwin*)
    	  BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
  	  DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_PPC"
+ 	  BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
+ 	  ;;
+ 	sh*-*-*pe)
+   	  BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
+ 	  DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_SH"
+ 	  BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
+ 	  ;;
+ 	mips*-*-*pe)
+   	  BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
+ 	  DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MIPS"
  	  BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
  	  ;;
  	mcore-*pe)

Index: dlltool.c
===================================================================
RCS file: /cvs/src//src/binutils/dlltool.c,v
retrieving revision 1.23
diff -p -w -r1.23 dlltool.c
*** dlltool.c	2000/01/20 23:42:51	1.23
--- dlltool.c	2000/02/23 23:04:31
*************** static const char *mname = "i386";
*** 394,399 ****
--- 394,407 ----
  static const char *mname = "ppc";
  #endif
  
+ #ifdef DLLTOOL_SH
+ static const char *mname = "sh";
+ #endif
+ 
+ #ifdef DLLTOOL_MIPS
+ static const char *mname = "mips";
+ #endif
+ 
  #ifdef DLLTOOL_MCORE
  static const char * mname = "mcore-le";
  #endif

Index: rescoff.c
===================================================================
RCS file: /cvs/src//src/binutils/rescoff.c,v
retrieving revision 1.2
diff -p -w -r1.2 rescoff.c
*** rescoff.c	1999/05/11 21:06:15	1.2
--- rescoff.c	2000/02/23 23:04:31
*************** write_coff_file (filename, target, resou
*** 447,452 ****
--- 447,460 ----
    if (! bfd_set_format (abfd, bfd_object))
      bfd_fatal ("bfd_set_format");
  
+ #ifdef DLLTOOL_SH
+   if (! bfd_set_arch_mach (abfd, bfd_arch_sh, 0))
+     bfd_fatal ("bfd_set_arch_mach(sh)");
+ #else
+ #ifdef DLLTOOL_MIPS
+   if (! bfd_set_arch_mach (abfd, bfd_arch_mips, 0))
+     bfd_fatal ("bfd_set_arch_mach(mips)");
+ #else
  #ifdef DLLTOOL_ARM
    if (! bfd_set_arch_mach (abfd, bfd_arch_arm, 0))
      bfd_fatal ("bfd_set_arch_mach(arm)");
*************** write_coff_file (filename, target, resou
*** 455,460 ****
--- 463,470 ----
    if (! bfd_set_arch_mach (abfd, bfd_arch_i386, 0))
      bfd_fatal ("bfd_set_arch_mach(i386)");
  #endif /* arm */
+ #endif /* mips */
+ #endif /* sh */
  
    if (! bfd_set_file_flags (abfd, HAS_SYMS | HAS_RELOC))
      bfd_fatal ("bfd_set_file_flags");



More information about the Binutils mailing list