From: bugzilla at busybox.net <bugzilla@busybox.net>
To: buildroot@busybox.net
Subject: [Buildroot] [Bug 10246] New: BR2_ENABLE_DEBUG does not have the expected effect for cmake packages
Date: Wed, 23 Aug 2017 04:10:57 +0000 [thread overview]
Message-ID: <bug-10246-163@https.bugs.busybox.net/> (raw)
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.
next reply other threads:[~2017-08-23 4:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-23 4:10 bugzilla at busybox.net [this message]
2017-08-23 4:41 ` [Buildroot] [Bug 10246] BR2_ENABLE_DEBUG does not have the expected effect for cmake packages bugzilla at busybox.net
2017-08-23 8:22 ` bugzilla at busybox.net
2017-08-23 9:00 ` bugzilla at busybox.net
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-10246-163@https.bugs.busybox.net/ \
--to=bugzilla@busybox.net \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox