bugGNU Octave - Bugs: bug #42339, Reasonable defaults for CFLAGS,...

 
 

bug #42339: Reasonable defaults for CFLAGS, CXXFLAGS, FFLAGS

Submitted by:  Ceral Paquet <octavebugs>
Submitted on:  Mon 12 May 2014 10:13:11 AM UTC  
 
Category: Configuration and Build SystemSeverity: 3 - Normal
Priority: 5 - NormalItem Group: None
Status: Works For MeAssigned to: None
Originator Name: Open/Closed: Closed
Release: 3.8.1Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Mon 12 May 2014 01:35:19 PM UTC, comment #1:

Thanks for your bug report. There are reasonable defaults set for all 3, and they are

And as you found, users are free to override to whatever they like via environment or configure command-line. So there's no bug as far as I can tell, closing as works for me.

Note that if you got no optimization, it is likely you had CFLAGS and/or CXXFLAGS set in your environment. If it is set to an empty string, that is still a value, and empty default flags is what you will get.

Note also that -march=native is a bad choice for a default option because 1) the option not work with all compilers, and 2) the resulting binary may not run on other systems.

Mike Miller <mtmiller>
Project Administrator
Mon 12 May 2014 10:13:11 AM UTC, original submission:

I recently compiled the 3.81 version. I'm not a good programmer so I just ran ./configure and apt-get repeatedly until the warnings went away.

Finally I ran make. Unfortunately the resulting octave ran really slow, which I eventually figured out was because there were no compiler optimizations turned on. I defined CFLAGS, CXXFLAGS and FFLAGS in my .bashrc and re-compiled - voila!

Could the configure script default to some reasonable choices if none are already defined? E.g. -O2 -march=native. It would help the non-experts :)

Ceral Paquet <octavebugs>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by octavebugs (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 12 May 2014 01:35:19 PM UTCmtmillerOpen/ClosedOpen=>Closed
    Mon 12 May 2014 01:35:18 PM UTCmtmillerStatusNone=>Works For Me

    Back to the top


    Powered by Savane 3.1-cleanup1