delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1998/03/18/17:06:05

Message-ID: <35104489.7FADEB2@gmx.net>
Date: Wed, 18 Mar 1998 23:02:49 +0100
From: Robert Hoehne <robert DOT hoehne AT gmx DOT net>
Organization: none provided
MIME-Version: 1.0
To: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
CC: DJ Delorie <dj AT delorie DOT com>, djgpp-workers AT delorie DOT com
Subject: Re: Bugs in 2.8.0?
References: <Pine DOT SUN DOT 3 DOT 91 DOT 980318160638 DOT 21675F-100000 AT is>

Eli Zaretskii wrote :
> 
> Why do we need to always link in crtf.o?  Isn't it *only* for C++
> programs?
This is normally only for C++ programs. But since the call to
__register_frame_info() does nothing else then setting up
some variables, I think we can live with it (and linking of course
some additional functions).

> (Can we know, on the lib/specs level, that this is a C++
> program?)

In my opion this is not possible. How should we know this if
we do

gcc -o foo.exe foo.o

> Also, don't we need crt0.o to be the first one of the two?

The order where crtf is linked in is not important. I placed
it simply there because it came first in my mind and since
it does nothing special things it can be come also before
crt0.o.

> 
> > And finally we need also to modify the DJGPP linker script.
> 
> This means that, in general, the G++ distribution would need to come
> with a replacement for the linker script, at least until DJGPP 2.02 is

Yes.

> absolutely have to.  Since DJGPP is no longer released together with
> GCC and Binutils, the list of possible incompatibilities will quickly
> overwhelm us with subtle bugs and HELP!!! messages.

That's exactly the problem. DJGPP itself does not come with gcc and
binutils but it comes with the specs file and the linker script.

This was one reason why asked in the past about including the specs
file in the gcc distriution, but there were some opinions against this.

> Btw, what's the order in which gcc 2.8. looks for the linker scripts
> and specs files?  Does it use the first one found or all of them?  If

The first one.

> the former, we might have another alternative: to put the new linker
> script and specs file under lib/gcc-lib/djgpp/2.80/ so that it would
> be found first (assuming that GCC looks there before lib/ itself).

By default gcc looks first in lib/gcc-lib/djgpp/2.80/ but since we
set in djgpp.env the LIBRARY_PATH variable, gcc looks now first in
the directories given there :-(

> So why not add crtend.o right now?  What prevents us from doing a
> complete job?

Because I hadn't the time to think about this in detail too in addition
to the startup file.

Robert
-- 
******************************************************
* email:   Robert Hoehne <robert DOT hoehne AT gmx DOT net>     *
* Post:    Am Berg 3, D-09573 Dittmannsdorf, Germany *
* WWW:     http://www.tu-chemnitz.de/~sho/rho        *
******************************************************

- Raw text -


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