NetBSD/arm32 lossage on current egcs sources

Todd Vierling tv@netbsd.org
Fri May 15 19:09:00 GMT 1998


egcs in the current working sources has two problems, with simple fixes,
that allow egcs to work fully on NetBSD/arm32.

One bug is the incorrect handling of the C preprocessor symbol
"DWARF2_UNWIND_INFO" - trivial.  The other is a fix for TYPE_OPERAND_FMT.

First, a little background, because the explanation is complicated: 
NetBSD/arm32 is currently a rather divergent port from the rest of NetBSD,
because there are at least two (to my personal knowledge) "flavors" of
NetBSD/arm32, one for the RiscPC line, and one for the DNARD (Network
Computer, Inc. development platform produced by DEC).  They both use the
same userland binary sets, excepting toolchain.

The RiscPC flavor uses a binutils derived from 2.9 and produced by Mark
Briticombe.  The other uses a binutils derived from 2.7 and produced by a
group at DEC including Chris Demetriou (cgd@netbsd.org).  Hopefully, after
some still standing problems are worked out and the ports can share the same
codebase, all this will be resolved. 

The problem lies in the fact that the .type assembler directive only accepts
the "#" character in the DEC incantation of binutils, whereas the RiscPC
flavor accepts all of "%", "#", and "@" (an additional hack added on to
binutils to make it happy with other assembler sources).  Currently, gcc 2.8
(and egcs) use "%" for the formatting character. 

In order to make egcs work with both versions of binutils, the fix is
simple; change the .type format character to a "#".  ChangeLog entry and
patch attached:

Fri May 15 21:56:54 EDT 1998  Todd Vierling  <tv@netbsd.org>

	* gcc/config/arm/netbsd.h: Not all NetBSD/arm32 ports support
	.type _symbol,%tag.  Use #tag, which is usable by all NetBSD/arm32
	platforms now and in the future.
	* gcc/config/arm/netbsd.h: Undefine DWARF2_UNWIND_INFO; don't
	define it to "0".

Index: gcc/config/arm/netbsd.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/arm/netbsd.h,v
retrieving revision 1.3
diff -u -r1.3 netbsd.h
--- netbsd.h	1998/01/13 20:58:45	1.3
+++ netbsd.h	1998/05/16 01:56:06
@@ -106,7 +106,7 @@
 /* On the ARM `@' introduces a comment, so we must use something else
    for .type directives.  */
 #undef TYPE_OPERAND_FMT
-#define TYPE_OPERAND_FMT "%%%s"
+#define TYPE_OPERAND_FMT "#%s"
 
 /* VERY BIG NOTE : Change of structure alignment for RiscBSD.
    There are consequences you should be aware of...
@@ -144,5 +144,4 @@
 
 /* Until they use ELF or something that handles dwarf2 unwinds
    and initialization stuff better.  */
-#define DWARF2_UNWIND_INFO 0
-
+#undef DWARF2_UNWIND_INFO

-- 
-- Todd Vierling (Personal tv@pobox.com; Bus. todd_vierling@xn.xerox.com)




More information about the Gcc-bugs mailing list