public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Where should libiberty.a be installed?
@ 2008-06-02 19:30 IainS
  2008-06-03  0:42 ` Segher Boessenkool
  0 siblings, 1 reply; 8+ messages in thread
From: IainS @ 2008-06-02 19:30 UTC (permalink / raw)
  To: gcc-help

Hi,

when building with the following config (suspected relevant lines  
marked with <<<<<****):

--prefix=/usr  <<<<<****
--build=powerpc-apple-darwin8
--enable-languages=c,c++,objc,obj-c++,fortran
--with-slibdir='\$\${prefix}/lib'  <<<<<****
--with-gmp=/path/2/gmp
--with-mpfr=/path/2/mfpr
  --enable-threads
--disable-nls
--enable-version-specific-runtime-libs   <<<<<****
--mandir='\$\${prefix}/share/man'
--infodir='\$\${prefix}/share/info'
--program-suffix=-4.3.1
--enable-checking=yes
--enable-serial-configure
--host=powerpc-apple-darwin8
--target=powerpc-apple-darwin8
--enable-werror
--enable-bootstrap

libiberty.a ends up in /usr/lib (and the multilib in /usr/lib/ppc64)

[[ with the cross-target version it ends up in /usr/target-apple- 
darwin/lib/ (and m64 in usr/target-apple-darwin/lib/x86_64/ )]]

This appears to be ignoring the "--enable-version-specific-runtime- 
libs" flags (which is honored AFAICT by all the other libs).

(the example is from 4.3.1 apple-darwin8
but this applies to every build I've tried so far => 4.2.1, 4.2.4,  
4.3.1-branch and 4.4.0-trunk;
i686-apple-darwin8 and
powerpc-apple-darwin9
)

Is this an installation bug ?
or is there some reason that libiberty.a should be treated  
differently from, say, libssp.a?

ttfn,
Iain

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Where should libiberty.a be installed?
  2008-06-02 19:30 Where should libiberty.a be installed? IainS
@ 2008-06-03  0:42 ` Segher Boessenkool
  2008-06-03  6:55   ` IainS
  0 siblings, 1 reply; 8+ messages in thread
From: Segher Boessenkool @ 2008-06-03  0:42 UTC (permalink / raw)
  To: IainS; +Cc: gcc-help

> libiberty.a ends up in /usr/lib (and the multilib in /usr/lib/ppc64)

> This appears to be ignoring the 
> "--enable-version-specific-runtime-libs" flags (which is honored 
> AFAICT by all the other libs).

libiberty is not a runtime library.

> Is this an installation bug ?

I don't think so.

> or is there some reason that libiberty.a should be treated differently 
> from, say, libssp.a?

libssp _is_ a runtime library.

Runtime libraries are those that programs compiled with GCC are
linked against.  Libiberty is used for compiling GCC itself.
I have no idea why it is installed by default.


Segher

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Where should libiberty.a be installed?
  2008-06-03  0:42 ` Segher Boessenkool
@ 2008-06-03  6:55   ` IainS
  2008-06-03 14:30     ` Segher Boessenkool
  0 siblings, 1 reply; 8+ messages in thread
From: IainS @ 2008-06-03  6:55 UTC (permalink / raw)
  To: Segher Boessenkool; +Cc: gcc-help


On 3 Jun 2008, at 01:42, Segher Boessenkool wrote:

>> libiberty.a ends up in /usr/lib (and the multilib in /usr/lib/ppc64)
>
>> This appears to be ignoring the "--enable-version-specific-runtime- 
>> libs" flags (which is honored AFAICT by all the other libs).
>
> libiberty is not a runtime library.

I appreciate this, however, libiberty *is* installed into the user's  
DESTDIR.

This means that if you are using the "--enable-version-specific- 
runtime-libs" to allow several versions of GCC to co-exist in the  
same tree,
then the version of libiberty that is installed depends on what you  
built/installed last.  AFAICT there is no way to tell which version  
that is.

Does that mean that the interface to libiberty is fixed for "all  
time" and that it really doesn't matter which version you link?

