delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/02/28/04:20:49

Date: Mon, 28 Feb 2000 08:35:52 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Richard Ellingworth <ricell AT globalnet DOT co DOT uk>
cc: djgpp AT delorie DOT com
Subject: Re: Problems installing PMCOM library.
In-Reply-To: <89bgnq$og8$1@gxsn.com>
Message-ID: <Pine.SUN.3.91.1000228083527.8833E-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: dj-admin AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019