[patch] define ASM_COMMENT_START in config/i386/gas.h

KRECKEL Richard NGLT Richard.Kreckel@framatome-anp.com
Tue Sep 23 13:16:00 GMT 2003


Hi

The following little patch is needed for a cross-compiler targeting a
plain i386-aout embedded system for -fverbose-asm to be useful.
gcc/config.gcc appends "i386/unix.h i386/bsd.h i386/gas.h
i386/gstabs.h i386/i386-aout.h" to $tm_file.  However, i386/unix.h
already defines ASM_COMMENT_START as "/" which gas doesn't understand.
This confuses compilations with -fverbose-asm.  Right now, this
redefinition is done at a later stage for just about any OS (linux,
netbsd, freebsd, darwin, beos, ...) inside the i386/<os>.h files.  The
issue seems to have been brought up before but without any conclusion.
See <http://gcc.gnu.org/ml/gcc-patches/2002-01/msg00118.html>. The
patch applies to GCC-3.3.1 vanilla.

--- gcc-3.3.1.orig/gcc/ChangeLog        2003-08-04 14:48:12.000000000 +0200
+++ gcc-3.3.1/gcc/ChangeLog     2003-09-23 10:23:40.000000000 +0200
@@ -1,1 +1,5 @@
+2003-09-23  Richard B. Kreckel  <richard.kreckel@framatome-anp.com>
+
+	* config/i386/gas.h (ASM_COMMENT_START): define to "#".
+
 2003-08-04  Release Manager

        * GCC 3.3.1 Released.
diff -Naur gcc-3.3.1.orig/gcc/config/i386/gas.h
gcc-3.3.1/gcc/config/i386/gas.h
--- gcc-3.3.1.orig/gcc/config/i386/gas.h        2002-08-29
23:40:11.000000000 +0200
+++ gcc-3.3.1/gcc/config/i386/gas.h     2003-09-23 10:17:28.000000000 +0200
@@ -121,2 +121,2 @@
 /* Print opcodes the way that GAS expects them.  */
 #define GAS_MNEMONICS 1

+/* The comment-starter string as GAS expects it. */
+#undef ASM_COMMENT_START
+#define ASM_COMMENT_START "#"
+
 /* Output at beginning of assembler file.  */
 /* The .file command should always begin the output.  */
 #undef ASM_FILE_START

Regards
    -richy.
-- 
Dr. Richard B. Kreckel
Framatome ANP GmbH, NGLTS
<Richard.Kreckel@Framatome-ANP.COM>
Tel: (+49)9131/189-5275, Fax: (+49)9131/189-9908



More information about the Gcc-patches mailing list