Hi everyone: I have a problem with the C preprocessor. I write a assemble code "setjmp.S". When I built it with gcc which I have ported with the following command:
/usr/local/cross/rice-elf/libexec/gcc/rice-elf/4.3.0/cc1 -E -lang-asm -quiet -v -DHAVE_RENAME -DMISSING_SYSCALL_NAMES -isystem /home/daniel.tian/gcc_rice_dev/rice-binutils/build-newlib/rice-elf/newlib/targ-include -isystem /home/daniel.tian/gcc_rice_dev/rice-binutils/newlib-1.16.0/newlib/libc/include ../../../../../../newlib-1.16.0/newlib/libc/machine/rice/setjmp.S -fno-builtin -O2 -fno-directives-only -o /tmp/cctxPKBe.s it generate the comment in cctxPKBe.s like this: # 1 "../../../../../../newlib-1.16.0/newlib/libc/machine/rice/setjmp.S" # 1 "<built-in>" # 1 "<command-line>" # 1 "../../../../../../newlib-1.16.0/newlib/libc/machine/rice/setjmp.S" # 10 "../../../../../../newlib-1.16.0/newlib/libc/machine/rice/setjmp.S" Here is a problem that '#' is a symbol used in my chip assembler as prefix before immediate. Like: MOV R0 #0x123. and the comment symbol is exactly same as C++: "//". I think the C preprocessor think the '#' is the beginning of comment line. So my assembler shows the error at the beginning of the file. Is there any solution to solve this? I know the code in function "print_line" (c-ppoutput.c) generated the symbol "#". But I don't think to modify the code at this place is a good idea. Does any body also meet this problem? Or I have to edit the gas source code. Thanks for your guys help. daniel