Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
08-11-2004, 06:54 PM
|
#1
|
Senior Member
Registered: Apr 2003
Location: Minnesota, USA
Distribution: Slack 10.0 w/2.4.26
Posts: 1,032
Rep:
|
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 07:17 PM.
|
|
|
08-12-2004, 03:06 AM
|
#2
|
Senior Member
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140
|
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 03:08 AM.
|
|
|
08-12-2004, 01:41 PM
|
#3
|
Senior Member
Registered: Apr 2003
Location: Minnesota, USA
Distribution: Slack 10.0 w/2.4.26
Posts: 1,032
Original Poster
Rep:
|
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
|
|
|
All times are GMT -5. The time now is 01:15 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|