Your message dated Sun, 4 Sep 2011 09:17:40 +0300
with message-id <201109040917.44597.mo...@debian.org>
and subject line Re: Bug#640214: cmake sets the default optimization level to
-O3
has caused the Debian Bug report #640214,
regarding cmake sets the default optimization level to -O3
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)
--
640214: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=640214
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: cmake
Version: 2.8.5-1
Severity: serious
Tags wheezy sid patch
Debian policy 10.1 gives defaults for the optimization level, which is -O2.
The last paragraph allows exceptions for certain packages on the decision of the
package maintainer. It's certainly not meant for the maintainer of a build
system to make this decision on the behalf of all packages using this build
system. The default should be changed to -O2.
Plus it looks like that -g is not enabled for release builds.
--- Modules/Compiler/GNU-Fortran.cmake~ 2011-07-08 14:21:44.000000000 +0200
+++ Modules/Compiler/GNU-Fortran.cmake 2011-09-03 14:19:12.904135479 +0200
@@ -3,7 +3,7 @@
# No -DNDEBUG for Fortran.
SET(CMAKE_Fortran_FLAGS_MINSIZEREL_INIT "-Os")
-SET(CMAKE_Fortran_FLAGS_RELEASE_INIT "-O3")
+SET(CMAKE_Fortran_FLAGS_RELEASE_INIT "-O2")
# We require updates to CMake C++ code to support preprocessing rules
# for Fortran.
--- Modules/Compiler/GNU.cmake~ 2011-07-08 14:21:44.000000000 +0200
+++ Modules/Compiler/GNU.cmake 2011-09-03 14:19:26.224156389 +0200
@@ -28,7 +28,7 @@
set(CMAKE_${lang}_FLAGS_INIT "")
set(CMAKE_${lang}_FLAGS_DEBUG_INIT "-g")
set(CMAKE_${lang}_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG")
- set(CMAKE_${lang}_FLAGS_RELEASE_INIT "-O3 -DNDEBUG")
+ set(CMAKE_${lang}_FLAGS_RELEASE_INIT "-O2 -DNDEBUG")
set(CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
set(CMAKE_${lang}_CREATE_PREPROCESSED_SOURCE "<CMAKE_${lang}_COMPILER> <DEFINES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
set(CMAKE_${lang}_CREATE_ASSEMBLY_SOURCE "<CMAKE_${lang}_COMPILER> <DEFINES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")
--- Modules/Compiler/G95-Fortran.cmake~ 2011-07-08 14:21:44.000000000 +0200
+++ Modules/Compiler/G95-Fortran.cmake 2011-09-03 14:19:05.194125125 +0200
@@ -1,7 +1,7 @@
set(CMAKE_Fortran_FLAGS_INIT "")
set(CMAKE_Fortran_FLAGS_DEBUG_INIT "-g")
set(CMAKE_Fortran_FLAGS_MINSIZEREL_INIT "-Os")
-set(CMAKE_Fortran_FLAGS_RELEASE_INIT "-O3")
+set(CMAKE_Fortran_FLAGS_RELEASE_INIT "-O2")
set(CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
set(CMAKE_Fortran_MODDIR_FLAG "-fmod=")
set(CMAKE_Fortran_VERBOSE_FLAG "-v")
--- End Message ---
--- Begin Message ---
Hello,
On šeštadienis 03 Rugsėjis 2011 15:30:25 Matthias Klose wrote:
> Package: cmake
> Version: 2.8.5-1
> Severity: serious
> Tags wheezy sid patch
>
> Debian policy 10.1 gives defaults for the optimization level, which is -O2.
> The last paragraph allows exceptions for certain packages on the decision
> of the package maintainer. It's certainly not meant for the maintainer of
> a build system to make this decision on the behalf of all packages using
> this build system. The default should be changed to -O2.
>
> Plus it looks like that -g is not enabled for release builds.
Debian packages should use "RelWithDebInfo" [1] CMAKE_BUILD_TYPE if they want
settings compatible with Debian Policy out-of-the-box. However, neither
"Release" [2] nor "RelWithDebInfo" [1] are defaults while empty build type [3]
is THE default. So cmake makes absolutely NO decision on behalf of maintainer.
Environment variables C(XX)FLAGS are still effective with empty build type so
the process (including noopt handling) can be exactly the same as with
autoconf. Closing as invalid.
[1] set(CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
[2] set(CMAKE_${lang}_FLAGS_RELEASE_INIT "-O2 -DNDEBUG")
[3] set(CMAKE_${lang}_FLAGS_INIT "")
--
Modestas Vainius <mo...@debian.org>
signature.asc
Description: This is a digitally signed message part.
--- End Message ---