This is the mail archive of the
mailing list for the Archer project.
Re: Building a custom GCC
- From: Tom Tromey <tromey at redhat dot com>
- To: Phil Muldoon <pmuldoon at redhat dot com>
- Cc: Project Archer <archer at sourceware dot org>
- Date: Wed, 13 Aug 2008 14:12:32 -0600
- Subject: Re: Building a custom GCC
- References: <48A30791.email@example.com>
- Reply-to: Tom Tromey <tromey at redhat dot com>
>>>>> "Phil" == Phil Muldoon <firstname.lastname@example.org> writes:
Phil> So I need to get GCC source, build, install (in a
Phil> buildroot), and build my inferiors against -O0 GCC libraries. I know
Phil> there are some GCC folks around here, and they may have a script or a
Phil> baked set of instructions that would make this easier. Anyone?
There are reasonably extensive instructions here:
What I recommend is making a new directory to use for the build tree
(gcc does not support "./configure"), another new one to use with
--prefix, and, for your purposes, configuring with --disable-bootstrap
(this will save a lot of time and you don't need a bootstrapped
compiler). You may also want --enable-languages=c,c++ -- that saves a
lot of time by not building libgcj.
For flags, I see I usually use: CFLAGS=-g CPPFLAGS=-g CXXFLAGS=-g
However, you also want to set CFLAGS_FOR_TARGET and CXXFLAGS_FOR_TARGET.
After building, 'make install' and set your PATH and LD_LIBRARY_PATH
to point to the new install tree. Then you should be good to go.
Let me know if this doesn't work for you.
Also, you might want to try Alexandre Oliva's var-tracking branch.
This branch ought to have better debug info for local variables in
optimized code. If you find problems, send email and CC Alexandre.