[Bug 56074] New: Option "don't use predefined -O flag" affects more than the -O flag

Leif Huhn leif at dkstat.com
Mon Mar 17 21:38:05 UTC 2003


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
     
http://bugs.kde.org/show_bug.cgi?id=56074     
           Summary: Option "don't use predefined -O flag" affects more than
                    the -O flag
           Product: kdevelop
           Version: unspecified
          Platform: SuSE RPMs
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: general
        AssignedTo: kdevelop-devel at kdevelop.org
        ReportedBy: leif at dkstat.com


Version:            (using KDE KDE 3.1)
Installed from:    SuSE RPMs
Compiler:          gcc 3.2 Suse 8.1
OS:          Linux

Checking the option "don't use predefined -O flag" under Project, Options, Configure Settings causes KDevelop (or configure, or whatever) to build the individual cpp files in the project without the CXXFLAGS.  With the box UNchecked both CPPFLAGS and CXXFLAGS are passed to gcc for every cpp file.

I'm not familiar enough with any of these things to know which is the correct behavior, but I'm pretty sure that checking a box that claims to affect the -O option shouldn't change which flags (other than -O) are passed to gcc.

Why is there this option at all?  It might make sense if you are familiar with the build process, but there is already an option to change the -O level.  This option is very confusing, because it doesn't specify what the predefined -O flag is, or where it came from.  This option also has no "What's This" help.  Building a project at -O0 can be very difficult when this "predefined -O" flag is applied, and then even when a user finds the option to turn off the "predefined -O flag" strange side effects occur.

Steps to reproduce:

Create new project (I created a KDE Normal) template.  Go to Project, Options, Compiler Options, Flags and Warnings.  In the CPPFLAGS box type -DHONORCPPFLAGS.  In the CXXFLAGS box type -DHONORCXXFLAGS.  Click Ok.  Go to Build, DistClean/Rebuild All.  Watch as gcc is passed both defines for the cpp files.  After the build process is finished, go to Project, Options, Configure Options.  Check "Don't use predefined -O flag" and click Ok.  Go to build, DistClean/Rebuild All.  Watch as the project builds with only the -DHONORCPPFLAGS passed to gcc for the cpp files.




More information about the KDevelop-devel mailing list