This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Partial autoconf transition thoughts
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: "Maciej W. Rozycki" <macro at ds2 dot pg dot gda dot pl>
- Cc: Bernd Jendrissek <berndfoobar at users dot sourceforge dot net>, Nathanael Nerode <neroden at twcny dot rr dot com>, gcc at gcc dot gnu dot org, gdb at sources dot redhat dot com, binutils at sources dot redhat dot com
- Date: 13 Jun 2003 17:51:54 -0300
- Subject: Re: Partial autoconf transition thoughts
- Organization: GCC Team, Red Hat
- References: <Pine.GSO.3.96.1030613215100.20506B-100000@delta.ds2.pg.gda.pl>
On Jun 13, 2003, "Maciej W. Rozycki" <macro@ds2.pg.gda.pl> wrote:
> On 13 Jun 2003, Alexandre Oliva wrote:
>> > OK, the first is a native one, so it goes to $exec_prefix, say:
>> > /usr/lib. The second one is a cross one, so it goes to
>> > $exec_prefix/$target_alias, say: /usr/mipsel-linux/lib. Finally, the last
>> > one is a cross one, too, so it goes to $exec_prefix/$target_alias, say:
>> > /usr/mipsel-linux/lib -- oops! -- the second one just got overwritten...
>>
>> Two crosses to the same target, and you don't want one to overwrite
> ... from different hosts; only the build is the same.
If it's for different hosts, then you also clobbered all binaries that
you'd installed in the same exec_prefix. Which is why in this case
you'd be better off using per-host exec_prefixes. That's exactly the
purpose behind the distinction between prefix and exec_prefix. Files
in prefix are host-independent, whereas those in exec_prefix are
host-specific.
> It looks sane to me, but I think both host-x-target (or really
> build-x-target; what about build-x-host-x-target? ;-) )
build is irrelevant at install time. If some package installs
binaries for the build machine, the package is broken.
> libraries and such binaries should both be under
> $exec_prefix/x-$target_alias for consistency then.
Nope. $exec_prefix/x-$target_alias would hold libraries containing
code that runs on the host (so exec_prefix, not host-independent
prefix), used to manipulate binaries in the target's format
(e.g. host-x-target libbfd). Compare this with binaries and libraries
in the target's format, that we currently install in
$exec_prefix/$target_alias, even though they aren't host-specific in
any way, and therefore they could legitimately be installed in
$prefix/$target_alias. The fact that they were build on a certain
host should be irrelevant.
> And host libraries (I suppose you mean that -- few libraries, such
> as bfd, actually recognize the existence of a target; I understand the
> naming can be confusing) may go to $prefix/$host_alias
Host libraries *have* to be in $exec_prefix, and $host_alias is
therefore redundant.
> (where $prefix may sometimes effectively be equal to $exec_prefix)
If you use the same exec_prefix for different hosts, you're already
toast. Get used to --exec-prefix=${prefix}/H-${host_alias} before
it's too late :-)
--
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