LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   Where to change CFLAGS in Fedora Core 2? (https://www.linuxquestions.org/questions/fedora-35/where-to-change-cflags-in-fedora-core-2-a-234957/)

black hole sun 09-24-2004 10:01 PM

Where to change CFLAGS in Fedora Core 2?
 
I'm building a Linux From Scratch system using FC2 as the host. Thus I want some CFLAGS to optimize LFS.

Where do I set CFLAGS? There is no /etc/make.conf as in Gentoo, so I'm sort of lost.

CroMagnon 09-25-2004 02:38 AM

I'm surprise the LFS instructions don't cover this (haven't read them lately), but I liked to create a script in my home directory called "lfs" that took care of all the setup I needed (running the chroot command, setting variables and so on). All you need to do is add the command 'export CFLAGS=blablabla' to a script like that, or to your ~/.bashrc if you don't mind it always being set (if you're about to switch to your LFS system, this might be the case).
Good luck!

black hole sun 09-26-2004 11:42 AM

Quote:

Originally posted by CroMagnon
I'm surprise the LFS instructions don't cover this (haven't read them lately), but I liked to create a script in my home directory called "lfs" that took care of all the setup I needed (running the chroot command, setting variables and so on). All you need to do is add the command 'export CFLAGS=blablabla' to a script like that, or to your ~/.bashrc if you don't mind it always being set (if you're about to switch to your LFS system, this might be the case).
Good luck!

Thanks. I managed to finish up my LFS system, using the temporary export command.

About the ~/.bashrc, I don't have this file. I have tried to create it and enter in:

export CFLAGS="-O2 -march=pentium4 -fomit-frame-pointer"

But when I echo $CLFAGS I get no result :confused: I want these settings to be permanent, I don't want to manually export CFLAGS every time I open up a shell...


EDIT: never mind. I just added the export commands to /etc/profile :) Thanks for your help!

CroMagnon 09-26-2004 05:17 PM

If you're running X, you might need to log off and back on before items in .bashrc show up (or it's possible that it's not even being read due to the way you log in, or how your system is configured). ~/.bash_profile might be another option, but if you're happy with it in /etc/profile (i.e: all users) then that's fine too :)


All times are GMT -5. The time now is 10:08 AM.