LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 12-16-2004, 11:04 PM   #1
sh1ft
Member
 
Registered: Feb 2004
Location: Ottawa, Ontario, Can
Distribution: Slackware, ubuntu
Posts: 391

Rep: Reputation: 32
slackware compile flags


I remember when I was using gentoo, there was the ability to set the gcc compile flags to optimize for my specific cpu (-march=pentium4)

I'm wondering how I could set a system wide flag in the same manner on slackware, so whatever programs I compile from source will have that negligible boost it gives(more so for the warm feeling I get believing I'm getting the most out of my apps) . I guess it's not so much a distro question as a gcc question.
 
Old 12-17-2004, 05:43 AM   #2
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 244Reputation: 244Reputation: 244
For system wide settings, I would put :

CFLAGS="-march=pentium4" # or whatever settings you want
CXXFLAGS="$CFLAGS"
CHOST="i686-pc-linux-gnu"

export CFLAGS CXXFLAGS CHOST

in /etc/profile, say at the bottom of the file
 
Old 12-17-2004, 11:11 AM   #3
slightcrazed
Member
 
Registered: May 2003
Location: Lisbon Falls, Maine
Distribution: RH 8.0, 9.0, FC2 - 4, Slack 9.0 - 10.2, Knoppix 3.4 - 4.0, LFS,
Posts: 789

Rep: Reputation: 30
You could also put the above in your .bash_profile or .bashrc file for a specific user (although compile flags are something that should be system wide).

slight
 
Old 12-17-2004, 01:02 PM   #4
sh1ft
Member
 
Registered: Feb 2004
Location: Ottawa, Ontario, Can
Distribution: Slackware, ubuntu
Posts: 391

Original Poster
Rep: Reputation: 32
Thanks that was exactly what I was looking for.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Kernel Compile Processor Flags (description) Zaiboot Linux - General 3 05-26-2005 10:39 PM
Compile question (slackware 10.0) Zxn Linux - Newbie 1 07-10-2004 04:55 PM
Can't compile Samba 3.0.x in Slackware 9.1 tkrin Slackware 2 12-19-2003 08:17 PM
Compile your own slackware? ppfundst Slackware 13 07-10-2003 06:11 AM
slackware kernal compile php Linux - General 5 01-02-2002 02:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 12:51 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration