This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gdb build using different compiler


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!



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]