thanks,
Iain

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Where should libiberty.a be installed?
  2008-06-03  6:55   ` IainS
@ 2008-06-03 14:30     ` Segher Boessenkool
  2008-06-03 15:25       ` IainS
  0 siblings, 1 reply; 8+ messages in thread
From: Segher Boessenkool @ 2008-06-03 14:30 UTC (permalink / raw)
  To: IainS; +Cc: gcc-help

>>> libiberty.a ends up in /usr/lib (and the multilib in /usr/lib/ppc64)
>>
>>> This appears to be ignoring the 
>>> "--enable-version-specific-runtime-libs" flags (which is honored 
>>> AFAICT by all the other libs).
>>
>> libiberty is not a runtime library.
>
> I appreciate this, however, libiberty *is* installed into the user's 
> DESTDIR.

Yes.  However, it (the installed libiberty.a) isn't used by any of the
installed GCC binaries, so it doesn't cause problems there.

OTOH, like I said, why is it installed at all by default?  Its header
files are not, so this would seem pretty useless.


Segher

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Where should libiberty.a be installed?
  2008-06-03 14:30     ` Segher Boessenkool
@ 2008-06-03 15:25       ` IainS
  2008-06-03 15:53         ` Brian Dessent
  0 siblings, 1 reply; 8+ messages in thread
From: IainS @ 2008-06-03 15:25 UTC (permalink / raw)
  To: Segher Boessenkool; +Cc: gcc-help


On 3 Jun 2008, at 15:30, Segher Boessenkool wrote:

>>>> libiberty.a ends up in /usr/lib (and the multilib in /usr/lib/ 
>>>> ppc64)
>>>
>>>> This appears to be ignoring the "--enable-version-specific- 
>>>> runtime-libs" flags (which is honored AFAICT by all the other  
>>>> libs).
>>>
>>> libiberty is not a runtime library.
>>
>> I appreciate this, however, libiberty *is* installed into the  
>> user's DESTDIR.
>
> Yes.  However, it (the installed libiberty.a) isn't used by any of the
> installed GCC binaries, so it doesn't cause problems there.
>
> OTOH, like I said, why is it installed at all by default?  Its header
> files are not, so this would seem pretty useless.

agreed,  either both lib/header or neither...

Note that (gcc) "make install-html" installs "libiberty.html" into  
the doc dirs which says (amongst other things):

-- that the library is used by "various GNU programs"

--  " Passing --enable-install-libiberty to the configure script when  
building libiberty causes the header files and archive library to be  
installed when make install is run. 
This option also takes an (optional) argument to specify the  
installation location, in the same manner as --prefix."

I've not used that configure argument to gcc [ it's not listed by  
(gcc) configure --help  or on  http://gcc.gnu.org/install/ 
configure.html  ] so presumably the html refers only to building the  
library as a separate project.

I'd add my £0.02 - and say if it's installed at all - it would make  
sense for it to be installed along with the other gcc-version- 
specific .a files in lib/gcc/X.Y.Z
That way the user can keep track of which version is being linked.

Iain

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Where should libiberty.a be installed?
  2008-06-03 15:25       ` IainS
@ 2008-06-03 15:53         ` Brian Dessent
  2008-06-03 16:22           ` IainS
  2008-06-03 17:19           ` Where should libiberty.a be installed? (addendum) IainS
  0 siblings, 2 replies; 8+ messages in thread
From: Brian Dessent @ 2008-06-03 15:53 UTC (permalink / raw)
  To: IainS; +Cc: Segher Boessenkool, gcc-help

IainS wrote:

> Note that (gcc) "make install-html" installs "libiberty.html" into
> the doc dirs which says (amongst other things):
> 
> -- that the library is used by "various GNU programs"
> 
> --  " Passing --enable-install-libiberty to the configure script when
> building libiberty causes the header files and archive library to be
> installed when make install is run.
> This option also takes an (optional) argument to specify the
> installation location, in the same manner as --prefix."

What this really means is whether to install the headers.  The archive
lib is always installed (incorrectly, as this thread surmises.)

