From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9282 invoked by alias); 16 Nov 2012 20:07:14 -0000 Received: (qmail 9201 invoked by uid 22791); 16 Nov 2012 20:07:03 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-oa0-f47.google.com (HELO mail-oa0-f47.google.com) (209.85.219.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 16 Nov 2012 20:06:56 +0000 Received: by mail-oa0-f47.google.com with SMTP id h1so3274017oag.20 for ; Fri, 16 Nov 2012 12:06:55 -0800 (PST) Received: by 10.60.5.232 with SMTP id v8mr4723521oev.26.1353096415140; Fri, 16 Nov 2012 12:06:55 -0800 (PST) Received: from [192.168.100.241] ([69.15.86.83]) by mx.google.com with ESMTPS id nd14sm2392879obb.14.2012.11.16.12.06.53 (version=SSLv3 cipher=OTHER); Fri, 16 Nov 2012 12:06:54 -0800 (PST) Message-ID: <50A69CDC.8070005@gmail.com> Date: Fri, 16 Nov 2012 20:07:00 -0000 From: Tim Schumacher User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:16.0) Gecko/20121026 Thunderbird/16.0.2 MIME-Version: 1.0 To: Ian Lance Taylor CC: gcc-help@gcc.gnu.org Subject: Re: Adding additional system paths to a custom GCC References: <50A5BDB1.3060003@gmail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: 2012-11/txt/msg00122.txt.bz2 On 11/15/2012 10:36 PM, Ian Lance Taylor wrote: > On Thu, Nov 15, 2012 at 8:14 PM, Tim Schumacher wrote: >> I am using Fedora linux. I would like to build a gcc-4.7.2 with additional >> "system paths". Meaning, I have an installation of the Boost C++ libraries >> installed at /usr/local/boost-1.52.0 and I would like to build a gcc that >> treats the boost include and lib dirs as system paths so that I don't have >> to specify -I and -L on all command lines compiling programs that use boost. >> I'm guessing there is some easy way to do this at configure time for GCC? I >> guess one way would be to re-build the boost libraries with the new compiler >> and specify the same --prefix that I used for the GCC tools. Any thoughts >> on this would be greatly appreciated! > You could use a shell script to pass the options you want. You could > set the environment variables CPLUS_INCLUDE_PATH and LIBRARY_PATH when > running the compiler. I don't think there is any simple way to add > directories when building GCC itself, though. > > Ian > OK, I can write a wrapper script that does what I want. I also had this pretty crazy idea. Would the following work? I build boost with the new gcc I just built, and the same --prefix I used for the gcc. Now all the includes and libraries (only static in my case) are placed where gcc can find them. Next ... drum roll ... I unpack all the static boost libraries and also the lidstdc++.a file and re-archive all the resulting .o files back into libstdc++.a. Now all the boost objects are magically available whenever I compile any c++ program. Is that crazy enough to work? Thanks again! Tim