Message-Id: <5.0.1.4.0.20001118181723.00a5b780@pop5.banet.net> X-Sender: usbanet DOT farley3 AT pop5 DOT banet DOT net (Unverified) X-Mailer: QUALCOMM Windows Eudora Version 5.0.1 Date: Sat, 18 Nov 2000 18:27:46 -0500 To: djgpp-workers AT delorie DOT com From: "Peter J. Farley III" Subject: Re: Help: Isn't libdbg the debugging version of libc? Cc: Richard Dawe In-Reply-To: <3A158878.2C59BE68@bigfoot.com> References: <5 DOT 0 DOT 1 DOT 4 DOT 0 DOT 20001116230739 DOT 00a55af0 AT pop5 DOT banet DOT net> <5 DOT 0 DOT 1 DOT 4 DOT 0 DOT 20001116230739 DOT 00a55af0 AT pop5 DOT banet DOT net> <5 DOT 0 DOT 1 DOT 4 DOT 0 DOT 20001117121959 DOT 03459ad0 AT pop5 DOT banet DOT net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk At 07:35 PM 11/17/00 +0000, Richard Dawe wrote: >This is not very pretty, but I could not find any way of making the >code compiled without any warnings/errors with binutils 2.8.1 and >2.95.2 from the same sources. > >I'm not suggesting this be incorporated into the DJGPP build, since it >would add a dependency on sed, but it's a solution nonetheless. Per Eli's suggestion, I have figured out how to use GNU make's builtin functions to extract the GAS version information. Here is a sample makefile demonstrating the technique: ---------Start makefile----------------------------- AS := $(DJDIR)/bin/as GAS_VERSION := $(subst ., ,$(shell $(AS) --version)) GAS_MAJOR := $(word 3,$(GAS_VERSION)) GAS_MINOR := $(word 4,$(GAS_VERSION)) GAS_MINORMINOR := $(word 5,$(GAS_VERSION)) # Defaults for version numbers ifeq ($(GAS_MAJOR),) GAS_MAJOR := 0 endif ifeq ($(GAS_MINOR),) GAS_MINOR := 0 endif ifeq ($(GAS_MINORMINOR),) GAS_MINORMINOR := 0 endif # Pass defines as compiler switches CFLAGS += -DGAS_MAJOR=$(GAS_MAJOR) CFLAGS += -DGAS_MINOR=$(GAS_MINOR) CFLAGS += -DGAS_MINORMINOR=$(GAS_MINORMINOR) all: @echo GAS_MAJOR = $(GAS_MAJOR) @echo GAS_MINOR = $(GAS_MINOR) @echo GAS_MINORMINOR = $(GAS_MINORMINOR) @echo CFLAGS = $(CFLAGS) ---------End makefile----------------------------- And here is a sample output for gcc 2.9.5 (also tested with gcc 2.8.1, works there also): O:\src>make GAS_MAJOR = 2 GAS_MINOR = 9 GAS_MINORMINOR = 5 CFLAGS = -DGAS_MAJOR=2 -DGAS_MINOR=9 -DGAS_MINORMINOR=5 Patches for "makefile.inc", "exceptn.S" and "dbgcom.c" to make and use these defines will follow, as soon as I get them working. HTH. --------------------------------------------------------- Peter J. Farley III (pjfarley AT dorsai DOT org OR pjfarley AT banet DOT net)