This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: Ignore --disable-static in libiberty


On Dec 20, 2004, "H. J. Lu" <hjl@lucon.org> wrote:

> On Mon, Dec 20, 2004 at 03:28:39PM -0200, Alexandre Oliva wrote:
>> On Dec 19, 2004, "H. J. Lu" <hjl@lucon.org> wrote:
>> 
>> > +# FIXME: libiberty doesn't support --disable-static
>> > +enable_static=yes
>> 
>> You shouldn't need this in general.  AM_DISABLE_SHARED should take
>> care of implicitly enabling static, unless --disable-static is
>> actually given in the command line.  If libiberty absolutely needs the
>> static libiberty.a, then I can see why you'd want this (but I'd at
>> least print a warning); otherwise, I'd just leave it alone, and if
>> someone configures with --disable-static, they get what they asked
>> for.

> Apparently, they do

> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19072

> and expect --disable-static to work.

I don't read that bug report that way.  The error they get is surely
unexpected, and I suspect it's either derived from abusing the libtool
interfaces (e.g., assuming there is going to be a .o file at certain
locations on all platforms, which is not something you can always
assume), or perhaps by missing the patch with the ChangeLog entry
below in libiberty's copy of libtool.  The answer depends on whether
the ar invocation that fails is issued by the libiberty Makefile or by
libtool, but this is not clear from the bug report.  In either case,
the libiberty invocation of AR is broken on at least some platforms
AFAICT, because you can't assume there's going to be a .o in .libs/
just because --enable-shared was given or implied, just like you can't
assume there's going to be a .o outside .libs just because
--enable-static was given or implied.  You have to handle it similarly
to the way libtool does (i.e., looking in the .lo file), including the
bit that was missing before dje's patch was installed.

2004-09-08  David Edelsohn  <edelsohn@gnu.org>

	* ltmain.sh: Use $pic_object as $non_pic_object if
	$non_pic_object=none.

-- 
Alexandre Oliva             http://www.ic.unicamp.br/~oliva/
Red Hat Compiler Engineer   aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist  oliva@{lsd.ic.unicamp.br, gnu.org}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]