[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: UnixWare -lc fixes

From: Tim Rice
Subject: Re: UnixWare -lc fixes
Date: Tue, 18 Oct 2005 09:43:52 -0700 (PDT)

On Tue, 18 Oct 2005, Albert Chin wrote:

> On Mon, Oct 17, 2005 at 09:53:29PM -0700, Tim Rice wrote:
> > After looking over some stuff in 
> > that related
> > to libtool and some off list emails with Kean Johnston (the author of
> > the gcc patch) and Ralf Wildenhues, I realize my UnixWare patch
> > was incomplete. On UnixWare and OpenServer 5&6 we never want -lc on the
> > command line. cc / CC takes care of that for us (and always gets it right).
> > Setting build_libtool_need_lc=no takes care of most of it but that
> > doesn't account for Makefiles adding -lc. Like this snip from
> > gettext-0.14.5/gettext-runtime/intl/
> > ......
> > $(OBJECTS)
> >         $(LIBTOOL) --mode=link \
> >           $(CC) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) $(LDFLAGS) -o $@ \
> >           $(OBJECTS) @LTLIBICONV@ @INTL_MACOSX_LIBS@ $(LIBS) -lc \
> >           -version-info $(LTV_CURRENT):$(LTV_REVISION):$(LTV_AGE) \
> >           -rpath $(libdir) \
> >           -no-undefined
> > ......
> > 
> > I had been patching Makefiles (post configure) in packages to strip out -lc.
> > Now I realize libtool can do that for me.
> > 
> > I've attached patches to branch-1-5 and HEAD.
I forgot to mention, credit for these patches should relly go to
Kean Johnston.
> Ick. Packages like gettext need to be fixed, not libtool. Garbage in =
> Garbage out.

This has obviously come up before. There is already code there for
openbsd/freebsd and others. I'm just adding a couple of platforms.
While it would be nice if all the "broken" packages out there were fixed, 
it probably won't happen without libtool issuing a big warning message
when it is invoked with "libtool ...some_options -lc ...some_mode_options".

And now a question. Looking at libltdl/config/ltmain.m4sh, the code
in the area I patched (about line 2600) seems to be duplicated down
at about line 4500. I'm trying to understand why the netbsd and openbsd
cases are there. I would expect that they have build_libtool_need_lc=no
and those 2 cases would to nothing. Or is that just cruft?

Tim Rice                                Multitalents    (707) 887-1469

reply via email to

[Prev in Thread] Current Thread [Next in Thread]