Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* Re: gdb build using different compiler
@ 2004-03-09 18:53 Michael Elizabeth Chastain
  2004-03-09 20:09 ` Andrew Cagney
  2004-03-09 20:43 ` Andreas Schwab
  0 siblings, 2 replies; 5+ messages in thread
From: Michael Elizabeth Chastain @ 2004-03-09 18:53 UTC (permalink / raw)
  To: gdb, manjo

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

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!

Michael C


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: gdb build using different compiler
  2004-03-09 18:53 gdb build using different compiler Michael Elizabeth Chastain
@ 2004-03-09 20:09 ` Andrew Cagney
  2004-03-09 21:50   ` Andreas Schwab
  2004-03-09 20:43 ` Andreas Schwab
  1 sibling, 1 reply; 5+ messages in thread
From: Andrew Cagney @ 2004-03-09 20:09 UTC (permalink / raw)
  To: Michael Elizabeth Chastain; +Cc: gdb, manjo

> 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!
> 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: gdb build using different compiler
  2004-03-09 18:53 gdb build using different compiler Michael Elizabeth Chastain
  2004-03-09 20:09 ` Andrew Cagney
@ 2004-03-09 20:43 ` Andreas Schwab
  1 sibling, 0 replies; 5+ messages in thread
From: Andreas Schwab @ 2004-03-09 20:43 UTC (permalink / raw)
  To: Michael Elizabeth Chastain; +Cc: gdb, manjo

mec.gnu@mindspring.com (Michael Elizabeth Chastain) writes:

> 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.

Or just put CC=/opt/tools/gcc in the environment when running configure.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: gdb build using different compiler
  2004-03-09 20:09 ` Andrew Cagney
@ 2004-03-09 21:50   ` Andreas Schwab
  0 siblings, 0 replies; 5+ messages in thread
From: Andreas Schwab @ 2004-03-09 21:50 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: Michael Elizabeth Chastain, gdb, manjo

Andrew Cagney <cagney@gnu.org> writes:

>> 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 )

Even better:

CC=/opt/tools/gcc/bin/gcc CXX=/opt/tools/gcc/bin/c++ ..../configure

(althought I'm not sure whether the OP not actually wants
CC=/opt/tools/gcc.)

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


^ permalink raw reply	[flat|nested] 5+ messages in thread

* gdb build using different compiler
@ 2004-03-09 17:54 Manoj Iyer
  0 siblings, 0 replies; 5+ messages in thread
From: Manoj Iyer @ 2004-03-09 17:54 UTC (permalink / raw)
  To: gdb


How do I build gdb 6.1 using a compiler in /opt/tools/gcc instead of
/usr/bin/gcc?

Thanks
Manoj


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-03-09 21:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-09 18:53 gdb build using different compiler Michael Elizabeth Chastain
2004-03-09 20:09 ` Andrew Cagney
2004-03-09 21:50   ` Andreas Schwab
2004-03-09 20:43 ` Andreas Schwab
  -- strict thread matches above, loose matches on Subject: below --
2004-03-09 17:54 Manoj Iyer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox