LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   need some clarification/help (https://www.linuxquestions.org/questions/linux-general-1/need-some-clarification-help-628808/)

superhumanCA 03-17-2008 08:51 PM

need some clarification/help
 
Hello everyone

I have a few questions, which i am hoping someone will take some time and help a fellow linux newbie out.

I have just recently installed linux (archliunx 64bit) and gnome 2.22. Everything is working wonderful, but when i go ahead and try to install the nvidia graphic drivers, it gives me an error saying that the kernel was compiled with gcc4.2 and i have gcc4.3 installed.
I am wondering if recompiling the kernel with gcc4.3 will fix this problem.

Also, i have read that gcc4.3 takes advantage of a multi-core processor. I am running a Q6600, and am wondering how can i take advantage of gcc4.3 when having a quad-core? Do i need to setup anything up, does recompiling everything provide a speed improvement?

Thanks everyone for the help!

osor 03-17-2008 09:13 PM

Quote:

Originally Posted by superhumanCA (Post 3092075)
I am wondering if recompiling the kernel with gcc4.3 will fix this problem.

Yes.
Quote:

Originally Posted by superhumanCA (Post 3092075)
Also, i have read that gcc4.3 takes advantage of a multi-core processor. I am running a Q6600, and am wondering how can i take advantage of gcc4.3 when having a quad-core? Do i need to setup anything up, does recompiling everything provide a speed improvement?

You don’t need to do anything special. As long as you have an SMP kernel, you will make use of all cores, and if your program uses threads, you will get more benefit in one program.

As for cpu-specific optimizations, you can do the following for userspace code (kernel code will do it automatically):
Code:

-march=core2
or
Code:

-march=native

superhumanCA 03-17-2008 09:20 PM

Thanks for the help, and the quick answer

superhumanCA 03-18-2008 12:07 AM

I changed the /etc/makepkg.conf to the following:
CFLAGS="-march=native -O2 -pipe"
CXXFLAGS="-march=native -O2 -pipe"


Do i need the -O2 -pipe or will -march=native be fine?

I also changed the MAKEFLAGS to "-j5", now does this mean every time i compile a program, it will give the -j5 option to it?

osor 03-18-2008 12:19 PM

Quote:

Originally Posted by superhumanCA (Post 3092215)
Do i need the -O2 -pipe or will -march=native be fine?

The “-O2” enables extra optimizations, and the “-pipe” makes your compilation go somewhat faster by using pipes rather than temporary files. So you can safely keep them there.
Quote:

Originally Posted by superhumanCA (Post 3092215)
I also changed the MAKEFLAGS to "-j5", now does this mean every time i compile a program, it will give the -j5 option to it?

Yes, every time you compile a program using makepkg.


All times are GMT -5. The time now is 06:12 AM.