This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


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

[patch] Hacks to get arm-elf to cross compile


Hello,

I've checked in the attatched as a fairly obvious fix.
My memory of previous discussion concluded that:

/* A temporary sop to older compilers */
#if defined (__NetBSD__) || defined (unix)
#  ifndef __unix              /* (good for long-term portability?)  */
#    define __unix    1
#  endif
#endif

was the lesser of many evils.  While the RDI code should be autoconf'ed 
that wasn't likely to happen.

The warning flag in the MAINTAINERS file is set to -w (just ignore 
warnings :-( ).

Can someone check that I've really fixed the IRIX cross compile problem?

	Andrew

2001-06-28  Andrew Cagney  <ac131313@redhat.com>

	* rdi-share/unixcomm.c (SERIAL_PREFIX): Always provide a default.
	* rdi-share/hostchan.h (__unix): Hack, provide a default value.
	* rdi-share/host.h (__unix): Hack, define when __NetBSD__.
	* TODO: Update.
	* MAINTAINERS: Update.  arm-elf builds.

Index: MAINTAINERS
===================================================================
RCS file: /cvs/src/src/gdb/MAINTAINERS,v
retrieving revision 1.102
diff -p -r1.102 MAINTAINERS
*** MAINTAINERS	2001/06/28 02:40:39	1.102
--- MAINTAINERS	2001/06/29 01:16:10
*************** maintainer works with the native maintai
*** 57,63 ****
  	arc		--target=arc-elf ,-Werror
  			Maintenance only
  
! 	arm		(--target=arm-coff,arm-elf,arm-pe broken)
  			Fernando Nasser		fnasser@cygnus.com
  			Scott Bambrough		scottb@netwinder.org
  
--- 57,63 ----
  	arc		--target=arc-elf ,-Werror
  			Maintenance only
  
! 	arm		--target=arm-coff,arm-elf,arm-pe -w
  			Fernando Nasser		fnasser@cygnus.com
  			Scott Bambrough		scottb@netwinder.org
  
Index: TODO
===================================================================
RCS file: /cvs/src/src/gdb/TODO,v
retrieving revision 1.85
diff -p -r1.85 TODO
*** TODO	2001/06/28 19:04:10	1.85
--- TODO	2001/06/29 01:16:16
*************** patch has been submitted.
*** 133,146 ****
  
  The following code cleanups will hopefully be applied to GDB 5.1.
  
- -- 2001-03-26
- 
- Resolve the build status of all broken targets as identified by the
- MAINTAINERS file.
- 
- 	o	arm-* vs NetBSD's lack of ``unix''
- 	o	arm-* vs IRIX (see below)
- 
  --
  
  Fix copyright notices.
--- 133,138 ----
*************** custom tty manipulation - it should be u
*** 338,355 ****
  --
  
  Rename read_register{,_pid}() to read_unsigned_register{,_pid}().
- 
- --
- 
- Can't build IRIX -> arm GDB.
- http://sourceware.cygnus.com/ml/gdb-patches/2000-04/msg00356.html
- 
- David Whedon writes:
- > Now I'm building for an embedded arm target.  If there is a way of turning
- > remote-rdi off, I couldn't find it. It looks like it gets built by default
- > in gdb/configure.tgt(line 58) Anyway, the build dies in
- > gdb/rdi-share/unixcomm.c.  SERPORT1 et. al. never get defined because we
- > aren't one of the architectures supported.
  
  --
  
--- 330,335 ----
Index: rdi-share/host.h
===================================================================
RCS file: /cvs/src/src/gdb/rdi-share/host.h,v
retrieving revision 1.3
diff -p -r1.3 host.h
*** host.h	2001/06/24 13:46:09	1.3
--- host.h	2001/06/29 01:16:20
***************
*** 37,49 ****
  #endif
  #endif
  
! #ifdef unix                   /* A temporary sop to older compilers */
  #  ifndef __unix              /* (good for long-term portability?)  */
  #    define __unix    1
  #  endif
  #endif
  
! #ifdef __unix
  /* Generic unix -- hopefully a split into other variants will not be    */
  /* needed.  However, beware the 'bsd' test above and safe_toupper etc.  */
  /* which cope with backwards (pre-posix/X/open) unix compatility.       */
--- 37,50 ----
  #endif
  #endif
  
! /* A temporary sop to older compilers */
! #if defined (__NetBSD__) || defined (unix)
  #  ifndef __unix              /* (good for long-term portability?)  */
  #    define __unix    1
  #  endif
  #endif
  
! #if defined(__unix)
  /* Generic unix -- hopefully a split into other variants will not be    */
  /* needed.  However, beware the 'bsd' test above and safe_toupper etc.  */
  /* which cope with backwards (pre-posix/X/open) unix compatility.       */
Index: rdi-share/hostchan.h
===================================================================
RCS file: /cvs/src/src/gdb/rdi-share/hostchan.h,v
retrieving revision 1.1.1.2
diff -p -r1.1.1.2 hostchan.h
*** hostchan.h	1999/11/02 04:44:26	1.1.1.2
--- hostchan.h	2001/06/29 01:16:20
***************
*** 23,28 ****
--- 23,35 ----
  #endif
  #endif
  
+ /* A temporary sop to older compilers */
+ #if defined (__NetBSD__) || defined (unix)
+ #  ifndef __unix              /* (good for long-term portability?)  */
+ #    define __unix    1
+ #  endif
+ #endif
+ 
  /* struct timeval */
  #if defined(__unix) || defined(__CYGWIN32__)
  #  include <sys/time.h>
Index: rdi-share/unixcomm.c
===================================================================
RCS file: /cvs/src/src/gdb/rdi-share/unixcomm.c,v
retrieving revision 1.2
diff -p -r1.2 unixcomm.c
*** unixcomm.c	2000/02/25 16:37:32	1.2
--- unixcomm.c	2001/06/29 01:16:22
***************
*** 96,110 ****
  #define PARPORT2   "/dev/par1"
  #endif
  
- #if defined (__FreeBSD__) || defined (__NetBSD__) || defined (__OpenBSD__) || defined (bsdi)
- #define SERIAL_PREFIX "/dev/cuaa"
- #define SERPORT1   "/dev/cuaa0"
- #define SERPORT2   "/dev/cuaa1"
- #define PARPORT1   "/dev/lpt0"
- #define PARPORT2   "/dev/lpt1"
- #endif
- 
- 
  #if defined(_WIN32) || defined (__CYGWIN32__) 
  #define SERIAL_PREFIX "com"
  #define SERPORT1   "com1"
--- 96,101 ----
***************
*** 112,117 ****
--- 103,117 ----
  #define PARPORT1   "lpt1"
  #define PARPORT2   "lpt2"
  #endif
+ 
+ #if !defined (SERIAL_PREFIX)
+ #define SERIAL_PREFIX "/dev/cuaa"
+ #define SERPORT1   "/dev/cuaa0"
+ #define SERPORT2   "/dev/cuaa1"
+ #define PARPORT1   "/dev/lpt0"
+ #define PARPORT2   "/dev/lpt1"
+ #endif
+ 
  
  
  

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