[VxWorks] Use elfos.h for i586-wrs-vxworks

Richard Sandiford richard@codesourcery.com
Mon Mar 12 10:11:00 GMT 2007

VxWorks currently uses the definition of ASM_OUTPUT_ASCII in i386/att.h,
which outputs the strings using byte pseudo-ops instead of string
pseudo-ops.  A lot of string-matching tests fail because of this.
Rather than skip them all on VxWorks, or add complicated comment code
to i386/att.h, I thought it would be better to use string pseudo-ops

RTEMS already uses the sequence "i386/att.h elfos.h", so I tried using
it on VxWorks too.  The -dM output for i386.o showed that only three
macros changed:

      The object of the exercise.

      The new definition is equivalent to the old one.

      att.h uses ".set .,.+foo" while elfos.h uses ".zero foo".

I wondered whether elfos.h had been deliberately avoided in an attempt
to be compatible with the Diab assembler.  However, neither version of
ASM_OUTPUT_SKIP works with Diab, and more basic things like the .section
pseudo-ops don't either.  There's no hope of assembling either the
before-patch or after-patch code with Diab.

Tested on i586-wrs-vxworks.  OK to install?


	* config.gcc (i[4567]86-wrs-vxworks, i[4567]86-wrs-vxworksae): Add
	elfos.h to tm_file.

Index: gcc/config.gcc
--- gcc/config.gcc	(revision 122834)
+++ gcc/config.gcc	(working copy)
@@ -1317,7 +1317,7 @@ i[34567]86-*-sysv4*)		# Intel 80386's ru
-	tm_file="${tm_file} i386/sysv4.h i386/unix.h i386/att.h vx-common.h"
+	tm_file="${tm_file} i386/sysv4.h i386/unix.h i386/att.h elfos.h vx-common.h"
 	case ${target} in
 	    tm_file="${tm_file} vxworksae.h i386/vxworksae.h"

More information about the Gcc-patches mailing list