Mail Archives: djgpp/2000/02/28/04:20:49
On Sun, 27 Feb 2000, Richard Ellingworth wrote:
> However, I got around this by editing the file makefile so that the rule :
>
> $(OUTPUTDIR)/%.o: %.S
> gcc -c $(GCCOPTIONS) $(TOPTION) $(PREOPTION) -o $@ $<
>
> was changed to :
>
> $(OUTPUTDIR)/%.o: %.s
> gcc -c $(GCCOPTIONS) $(TOPTION) $(PREOPTION) -o $@ $<
>
> I think there was a problem with the case of the filenames. Windows 95
> sometimes generates filenames which are uppercase, sometimes lowercase
> and I have had problems with this before.
>
> Anyway, now I get another error :
>
> wrap_g.s(35) Error: Error: invalid character '_' in opcode
>
> The line in question in wrap_g.s is here :
>
> .text
> #define IRQWRAP(x) ; \
> _IRQWrap##x: ; \
> pushw %ds /* save registers */ ; \
> pushw %es ; \
> pushw %fs ; \
> pushw %gs ; \
>
> It is the line that starts _IRQWrap. I don't know why the assember is trying
> to interpret this as an opcode instead of a label
Because you made the wrong change to solve the original problem: you
should have left Makefile alone, and instead rename the file to have
the capital .S extension. A .s file is taken by GCC as raw assembly
that doesn't require preprocessing, and the assembler chokes on
preprocessing symbols.
This is explained in the DJGPP FAQ list (section 8.5).
- Raw text -