From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14373 invoked by alias); 26 Jan 2011 19:43:32 -0000 Received: (qmail 14364 invoked by uid 22791); 26 Jan 2011 19:43:31 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.44.51) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 26 Jan 2011 19:43:24 +0000 Received: from wpaz29.hot.corp.google.com (wpaz29.hot.corp.google.com [172.24.198.93]) by smtp-out.google.com with ESMTP id p0QJhNJb020236 for ; Wed, 26 Jan 2011 11:43:23 -0800 Received: from pzk27 (pzk27.prod.google.com [10.243.19.155]) by wpaz29.hot.corp.google.com with ESMTP id p0QJhLw0013213 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NOT) for ; Wed, 26 Jan 2011 11:43:21 -0800 Received: by pzk27 with SMTP id 27so153580pzk.14 for ; Wed, 26 Jan 2011 11:43:21 -0800 (PST) Received: by 10.142.213.18 with SMTP id l18mr812463wfg.424.1296071000916; Wed, 26 Jan 2011 11:43:20 -0800 (PST) Received: from coign.google.com (dhcp-172-22-124-221.mtv.corp.google.com [172.22.124.221]) by mx.google.com with ESMTPS id q13sm20648563wfc.17.2011.01.26.11.43.19 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 26 Jan 2011 11:43:20 -0800 (PST) From: Ian Lance Taylor To: Kyle Girard Cc: gcc-help@gcc.gnu.org Subject: Re: Building Relocatable gcc References: <1296055661.3050.2178.camel@Tak> <1296069846.3050.2187.camel@Tak> Date: Wed, 26 Jan 2011 19:43:00 -0000 In-Reply-To: <1296069846.3050.2187.camel@Tak> (Kyle Girard's message of "Wed, 26 Jan 2011 14:24:06 -0500") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-System-Of-Record: true X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2011-01/txt/msg00384.txt.bz2 Kyle Girard writes: >> What do you mean by relocatable? >> >> If you use just the --prefix=DIR option, and run "make" and "make >> install", then you can move the directory DIR wherever you like and >> everything should continue to work. > > By relocatable I mean I guess self contained.. I can use --prefix and > install the compiler to DIR, yes, but after I rename DIR to DIR2 doesn't > gcc continue to look for it's headers in DIR? No. gcc uses relative paths to find its own internal headers. > If I wanted to zip up the > gcc in DIR and put it on another machine that doesn't have gcc installed > on it and doesn't the directory DIR wont it still be looking for headers > in DIR? No. > I'd like to make version of gcc that I can zip up and drop on to a > machine in a directory of my choice and instantly have a version of gcc > that I can compile things with. Sort of like the way mingw is done but > for linux. That should happen more or less automatically if you follow the simple procedure I described above. Ian