# buildworld with gcc44 && binutils from ports



## Seeker (Aug 24, 2010)

Should I do it?
That is..., compile /usr/src, with gcc44 && binutils from ports?

I would *NOT* touch, FreeBSD's default optimization flags, just append one mine: "-march=native"

And voila!
:stud


----------



## SirDice (Aug 25, 2010)

Seeker said:
			
		

> Should I do it?


If you have to ask, no.


----------



## Seeker (Aug 25, 2010)

Actually I thought on latest gcc46
Why I shouldn't do it, with default FreeBSD's optimization flags?
What are the consequences?

And a..., as I intend to use a *ccache*, how do I "_link_" it with *gcc46*, instead with *base gcc*?


----------



## SirDice (Aug 25, 2010)

Seeker said:
			
		

> Why I shouldn't do it, with default FreeBSD's optimization flags?


No support. No guarantee it'll actually work or even compile. 


> What are the consequences?


A completely non-functional machine. Or worse, one that crashes at random times.


----------



## dennylin93 (Aug 25, 2010)

Take a look at this article: Using newer version of GCC and binutils with the FreeBSD Ports Collection.

There are some benefits, such as 10% average increase in binary performance. On multimedia apps, the gain is even more.

However, there's also the risk, so remember to backup before trying.


----------



## Seeker (Aug 25, 2010)

dennylin93 said:
			
		

> Take a look at this article: http://www.freebsd.org/doc/en/articles/custom-gcc/




Exactly that article inspired me to use it on BASE..., as I have core 2 duo and want a faster BASE.


So, even if compilation would succeed, sys might get unstable?
And there would be no way for me to figure out a cause of error?


----------



## gordon@ (Aug 25, 2010)

Is the base system really not fast enough for your needs? Would you even notice a difference?


----------



## Seeker (Aug 25, 2010)

gordon@ said:
			
		

> Is the base system really not fast enough for your needs? Would you even notice a difference?


No, I would not notice the difference in speed, at all.
Especially, because this is not a server, but a laptop and that a very powerful one. Latidude D830

I would not do these on production machine, or server.
It is just *my own, personal emotional need, for a "higher score"*, that is, for compiler to get into account all processor's abilities.

Something like those folks, that have cars, which can _pull_, up to 340 Km/h, but actually they only use it, for speeds of max 160 Km/h on a highway.


----------



## gordon@ (Aug 25, 2010)

Well, there is always Gentoo!

http://funroll-loops.info/

Just bear in mind that painting this far out of the lines increases your risk and the only support you will end up getting from here is likely along the lines of "Don't do that, use the system compiler"


----------



## Seeker (Aug 25, 2010)

gordon@ said:
			
		

> Well, there is always Gentoo!


ROFLMAO - No thanks!
There are, a way more, pleasurable ways, of wasting my time.


			
				gordon@ said:
			
		

> http://funroll-loops.info/


Basically, similar(but of lower grade) "shout outs", are also made in this forum, here and there, but as I can see, _you-of-kind_ simply ignores them.

These are my fav: (Bulls eyes, are in red)



> *"Watching shit scroll by for hours makes me a Linux expert overnight!"*





> "Gentoo *requires a compiler*, Python and many tools not necessary and *even dangerous for servers.* But then, even Gentoo itself, *calls itself a Meta-distribution*."





> "I'm running GENTOO on many servers *under very strange conditions* (DoS...) and It performs MUCH FASTER than ANY OTHER Linux distro or FreeBSD."





> "I essentially started using Gentoo *because my ....ing KDE clock would never show the right time* in Red Hat."





> "Binary packages are bad! *If you don't use your system to compile itself, it will lose the ability to compile itself*..."





			
				gordon@ said:
			
		

> Just bear in mind that painting this far out of the lines increases your risk and the only support you will end up getting from here is likely along the lines of "Don't do that, use the system compiler"


So, for what and by who, should lang/gcc46 and others, be used?
Only by application developers, who use FreeBSD as theirs OS?

Should ports be compiled by antyhing else, except base compiler?


----------



## gordon@ (Aug 25, 2010)

I think the biggest concern would be attempting to use gcc46 for your kernel (and maybe some important libraries like libc). I do know that certain parts of the kernel have bugs to match the bugs in gcc and that whenever we change the system compiler, something is pretty much guaranteed to break.

If you want the newer compiler, I would recommend it for ports and the like. Generally there isn't much in the base system that is extremely performant to the extent that compiler optimizations are going to make that much of a noticeable difference. I think there is a setting somewhere to tell the ports system to use compiler X, but I can't remember it off the top of my head.


----------



## Seeker (Aug 25, 2010)

I understand.
I'll wait for clang, to become integrated into base.

Maybe: 
	
	



```
USE_GCC=46
```
And after reading all the issues, users are having while compiling ports, with compiler from ports... I've completely lost interest in usage of non-base compilers.
And worst of all, is a fact, that successfull build, isn't confirmation of a working binary!
As Ime@ said, while talking about aggressive optimizations with base compiler: _"... you can get *very subtle problems* and you'll never find out, where the problems came from ..."_
So, I just don't wana imagine problems with non-base compiler.

This definitely cooled me down, from a need, for a _"higher score"_


----------



## UNIXgod (Aug 26, 2010)

Seeker said:
			
		

> I'll wait for clang, to become integrated into base.



So when is clang going to usurp gcc? 9?


----------



## gordon@ (Aug 26, 2010)

llvm/clang is in the tree now. The current status of that effort is in the wiki:
http://wiki.freebsd.org/BuildingFreeBSDWithClang
http://wiki.freebsd.org/PortsAndClang

Although those links haven't been updated in nearly 2 months.


----------

