public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Tim Schumacher <schumact@gmail.com>
To: Ian Lance Taylor <iant@google.com>
Cc: gcc-help@gcc.gnu.org
Subject: Re: Adding additional system paths to a custom GCC
Date: Fri, 16 Nov 2012 20:07:00 -0000	[thread overview]
Message-ID: <50A69CDC.8070005@gmail.com> (raw)
In-Reply-To: <CAKOQZ8x7XnW_BpNqa1yFf+UU56YiJfuhijZRWN1pS1tfF3nYKg@mail.gmail.com>

On 11/15/2012 10:36 PM, Ian Lance Taylor wrote:
> On Thu, Nov 15, 2012 at 8:14 PM, Tim Schumacher <schumact@gmail.com> 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


  reply	other threads:[~2012-11-16 20:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-16  4:14 Tim Schumacher
2012-11-16  5:36 ` Ian Lance Taylor
2012-11-16 20:07   ` Tim Schumacher [this message]
2012-11-16 21:33     ` Ian Lance Taylor
2012-11-16 22:08       ` Tim Schumacher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50A69CDC.8070005@gmail.com \
    --to=schumact@gmail.com \
    --cc=gcc-help@gcc.gnu.org \
    --cc=iant@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).