Re: Lots of packages with unneeded dependencies.
On Sun, 25 Oct 1998, [iso-8859-1] Nicolás Lichtmaier wrote:
> > I'd be surprised if any serios C++ program worked without libstdc++!
> Surprise! lftp is a very nice OO ftp client, and it works. And I have done
> what I stated in the previous email for a long time!
lftp has source code that make almost no use of any C++ features.
> > > 1) Compile with -fno-rtti -fno-exceptions, this will also save some space.
> > Some programs use rtti and some programs use exceptions. The space savings
> > from RTTI is trivial enough that I don't worry however exceptions can have
> > a huge overhead sometimes. The newest egcs seems substantially better
> > however to the point that I'm not concerned :>
> Yep. But with those options you gen smaller code. Period.
Smaller buy maybe 1% or less these days. Certainly not a big deal.
> > > 2) In debian/rules, just after `make' remove the binaries built, and
> > > run `make CPP=cc'.
> > >
> > > Example from lftp's debian/rules:
> > >
> > > make CXXFLAGS="-O -Wall -fno-exceptions -fno-rtti"
> > > rm src/lftp src/ftpget
> > > make -C src CXX=gcc CXXFLAGS="-O -Wall -fno-exceptions -fno-rtti"
> > ^^^^^^^^^
> > Don't you dare! I can't imagine that actually -works-! The Debian C++
> > compiler is g++ (or c++ or eg++) which happens to map to EGCS 1.1. The
> > Debian C compiler is gcc which is GCC 2.7 compiling c++ binaries with the
> > old gcc should be advoided as much as possible, especially since the old
> > compiler cannot understand the include files in libstdc++2.8/2.9 and
> > cannot generate compatible binaries.
> Read it again. I'm forcing make to only *relink* the binaries. I specify
> gcc because I like lftp to be linked against the normal C libraries only.
GNU compilers link with a private static libary 'libgcc.a' by using the
wrong linker you will link with the wrong library for the compiler and
strange things may happen - I certainly would not do it. (Incidently
libgcc.a has some of the exception handling code in it)
If you want to do that then you should set LDFLAGS as,
And use g++