LinuxQuestions.org
Visit Jeremy's Blog.
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 08-11-2004, 07:54 PM   #1
r_jensen11
Senior Member
 
Registered: Apr 2003
Location: Minnesota, USA
Distribution: Slack 10.0 w/2.4.26
Posts: 1,032

Rep: Reputation: 45
Storing CFLAGS and other compiler settings in Slackware


I know there's a file in /etc for gentoo that lets one keep their cflags settings stored so they don't have to keep on manually entering them each time they want to compile a new program. I also know that I did something like this once in Slack, but I just don't remember how to do it now (had to reformat, System Tools apparently doesn't like to properly resize ReiserFS partitions....)

Anyway, what I've done so far is creat a file called ~/.bash_profile for one of my users, and here's what's in that file:

CHOST="i686-pc-linux-gnu"
CFLAGS="-march=pentium4 -O3 -pipe -fomit-frame-pointer"
CXXFLAGS="march=pentium4 -O3 -pipe -fomit-frame-pointer"
export CHOST
export CFLAGS
export CXXFLAGS

since I'm on a P4 computer, I'm trying to optimize this puppy for my architecture. Now is there anything else I have to do? Keep in mind that all I've done is create this file, nothing more.

Thanks for the help

Edit:

It wouldn't happen to be the /etc/profile file, would it?

Last edited by r_jensen11; 08-11-2004 at 08:17 PM.
 
Old 08-12-2004, 04:06 AM   #2
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 242Reputation: 242Reputation: 242
If you put this settings in ~/.bash_profile, make sure you add in ~/.bashrc :

source .bash_profile

So the settings are read in each case you open a new bash shell. Also, if it is not a typo, try correct the march switch in your CXXFLAGS, you forget the '-' before 'march'

Last edited by Cedrik; 08-12-2004 at 04:08 AM.
 
Old 08-12-2004, 02:41 PM   #3
r_jensen11
Senior Member
 
Registered: Apr 2003
Location: Minnesota, USA
Distribution: Slack 10.0 w/2.4.26
Posts: 1,032

Original Poster
Rep: Reputation: 45
Quote:
Originally posted by Cedrik
If you put this settings in ~/.bash_profile, make sure you add in ~/.bashrc :

source .bash_profile

So the settings are read in each case you open a new bash shell. Also, if it is not a typo, try correct the march switch in your CXXFLAGS, you forget the '-' before 'march'
Yeah, that was a typo, sorry about that. Turns out I found out you can put the info in the /etc/profile and it uses the settings system-wide, so I don't need to add it to all of the users' settings and the root's individually
 
  


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem storing ALSA settings on boot shamrock_uk Debian 0 09-10-2005 06:50 AM
Storing sound settings for the secondary audio device? Livino Linux - Newbie 17 12-02-2004 06:12 PM
Storing sound settings for the secondary audio device? Livino Linux - Hardware 1 11-24-2004 07:07 PM
A Problem About Compiler In Slackware Linux... ShoCkwave Linux - Software 5 03-13-2004 01:24 PM
Storing xvidtune settings? r_jensen11 Slackware 2 02-17-2004 08:01 AM


All times are GMT -5. The time now is 05:34 AM.

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