> I've not used that configure argument to gcc [ it's not listed by
> (gcc) configure --help  or on  http://gcc.gnu.org/install/
> configure.html  ] so presumably the html refers only to building the
> library as a separate project.

The output of the toplevel configure --help only lists options
implemented at the toplevel, which is only a fraction of available
options.  Just because it's not listed there does not mean anything,
because there are countless sub-configures.  It is listed if you run
libiberty/configure --help, and it works just fine if used to configure
gcc -- it does not apply just when building the library as a separate
project.  But as above, what it really determines is whether the
libiberty headers should be installed or not, and the default is no.

> That way the user can keep track of which version is being linked.

But you're missing the point: this copy that is installed is the
host-libiberty not the target-libiberty.  No code that gcc creates will
use this library, it is totally extraneous and you can just delete it if
it bothers you.  I think it's just an artifact of the fact that gcc
lives in a combined tree of many other packages, and the toplevel is
shared between all of them.

Brian

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Where should libiberty.a be installed?
  2008-06-03 15:53         ` Brian Dessent
@ 2008-06-03 16:22           ` IainS
  2008-06-03 17:19           ` Where should libiberty.a be installed? (addendum) IainS
  1 sibling, 0 replies; 8+ messages in thread
From: IainS @ 2008-06-03 16:22 UTC (permalink / raw)
  To: gcc-help


On 3 Jun 2008, at 16:53, Brian Dessent wrote:

> IainS wrote:
>
>> That way the user can keep track of which version is being linked.
>
> But you're missing the point: this copy that is installed is the
> host-libiberty not the target-libiberty.  No code that gcc creates  
> will
> use this library, it is totally extraneous and you can just delete  
> it if
> it bothers you.  I think it's just an artifact of the fact that gcc
> lives in a combined tree of many other packages, and the toplevel is
> shared between all of them.


hm.
when building the native tools (host=build=target) it's sometimes  
difficult to tell things apart

I have perhaps, been misled by the following;
I'm also building cross-tools:

The cross-build [make install] installs a *target* libiberty in /usr/ 
target-vendor-os/lib

So I was assuming that the libiberty installed in /usr/lib was (by  
symmetry) the "target" libiberty for the target=host case.

I don't mind that much - whether I delete or move the library ;
It seems we all agree it doesn't belong where it's being put.

perhaps the real question is
"should gcc install libiberty?"

Iain

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Where should libiberty.a be installed? (addendum)
  2008-06-03 15:53         ` Brian Dessent
  2008-06-03 16:22           ` IainS
@ 2008-06-03 17:19           ` IainS
  1 sibling, 0 replies; 8+ messages in thread
From: IainS @ 2008-06-03 17:19 UTC (permalink / raw)
  To: gcc-help


On 3 Jun 2008, at 16:53, Brian Dessent wrote:

> IainS wrote:
>
>> That way the user can keep track of which version is being linked.
>
> But you're missing the point: this copy that is installed is the
> host-libiberty not the target-libiberty.

FWIW: (on 4.2.4 - which I had to hand ...)
[ host=build=target ]

the following instructions result in ==>

make install:
	usr/lib/libiberty.a
	usr/lib/ppc64/libiberty.a

make install-gcc:
	--

make install-host:
	usr/libiberty.a

make install-target:
	usr/lib/libiberty.a
	usr/lib/ppc64/libiberty.a

make install-html:
	usr/share/doc/libiberty.html


So ... it seems that the build process treats libiberty as both a  
target multilib and a host lib.

Iain

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2008-06-03 17:19 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-02 19:30 Where should libiberty.a be installed? IainS
2008-06-03  0:42 ` Segher Boessenkool
2008-06-03  6:55   ` IainS
2008-06-03 14:30     ` Segher Boessenkool
2008-06-03 15:25       ` IainS
2008-06-03 15:53         ` Brian Dessent
2008-06-03 16:22           ` IainS
2008-06-03 17:19           ` Where should libiberty.a be installed? (addendum) IainS

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).