libgcj/5789: boehm-gc won't build on irix - irix assembler chokes on #indent

Zack Weinberg zack@codesourcery.com
Mon Mar 4 08:26:00 GMT 2002


On Sat, Mar 02, 2002 at 09:53:54AM +0800, Billinghurst, David (CRTS) wrote:
> Version: 3.1 and 3.2
> System: mips-sgi-irix6.5
>> The problem
>> Error compiling boehm-gc/mips_sgi_mach_dep.S
>> as: Error: /usr/include/sys/regdef.h, line 17: Expected cpp-generated line number
> as INTERNAL ERROR: /usr/lib32/cmplrs/asm returned non-zero status 1
>>> Cause
>> The Irix header files
> /usr/include/sys/regdef.h
> /usr/include/sgidefs.h
> /usr/include/sys/asm.h
> contain #ident "$Revision: 3.52 $" lines.
>> The gcc cpp passess these through to the .s file, and the irix
> assembler chokes on them. 

Sounds like it's incorrect to emit #ident lines in CPP when we're
processing assembly language. That's not hard -- please try this
patch.
zw
===================================================================
Index: cppmain.c
--- cppmain.c	2002年01月03日 21:43:06	1.90
+++ cppmain.c	2002年03月04日 16:25:37
@@ -193,8 +193,13 @@ setup_callbacks ()
 if (! options->no_output)
 {
 cb->line_change = cb_line_change;
- cb->ident = cb_ident;
- cb->def_pragma = cb_def_pragma;
+ /* Don't emit #pragma or #ident directives if we are processing
+	 assembly language; the assembler may choke on them. */
+ if (options->lang != CLK_ASM)
+	{
+	 cb->ident = cb_ident;
+	 cb->def_pragma = cb_def_pragma;
+	}
 if (! options->no_line_commands)
 	cb->file_change = cb_file_change;
 }


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /