LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-25-2004, 08:52 PM   #1
shanenin
Member
 
Registered: Aug 2003
Location: Rochester, MN, U.S.A
Distribution: Gentoo
Posts: 987

Rep: Reputation: 30
how to unset cflags?


I have been searching for a while(still can't find the info I need). I need to make sure my cflags are unset when I build binutils. How do I know if my CFLAGS or CXXFLAGS are set? how would I unset them.
 
Old 01-25-2004, 09:11 PM   #2
lyle_s
Member
 
Registered: Jul 2003
Distribution: Slackware
Posts: 392

Rep: Reputation: 55
You can see what CFLAGS and CXXFLAGS are set to via:

echo $CFLAGS

and

echo $CXXFLAGS

at the command line.

To unset them (you're going to wince a bit when you read this):

unset CFLAGS

and

unset CXXFLAGS

Lyle
 
Old 01-25-2004, 09:17 PM   #3
shanenin
Member
 
Registered: Aug 2003
Location: Rochester, MN, U.S.A
Distribution: Gentoo
Posts: 987

Original Poster
Rep: Reputation: 30
does that mean cflags are incorperated in my shell(.bash_profile)?
 
Old 01-25-2004, 09:33 PM   #4
lyle_s
Member
 
Registered: Jul 2003
Distribution: Slackware
Posts: 392

Rep: Reputation: 55
CFLAGS and CXXFLAGS are ordinary shell environment variables that by convention gcc and other compilers consult to alter their behavior.

They could be set in any file (.bashrc, .bash_profile, /etc/profile, etc) that sets environment variables, or set at the command line.

If you get output like this:

lyle@bowman:~$ echo $CFLAGS

lyle@bowman:~$ echo $CXXFLAGS

lyle@bowman:~$

before you compile, you can be assured they aren't set.

Lyle
 
Old 01-25-2004, 09:36 PM   #5
shanenin
Member
 
Registered: Aug 2003
Location: Rochester, MN, U.S.A
Distribution: Gentoo
Posts: 987

Original Poster
Rep: Reputation: 30
thanks for all of your help, you cleared a lot up.
 
  


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
how to unset environment variable in bash suneel Linux - Newbie 7 09-14-2009 10:17 AM
BASH variables getting unset outside of loop trevelluk Programming 2 03-25-2005 07:14 AM
Unset praveenv Linux - Newbie 1 09-14-2004 05:37 PM
Set/Unset Non-Blocking sockets? zer0python Programming 2 01-04-2004 01:31 AM
unset a readonly variable hamster Linux - General 2 05-19-2003 05:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:54 AM.

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