delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/06/04/03:29:34

Date: Thu, 4 Jun 1998 10:29:01 +0200 (WET)
From: Andris Pavenis <pavenis AT lanet DOT lv>
To: Josh Rubin <jlrubin AT bway DOT net>
cc: djgpp AT delorie DOT com
Subject: Re: Questions about link libraries in 2.81
In-Reply-To: <3575c419.106170@news1.bway.net>
Message-ID: <Pine.A32.3.91.980604102158.52542B-100000@ieva05.lanet.lv>
MIME-Version: 1.0


On Wed, 3 Jun 1998, Josh Rubin wrote:

> Some mysteries about linking in version 2.81:
> 
> I switched to gcc version 2.81 and my makefiles stopped working
> because libgpp was no longer automatically included.
> The source file gxx.c shows that "-lgpp" is being added,
> but "gxx -v" shows that ld doesn't receive it.
> 
> Also, why is libgcc is being searched twice?
> 
> > whereis gxx.*
> 
> C:\DJ281\BIN\GXX.EXE
> C:\DJ281\GNU\GCC-2.81\BUILD.DJG\GXX.C
> C:\DJ281\GNU\GCC-2.81\CP\GXX.1
> C:\DJ281\GNU\GCC-2.81\CP\GXX.GPE
> C:\DJ281\MAN\MAN1\GXX.1
> C:\DJ281\SRC\UTILS\GXX.C  <-- I assume this compiles to gxx.exe
> 
> > grep "\-l" \dj281\src\utils\gxx.c
> 
> char lgpp[] = "-lgpp";
> char lstdc[] = "-lstdcx";
> char lm[] = "-lm";

This does NOT compile to gxx.exe. (You can see that such file is not in
gcc281s.zip). The correct file is C:\DJ281\GNU\GCC-2.81\BUILD.DJG\GXX.C
and it does not contain any references to C++ libraries. The C++ libraries
(currently only libstdcxx.a) are defined in GNU/GCC-2.81/CP/GXXSPEC.C

libg++ is no more officially maintained by FSF and users are asked to avoid
using it in new applications. Therefore I think it's better to avoid
requiring use of this library by default. If one really needs it he must
explicitly specify -lgpp.

> 
> > gxx -v init.o   (I added newlines)
> 
> Reading specs from c:/dj281/lib/gcc-lib/djgpp/2.81/specs
> gcc version 2.8.1
>  ld c:/dj281/lib/gcc-lib/djgpp/2.81/crtf.o
>     c:/dj281/lib/crt0.o
>     -Lc:/dj281/lib/gcc-lib/djgpp/2.81
>     -Lc:/dj281/lib init.o -lstdcxx -lm -lgcc -lc -lgcc -Tdjgpp.djl
> 
> Josh Rubin
> jlrubin AT bway DOT net
> 

- Raw text -


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