This is the mail archive of the gcc-patches@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 to get m68k targets working


Here's another one from the multi-cross-target builds, it occured with
a target of m68k-motorola-sysv:

 > sdbout.c: In function `sdbout_source_line':
 > sdbout.c:1613: `last_linenum' undeclared (first use in this function)
 > sdbout.c:1613: (Each undeclared identifier is reported only once
 > sdbout.c:1613: for each function it appears in.)
 > make: *** [sdbout.o] Error 1

I took a guess when fixing it, dunno if its right.  I also noticed
that the same construct appeared in several other files in the m68k
directory, so I changed them all.  Tested by building cc1 in cross
compilers to m68000-att-sysv, m68k-apple-aux, m68k-crds-unos and
m68k-motorola-sysv.  (That covers the list of files touched.)

Okay to install?

		--Kaveh


2001-10-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>

	* m68k/3b1.h (ASM_OUTPUT_SOURCE_LINE): Don't reference `last_linenum'.
	* m68k/auxas.h (ASM_OUTPUT_SOURCE_LINE): Likewise.
	* m68k/crds.h (ASM_OUTPUT_SOURCE_LINE): Likewise.
	* m68k/mot3300.h (ASM_OUTPUT_SOURCE_LINE): Likewise.

diff -rup orig/egcs-CVS20011007/gcc/config/m68k/3b1.h egcs-CVS20011007/gcc/config/m68k/3b1.h
--- orig/egcs-CVS20011007/gcc/config/m68k/3b1.h	Mon Apr 16 14:30:41 2001
+++ egcs-CVS20011007/gcc/config/m68k/3b1.h	Mon Oct  8 14:09:27 2001
@@ -178,7 +178,7 @@ do { long l;					\
 #define ASM_OUTPUT_SOURCE_LINE(FILE, LINENO)	\
   fprintf (FILE, "\tln\t%d\n",			\
 	   (sdb_begin_function_line		\
-	    ? last_linenum - sdb_begin_function_line : 1))
+	    ? (LINENO) - sdb_begin_function_line : 1))
 
 /* Yet another null terminated string format. */
 
diff -rup orig/egcs-CVS20011007/gcc/config/m68k/auxas.h egcs-CVS20011007/gcc/config/m68k/auxas.h
--- orig/egcs-CVS20011007/gcc/config/m68k/auxas.h	Mon Sep 25 09:22:45 2000
+++ egcs-CVS20011007/gcc/config/m68k/auxas.h	Mon Oct  8 13:59:01 2001
@@ -180,7 +180,7 @@ do { fprintf (asm_out_file, "\tdef\t");	
 #define ASM_OUTPUT_SOURCE_LINE(FILE, LINE)		\
     fprintf((FILE), "\tln\t%d\n", 			\
 	    (sdb_begin_function_line > 1 ?		\
-	     last_linenum - sdb_begin_function_line : 1))
+	     (LINE) - sdb_begin_function_line : 1))
 
 #define ASM_MOV_INSN	"mov.l"
 
diff -rup orig/egcs-CVS20011007/gcc/config/m68k/crds.h egcs-CVS20011007/gcc/config/m68k/crds.h
--- orig/egcs-CVS20011007/gcc/config/m68k/crds.h	Fri Jul  6 16:31:16 2001
+++ egcs-CVS20011007/gcc/config/m68k/crds.h	Mon Oct  8 14:07:06 2001
@@ -457,7 +457,7 @@ do {  int i;								\
 #define ASM_OUTPUT_SOURCE_LINE(FILE, LINENO)	\
   fprintf (FILE, "\t; ln\t%d\n",			\
 	   (sdb_begin_function_line		\
-	    ? last_linenum - sdb_begin_function_line : 1))
+	    ? (LINENO) - sdb_begin_function_line : 1))
 
 /* Must put address in  %a0 , not  %d0 . -- LGM, 7/15/88 */
 /* UNOS ?? */
diff -rup orig/egcs-CVS20011007/gcc/config/m68k/mot3300.h egcs-CVS20011007/gcc/config/m68k/mot3300.h
--- orig/egcs-CVS20011007/gcc/config/m68k/mot3300.h	Thu Aug  9 22:48:12 2001
+++ egcs-CVS20011007/gcc/config/m68k/mot3300.h	Mon Oct  8 13:48:58 2001
@@ -412,7 +412,7 @@ do { long l;					\
 #define ASM_OUTPUT_SOURCE_LINE(FILE, LINENO)	\
   fprintf (FILE, "\tln\t%d\n",			\
 	   (sdb_begin_function_line		\
-	    ? last_linenum - sdb_begin_function_line : 1))
+	    ? (LINENO) - sdb_begin_function_line : 1))
 
 /* Yet another null terminated string format.  */
 


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