Date: Fri, 17 Nov 2000 20:35:04 +0200 From: "Eli Zaretskii" Sender: halo1 AT zahav DOT net DOT il To: pjfarley AT banet DOT net Message-Id: <1190-Fri17Nov2000203503+0200-eliz@is.elta.co.il> X-Mailer: Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.6 CC: djgpp-workers AT delorie DOT com In-reply-to: <5.0.1.4.0.20001117121959.03459ad0@pop5.banet.net> (pjfarley AT banet DOT net) Subject: Re: Help: Isn't libdbg the debugging version of libc? 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> 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 > Date: Fri, 17 Nov 2000 12:52:17 -0500 > From: "Peter J. Farley III" > > >It would be nice if a way could be found to work with both old and > new > >GCC versions. Please see if you can make a change that works either > >way. I think the library build procedure does something like that. > > I will try that later, if I can find the time. I haven't had 2.8.1 > installed for a long time now, so I'd have to re-install it to > test. No, I didn't mean for you to go to such great lengths. It suffices to make a change that will work no matter where's libgcc.a located in the DJGPP tree. > -LINK = ld $(LDFLAGS) $^ -o $@ ${LIB}/libgcc.a -T ${TOP}/../../lib/djgpp.djl > +LINK = ld $(LDFLAGS) $^ -o $@ ${LIB}/gcc-lib/djgpp/2.952/libgcc.a -T ${TOP}/../../lib/djgpp.djl Hmmm... this is not a very good idea: it will break if you use any other version of GCC but 2.95.2. This tricky problem is solved in the library build procedure (see src/makefile.inc) as follows: ifeq ($(LIBGCCA),) LIBGCCA := $(shell $(CROSS_GCC) -print-file-name=libgcc.a) LIBGCCA := $(subst \,/,$(LIBGCCA)) export LIBGCCA endif The wonderful switch -print-file-name causes GCC to print the full path to any of the files that are part of GCC installation and its standard search paths. The rest of the build then uses $(LIBGCCA) instead of the libgcc.a's path. Note that the above works both on Unix and on DOS (assuming you have GNU Make). > gcc ... -c spawnvp.c > Load error: no DOS memory > make.exe[3]: *** [spawnvp.o] Error 1 > make.exe[2]: *** [all_subs] Error 2 > make.exe[1]: *** [all] Error 2 > make.exe: *** [subs] Error 2 > > Just restarting "make" gets around this. Maybe this is a memory leak > in makemake? No, it's a resource leak in Windows (which is where I understand you have run this). See section 3.3 of the FAQ.