From: <jackie.huang@windriver.com>
To: <openembedded-core@lists.openembedded.org>
Subject: [PATCH] glibc: add -fno-builtin-strlen when not using -O2
Date: Mon, 12 Dec 2016 13:42:15 +0800 [thread overview]
Message-ID: <20161212054215.20513-1-jackie.huang@windriver.com> (raw)
From: Jackie Huang <jackie.huang@windriver.com>
The strlen will be inlined when compile with -O, -O1 or -Os,
so there is no symbol for strlen in ld-linux-x86-64.so.2,
causing a fatal error in valgrind:
valgrind: Fatal error at startup: a function redirection
valgrind: which is mandatory for this platform-tool combination
valgrind: cannot be set up. Details of the redirection are:
valgrind:
valgrind: A must-be-redirected function
valgrind: whose name matches the pattern: strlen
valgrind: in an object with soname matching: ld-linux-x86-64.so.2
so add -fno-builtin-strlen when compile with -O, -O1 or -Os.
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
---
meta/recipes-core/glibc/glibc.inc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/meta/recipes-core/glibc/glibc.inc b/meta/recipes-core/glibc/glibc.inc
index e85c704..7f3e0f6 100644
--- a/meta/recipes-core/glibc/glibc.inc
+++ b/meta/recipes-core/glibc/glibc.inc
@@ -16,8 +16,8 @@ python () {
if opt_effective == "-O0":
bb.fatal("%s can't be built with %s, try -O1 instead" % (d.getVar('PN', True), opt_effective))
if opt_effective in ("-O", "-O1", "-Os"):
- bb.note("%s doesn't build cleanly with %s, adding -Wno-error to SELECTED_OPTIMIZATION" % (d.getVar('PN', True), opt_effective))
- d.appendVar("SELECTED_OPTIMIZATION", " -Wno-error")
+ bb.note("%s doesn't build cleanly with %s, adding -Wno-error and -fno-builtin-strlen to SELECTED_OPTIMIZATION" % (d.getVar('PN', True), opt_effective))
+ d.appendVar("SELECTED_OPTIMIZATION", " -Wno-error -fno-builtin-strlen")
}
# siteconfig.bbclass runs configure which needs a working compiler
--
2.8.3
next reply other threads:[~2016-12-12 5:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-12 5:42 jackie.huang [this message]
2016-12-12 6:37 ` [PATCH] glibc: add -fno-builtin-strlen when not using -O2 Khem Raj
2016-12-12 7:41 ` Huang, Jie (Jackie)
2016-12-12 9:54 ` Andre McCurdy
2016-12-13 5:14 ` Huang, Jie (Jackie)
2016-12-13 9:16 ` Andre McCurdy
2016-12-14 2:38 ` Huang, Jie (Jackie)
2016-12-15 1:04 ` Randy MacLeod
2016-12-15 9:28 ` Andre McCurdy
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=20161212054215.20513-1-jackie.huang@windriver.com \
--to=jackie.huang@windriver.com \
--cc=openembedded-core@lists.openembedded.org \
/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