LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 03-17-2008, 08:51 PM   #1
superhumanCA
LQ Newbie
 
Registered: Mar 2008
Posts: 3

Rep: Reputation: 0
Red face 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!
 
Old 03-17-2008, 09:13 PM   #2
osor
HCL Maintainer
 
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450

Rep: Reputation: 70
Quote:
Originally Posted by superhumanCA View Post
I am wondering if recompiling the kernel with gcc4.3 will fix this problem.
Yes.
Quote:
Originally Posted by superhumanCA View Post
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
 
Old 03-17-2008, 09:20 PM   #3
superhumanCA
LQ Newbie
 
Registered: Mar 2008
Posts: 3

Original Poster
Rep: Reputation: 0
Cool

Thanks for the help, and the quick answer
 
Old 03-18-2008, 12:07 AM   #4
superhumanCA
LQ Newbie
 
Registered: Mar 2008
Posts: 3

Original Poster
Rep: Reputation: 0
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?
 
Old 03-18-2008, 12:19 PM   #5
osor
HCL Maintainer
 
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450

Rep: Reputation: 70
Quote:
Originally Posted by superhumanCA View Post
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 View Post
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Completely new and need some clarification please bldgengineer Linux - Newbie 6 05-26-2007 11:02 AM
I just need some clarification Duneatreides Linux - Newbie 2 03-12-2007 05:48 AM
Clarification on Nvidia Burgin Debian 1 02-26-2005 11:12 AM
clarification about defragmenting ramdak5000 Linux - Software 2 02-20-2005 12:27 AM
kernel clarification props666999 Slackware 2 07-31-2004 12:43 PM


All times are GMT -5. The time now is 01:18 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration