Re: newbie question on upgrading GCC

2006-04-11 Thread Chuck Swiger

Jim Stapleton wrote:
[ ... ]

When it comes to changing the default compiler a good rule of thumb is
that if you need to ask how to do it, then you should not do it.


That seems to be a general *nix world rule of thumb for just about everything...


The UNIX world is willing to give you a loaded gun, but we try not to 
instruct people on how to shoot their own feet without at least giving them 
a warning that doing so will hurt.  :-)


--
-Chuck
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: newbie question on upgrading GCC

2006-04-10 Thread Erik Trulsson
On Mon, Apr 10, 2006 at 10:43:51AM -0400, Jim Stapleton wrote:
 I did a make install clean in the lang/gcc40/ directory to get a
 newer version of GCC, and it seems happy, so the next thing I did was
 I replaced my /usr/bin/gcc, /usr/bin/g++, etc. binaries with hard
 links to the /usr/local/bin/gcc-freebsd-4.0,
 /usr/local/bin/g++-freebsd-4.0, etc. binaries.

That sounds like a bad idea.

 
 Now when I try to make things, I get a lot of errors and most compilation 
 fails.

Yes, a bad idea indeed.  Do not try to change the base compiler unless you
really know what you are doing.

 
 I backed up the original binaries (gcc - gcc-original), and things
 seem to be fixed, and compiles work. What should I do?

You should leave the standard compiler alone.  If you wish to use the
newer compiler invoke it as gcc40 (IIRC), but don't try use it to rebuild
FreeBSD itself.


 
 Also, the ports install does not make a cc-freebsd-4.0 binary, so
 I'm leary of replacing it with a hard link to the gcc-freebsd-4.0
 biary, although when I run cc --version, it tells me that it is gcc
 3.4.x, which is the default gcc install.



-- 
Insert your favourite quote here.
Erik Trulsson
[EMAIL PROTECTED]
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: newbie question on upgrading GCC

2006-04-10 Thread Jim Stapleton
how do I setup make.conf to automatically use the new compiler?

Is there any way to set this new compiler as the default (such as
building the OS), without causing issues? Or would that be just a
royal pain in the posterior that is not worth the effort?

On 4/10/06, Erik Trulsson [EMAIL PROTECTED] wrote:
 On Mon, Apr 10, 2006 at 10:43:51AM -0400, Jim Stapleton wrote:
  I did a make install clean in the lang/gcc40/ directory to get a
  newer version of GCC, and it seems happy, so the next thing I did was
  I replaced my /usr/bin/gcc, /usr/bin/g++, etc. binaries with hard
  links to the /usr/local/bin/gcc-freebsd-4.0,
  /usr/local/bin/g++-freebsd-4.0, etc. binaries.

 That sounds like a bad idea.

 
  Now when I try to make things, I get a lot of errors and most compilation 
  fails.

 Yes, a bad idea indeed.  Do not try to change the base compiler unless you
 really know what you are doing.

 
  I backed up the original binaries (gcc - gcc-original), and things
  seem to be fixed, and compiles work. What should I do?

 You should leave the standard compiler alone.  If you wish to use the
 newer compiler invoke it as gcc40 (IIRC), but don't try use it to rebuild
 FreeBSD itself.


 
  Also, the ports install does not make a cc-freebsd-4.0 binary, so
  I'm leary of replacing it with a hard link to the gcc-freebsd-4.0
  biary, although when I run cc --version, it tells me that it is gcc
  3.4.x, which is the default gcc install.



 --
 Insert your favourite quote here.
 Erik Trulsson
 [EMAIL PROTECTED]

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: newbie question on upgrading GCC

2006-04-10 Thread Erik Trulsson
On Mon, Apr 10, 2006 at 11:01:21AM -0400, Jim Stapleton wrote:
 how do I setup make.conf to automatically use the new compiler?

Don't.  But if you insist on doing that you could try putting

CC=/usr/local/bin/gcc40
CXX=/usr/local/bin/g++40

into /etc/make.conf.  Just be aware that it will probably not work very
well.


 
 Is there any way to set this new compiler as the default (such as
 building the OS), without causing issues?

Not without causing issues, no.

 Or would that be just a
 royal pain in the posterior that is not worth the effort?

That does sound like a fairly accurate description.


When it comes to changing the default compiler a good rule of thumb is
that if you need to ask how to do it, then you should not do it.


 
 On 4/10/06, Erik Trulsson [EMAIL PROTECTED] wrote:
  On Mon, Apr 10, 2006 at 10:43:51AM -0400, Jim Stapleton wrote:
   I did a make install clean in the lang/gcc40/ directory to get a
   newer version of GCC, and it seems happy, so the next thing I did was
   I replaced my /usr/bin/gcc, /usr/bin/g++, etc. binaries with hard
   links to the /usr/local/bin/gcc-freebsd-4.0,
   /usr/local/bin/g++-freebsd-4.0, etc. binaries.
 
  That sounds like a bad idea.
 
  
   Now when I try to make things, I get a lot of errors and most compilation 
   fails.
 
  Yes, a bad idea indeed.  Do not try to change the base compiler unless you
  really know what you are doing.
 
  
   I backed up the original binaries (gcc - gcc-original), and things
   seem to be fixed, and compiles work. What should I do?
 
  You should leave the standard compiler alone.  If you wish to use the
  newer compiler invoke it as gcc40 (IIRC), but don't try use it to rebuild
  FreeBSD itself.
 
 
  
   Also, the ports install does not make a cc-freebsd-4.0 binary, so
   I'm leary of replacing it with a hard link to the gcc-freebsd-4.0
   biary, although when I run cc --version, it tells me that it is gcc
   3.4.x, which is the default gcc install.
 
 
 
  --
  Insert your favourite quote here.
  Erik Trulsson
  [EMAIL PROTECTED]
 
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to [EMAIL PROTECTED]

-- 
Insert your favourite quote here.
Erik Trulsson
[EMAIL PROTECTED]
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: newbie question on upgrading GCC

2006-04-10 Thread Jim Stapleton

 When it comes to changing the default compiler a good rule of thumb is
 that if you need to ask how to do it, then you should not do it.



That seems to be a general *nix world rule of thumb for just about everything...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: newbie question on upgrading GCC

2006-04-10 Thread RW
On Monday 10 April 2006 16:01, Jim Stapleton wrote:
 how do I setup make.conf to automatically use the new compiler?

 Is there any way to set this new compiler as the default (such as
 building the OS), without causing issues? Or would that be just a
 royal pain in the posterior that is not worth the effort?

IIRC make buildworld  doesn't even use the default compiler directly. It just 
uses it to bootstrap the build of its own new compiler.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]