On Mon, Jun 24, 2002 at 05:54:28PM +0200, Maciej W. Rozycki wrote:
> > > MIPS64 lags behind a bit due to less interest/testing. Note that you
> > > should use "__ASSEMBLY__" to guard assembly-unsafe parts of headers.
> > _LANGUAGE_ASSEMBLY is the traditional MIPS cpp symbol to indicate assembler
> > source code.
> Well, but the rest of the kernel uses "__ASSEMBLY__", that's defined in
> the top-level Makefile. What's the point in being different?
> Also it doesn't seem to work for me -- the rules in specs look broken:
> $ mipsel-linux-gcc -E -dM -xassembler-with-cpp /dev/null | grep LANGUAGE
> #define __LANGUAGE_C 1
> #define _LANGUAGE_C 1
> #define LANGUAGE_C 1
> thus it cannot be considered reliable.
The machanism guesses the language based on the source file name extension:
[ralf@dea tmp]$ echo -n > c.c && mips-linux-gcc -E -dM -xassembler-with-cpp c.c
| grep LANG
#define __LANGUAGE_C 1
#define _LANGUAGE_C 1
#define LANGUAGE_C 1
[ralf@dea tmp]$ echo -n > c.S && mips-linux-gcc -E -dM c.S | grep LANG
#define LANGUAGE_ASSEMBLY 1
#define _LANGUAGE_ASSEMBLY 1
#define __LANGUAGE_ASSEMBLY 1
Buggy? Yes ...