gdb build using different compiler
Andrew Cagney
cagney@gnu.org
Tue Mar 9 20:09:00 GMT 2004
> Hi Manoj,
>
>
>>> How do I build gdb 6.1 using a compiler in /opt/tools/gcc instead of
>>> /usr/bin/gcc?
>
>
> Put /opt/tools/gcc/bin in your $PATH variable in front of /usr/bin.
>
> PATH=/opt/tools/gcc/bin:$PATH
> export PATH
FYI, a possibly better way is:
( CC=/opt/tools/gcc/bin/gcc ; export CC ; CXX=/opt/tools/gcc/bin/c++ ;
export CXX ; ..../configure )
This has the benefit(?) of hard-wiring CC and CXX into the Makefile and
hence making the build immune to changes in your path.
BTW, for testing the magic is more weird:
make check RUNTESTFLAGS='CC_FOR_TARGET=/../cc CXX_FOR_TARGET=/../c++'
I think they should default to CC/CXX, but I've no idea where/why that
isn't happening :-/
Andrew
> Then do this to make sure you're getting the gcc you want:
>
> gcc --version
>
> You might have to tweak "/opt/tools/gcc/bin" to get the result you want.
>
> That's all there is to it!
>
More information about the Gdb
mailing list