* [Buildroot] [Bug 10246] New: BR2_ENABLE_DEBUG does not have the expected effect for cmake packages
@ 2017-08-23 4:10 bugzilla at busybox.net
2017-08-23 4:41 ` [Buildroot] [Bug 10246] " bugzilla at busybox.net
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: bugzilla at busybox.net @ 2017-08-23 4:10 UTC (permalink / raw)
To: buildroot
https://bugs.busybox.net/show_bug.cgi?id=10246
Bug ID: 10246
Summary: BR2_ENABLE_DEBUG does not have the expected effect for
cmake packages
Product: buildroot
Version: 2017.05.1
Hardware: All
OS: Linux
Status: NEW
Severity: normal
Priority: P5
Component: Other
Assignee: unassigned at buildroot.uclibc.org
Reporter: joker.eph at gmail.com
CC: buildroot at uclibc.org
Target Milestone: ---
I've been bitten by the option BR2_ENABLE_DEBUG which does not exactly do what
the doc describes:
config BR2_ENABLE_DEBUG
bool "build packages with debugging symbols"
help
Build packages with debugging symbols enabled. All libraries
and binaries in the 'staging' directory will have debugging
symbols, which allows remote debugging even if libraries and
binaries are stripped on the target. Whether libraries and
binaries are stripped on the target is controlled by the
BR2_STRIP_* options below.
For a CMake package, this corresponds to `-DCMAKE_BUILD_TYPE=RelWithDebInfo`,
however currently buildroot will pass `-DCMAKE_BUILD_TYPE=Debug` which has the
effect of generating a *non-optimized* build (i.e. -O0).
I suggest the following patch:
diff --git a/package/pkg-cmake.mk b/package/pkg-cmake.mk
index db78d897d826..0a7bee685096 100644
--- a/package/pkg-cmake.mk
+++ b/package/pkg-cmake.mk
@@ -257,7 +257,7 @@ $(HOST_DIR)/share/buildroot/toolchainfile.cmake:
-e 's#@@TARGET_FC@@#$(subst $(HOST_DIR)/,,$(call
qstrip,$(TARGET_FC)))#' \
-e 's#@@CMAKE_SYSTEM_PROCESSOR@@#$(call
qstrip,$(CMAKE_SYSTEM_PROCESSOR))#' \
-e 's#@@TOOLCHAIN_HAS_FORTRAN@@#$(if
$(BR2_TOOLCHAIN_HAS_FORTRAN),1,0)#' \
- -e 's#@@CMAKE_BUILD_TYPE@@#$(if
$(BR2_ENABLE_DEBUG),Debug,Release)#' \
+ -e 's#@@CMAKE_BUILD_TYPE@@#$(if
$(BR2_ENABLE_DEBUG),RelWithDebInfo,Release)#' \
$(TOPDIR)/support/misc/toolchainfile.cmake.in \
> $@
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] [Bug 10246] BR2_ENABLE_DEBUG does not have the expected effect for cmake packages
2017-08-23 4:10 [Buildroot] [Bug 10246] New: BR2_ENABLE_DEBUG does not have the expected effect for cmake packages bugzilla at busybox.net
@ 2017-08-23 4:41 ` bugzilla at busybox.net
2017-08-23 8:22 ` bugzilla at busybox.net
2017-08-23 9:00 ` bugzilla at busybox.net
2 siblings, 0 replies; 4+ messages in thread
From: bugzilla at busybox.net @ 2017-08-23 4:41 UTC (permalink / raw)
To: buildroot
https://bugs.busybox.net/show_bug.cgi?id=10246
--- Comment #1 from Mehdi Amini <joker.eph@gmail.com> ---
Created attachment 7201
--> https://bugs.busybox.net/attachment.cgi?id=7201&action=edit
Proposed patch.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [Bug 10246] BR2_ENABLE_DEBUG does not have the expected effect for cmake packages
2017-08-23 4:10 [Buildroot] [Bug 10246] New: BR2_ENABLE_DEBUG does not have the expected effect for cmake packages bugzilla at busybox.net
2017-08-23 4:41 ` [Buildroot] [Bug 10246] " bugzilla at busybox.net
@ 2017-08-23 8:22 ` bugzilla at busybox.net
2017-08-23 9:00 ` bugzilla at busybox.net
2 siblings, 0 replies; 4+ messages in thread
From: bugzilla at busybox.net @ 2017-08-23 8:22 UTC (permalink / raw)
To: buildroot
https://bugs.busybox.net/show_bug.cgi?id=10246
Thomas Petazzoni <thomas.petazzoni@free-electrons.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |WONTFIX
Status|NEW |RESOLVED
--- Comment #2 from Thomas Petazzoni <thomas.petazzoni@free-electrons.com> ---
What you're proposing is to exactly revert
https://git.buildroot.org/buildroot/commit/package/pkg-cmake.mk?id=104bb29e0490bfb487e2e665448dd3ca07fcc2b5,
which already reverted the change you're proposing :)
So, see the commit log of
https://git.buildroot.org/buildroot/commit/package/pkg-cmake.mk?id=104bb29e0490bfb487e2e665448dd3ca07fcc2b5
for the explanation of why we're using the Debug build type and not the
RelWithDebInfo build type.
If you disagree, please submit a patch to the mailing list with a precise
description of why reverting
https://git.buildroot.org/buildroot/commit/package/pkg-cmake.mk?id=104bb29e0490bfb487e2e665448dd3ca07fcc2b5
is a good idea. Thanks!
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [Bug 10246] BR2_ENABLE_DEBUG does not have the expected effect for cmake packages
2017-08-23 4:10 [Buildroot] [Bug 10246] New: BR2_ENABLE_DEBUG does not have the expected effect for cmake packages bugzilla at busybox.net
2017-08-23 4:41 ` [Buildroot] [Bug 10246] " bugzilla at busybox.net
2017-08-23 8:22 ` bugzilla at busybox.net
@ 2017-08-23 9:00 ` bugzilla at busybox.net
2 siblings, 0 replies; 4+ messages in thread
From: bugzilla at busybox.net @ 2017-08-23 9:00 UTC (permalink / raw)
To: buildroot
https://bugs.busybox.net/show_bug.cgi?id=10246
--- Comment #3 from Mehdi Amini <joker.eph@gmail.com> ---
Thanks for the pointer. The rational in the commit message your pointing to
does not make sense to me, will email the mailing-list.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-08-23 9:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-23 4:10 [Buildroot] [Bug 10246] New: BR2_ENABLE_DEBUG does not have the expected effect for cmake packages bugzilla at busybox.net
2017-08-23 4:41 ` [Buildroot] [Bug 10246] " bugzilla at busybox.net
2017-08-23 8:22 ` bugzilla at busybox.net
2017-08-23 9:00 ` bugzilla at busybox.net
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.