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: Partial autoconf transition thoughts


On Jun 14, 2003, "Maciej W. Rozycki" <macro@ds2.pg.gda.pl> wrote:

>> build is irrelevant at install time.  If some package installs
>> binaries for the build machine, the package is broken.

>  It's not relevant then indeed, but once run it's relevant again as you --
> essentially when doing a compilation you run binaries/libraries for the
> build system

I.e., you're using the binaries/libraries previously built specifying
the build machine as the host.  Note that they may have very well been
cross-built.  At this point, you're just using the build machine as a
host for running a previously-built toolchain.  Why should it matter
that you cross-built them on say x86_64-*-linux-gnu? :-)

>  I mean binaries for a given target and libraries/headers for the very
> same host should be in the same directory tree.

This sounds good, but it would require us to introduce something like
--target-exec-prefix, and to revamp the build machinery to take
advantage of that.  Using --exec-prefix just won't cut it, since it's
host-specific.

> Native libraries (i.e. 
> for the build) supporting the target (where target != build) should be
> elsewhere

And they will: since they were built for a different host, they will
have been installed in a different exec-prefix.

>> Host libraries *have* to be in $exec_prefix, and $host_alias is
>> therefore redundant.

>  Host libraries must not be in $exec_prefix unless host == build.

You seem to be very confused about the meaning of --exec-prefix.
--exec-prefix specifies where machine-dependent files should be
installed.  By definition, build files are not installed.  Host and
Target files are.  Host files are machine-dependent, therefore they go
in exec-prefix.  Target files are host-independent, but they are
machine-dependent, so there's room for installing them in either
prefix or exec-prefix.

> There is a lot of confusion in understanding what
> is build, host and target

It shows :-)

> (e.g. rpm uses a --target option for what is named --host in
> autoconf)

Indeed.

> They do work and there are no conflicts. 

Can you install binaries for two different machines in the same tree?
E.g., have native tools for two different GNU/Linux architectures in a
single directory?

You'll see you actually need to specify different --exec-prefix in
order to achieve this.  You'll see that, even if you cross-build one
of these tools and build natively the other, the fact that they were
cross- or natively-built doesn't matter at all.  What matters is the
host they're supposed to run on, and the target.  --build only matters
at build time.  Different --host flags imply different --exec-prefix,
such that you can add $(bindir) = $(exec_prefix)/bin to host's PATH
and find only binaries for the host machine.  It's that simple.

-- 
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]