This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC 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: Preinstall thoughts


On Dec  4, 2002, Nathanael Nerode <neroden@twcny.rr.com> wrote:

> From the list archives way back in February, Alex seemed to indicate 
> that this might break something on some systems by leaving the 
> ${preinstall_prefix} path encoded into libjava.

> Is this correct?

Yup.

> If so, would it make any difference if I changed the line in the
> *preinstalled* foo.la to say "installed=no" ?

Nope.  It would only make it worse.  The pathname would probably still
be there, and you'd have to move the installed libraries from .../lib
to .../lib/.libs

Libtool really needs some way to be told that a -L flag is only to be
used within the build tree.

Other than that, you can't really build a library for it to be
installed somewhere, and then go and install it elsewhere.  There are
exceptions that can be made for DESTDIR installs, in which the final
install pathname of the library is a suffix of that of preinstall, but
you can't really build a library for /foo/bar and install it in /blah

> This preinstall scheme seems to have no problems with executables.

Probably just because we don't build libtool executables in gcc.
Those expect to find libraries in their final locations.

> (Although, actually, I'm unsure about 'xgcc' itself, since it does the
> odd thing of calling other programs; does it have hardcoded paths or 
> what?)

It is relocatable, i.e., it takes the pathname from argv[0] and makes
all other file searches relative to that.
  
> (Note: the original scheme involved building directly into the 
> 'preinstall' directory.  This is still a good idea.

It's actually the only way to get libtool stuff to work.  Since all of
binutils use libtool, if you --enable-shared and try to install in the
wrong location, you lose (perhaps silently, in that executables won't
fail to run, they'll just not be using the just-built libraries if
they find pre-installed libraries in the final install location).

> But it was objected 
> to by a lot of people who wanted to build in-source from the gcc 
> subdirectory and have the executable show up there, so I'm fiddling 
> with alternate schemes.

IMHO, If we want executables in the build tree, we just create wrapper
scripts in the build tree that run the real thing in the preinstall
location.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                 aoliva@{redhat.com, gcc.gnu.org}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist                Professional serial bug killer


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