On Mon, Jul 20, 1998 at 08:40:59PM +0200, Ulf Carlsson wrote:
> Ralf has done some changes in the kernel tree for the egcs compiler (as
> far as I understand it). So, here's a fix for the crosscompiler, a
> modified specs file (/usr/local/lib/gcc-lib/mips-linux/18.104.22.168/specs).
> Thank Ralf, not me - he told me what to change.
Ok, now that Ulf already posted the patch to the spec file, let me explain
the problem. The usual C compilers for MIPS systems define a C preprocessor
macro based on the language of the input file. These macros have names
like LANGUAGE_C or LANGUAGE_ASSEMBLER. Usually several variations are
being defined with no, one or two heading underscores, sometimes even
trailing underscores. The Linux/MIPS compiler handled this different.
As the result the definitions which were expected by the kernel headers,
were not available.
While it would have been easy to fix the kernel to compile with either
gcc 2.7.2 or egcs I don't intend it makes much sense to carry this historic
garbage with us. So I just fixed it to compile with egcs.
Now brewing crosscompilers has historically proven to be a tough problem
for many user, so the hacked Spec file posted by Ulf can take away this
pain for crosscompiler users.