From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5087 invoked by alias); 14 Jun 2003 15:43:10 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 5004 invoked from network); 14 Jun 2003 15:43:09 -0000 Received: from unknown (HELO lacrosse.corp.redhat.com) (66.187.233.200) by sources.redhat.com with SMTP; 14 Jun 2003 15:43:09 -0000 Received: from free.redhat.lsd.ic.unicamp.br (aoliva.cipe.redhat.com [10.0.1.10]) by lacrosse.corp.redhat.com (8.11.6/8.9.3) with ESMTP id h5EFh1K11834; Sat, 14 Jun 2003 11:43:01 -0400 Received: from free.redhat.lsd.ic.unicamp.br (free.redhat.lsd.ic.unicamp.br [127.0.0.1]) by free.redhat.lsd.ic.unicamp.br (8.12.8/8.12.8) with ESMTP id h5EFgxt0005653; Sat, 14 Jun 2003 12:43:00 -0300 Received: (from aoliva@localhost) by free.redhat.lsd.ic.unicamp.br (8.12.8/8.12.8/Submit) id h5EFgx4J005649; Sat, 14 Jun 2003 12:42:59 -0300 To: "Maciej W. Rozycki" Cc: Bernd Jendrissek , Nathanael Nerode , gcc@gcc.gnu.org, gdb@sources.redhat.com, binutils@sources.redhat.com Subject: Re: Partial autoconf transition thoughts References: From: Alexandre Oliva Organization: GCC Team, Red Hat Date: Sat, 14 Jun 2003 15:43:00 -0000 In-Reply-To: Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2003-06/txt/msg00279.txt.bz2 On Jun 14, 2003, "Maciej W. Rozycki" 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