[oe-commits] [openembedded-core] 06/09: glibc: Disable Werror when building with debug options
git at git.openembedded.org
git at git.openembedded.org
Fri Mar 1 07:16:05 UTC 2019
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master-next
in repository openembedded-core.
commit 9772eaafc1cb5957661d43e8f76c6f9b07b854dc
Author: Khem Raj <raj.khem at gmail.com>
AuthorDate: Thu Feb 28 19:21:09 2019 -0800
glibc: Disable Werror when building with debug options
Since compiler does not optimize away a lot of stuff we end up with
Werrors e.g.
./sysdeps/ieee754/flt-32/s_log1pf.c: In function '__log1pf':
../sysdeps/ieee754/flt-32/s_log1pf.c:114:22: error: 'c' may be used uninitialized in this function [-Werror=maybe-uninitialized]
114 | + (k * ln2_lo + c))) - f);
| ~~~~~~~~~~~~^~~~
which otherwise wont happen, so lets build with warnings-as-errors
disabled in debug mode
given we disable werror, now we don't have to restrict user to compile
without -O0
Signed-off-by: Khem Raj <raj.khem at gmail.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/recipes-core/glibc/glibc.inc | 9 ---------
meta/recipes-core/glibc/glibc_2.29.bb | 1 +
2 files changed, 1 insertion(+), 9 deletions(-)
diff --git a/meta/recipes-core/glibc/glibc.inc b/meta/recipes-core/glibc/glibc.inc
index b550abd..252fd56 100644
--- a/meta/recipes-core/glibc/glibc.inc
+++ b/meta/recipes-core/glibc/glibc.inc
@@ -2,15 +2,6 @@ require glibc-common.inc
require glibc-ld.inc
require glibc-testing.inc
-python () {
- opt_effective = "-O"
- for opt in d.getVar('SELECTED_OPTIMIZATION').split():
- if opt in ("-O0", "-O", "-O1", "-O2", "-O3", "-Os"):
- opt_effective = opt
- if opt_effective == "-O0":
- bb.fatal("%s can't be built with %s, try -O1 instead" % (d.getVar('PN'), opt_effective))
-}
-
DEPENDS = "virtual/${TARGET_PREFIX}gcc libgcc-initial linux-libc-headers"
PROVIDES = "virtual/libc"
diff --git a/meta/recipes-core/glibc/glibc_2.29.bb b/meta/recipes-core/glibc/glibc_2.29.bb
index c3e969d..4577350 100644
--- a/meta/recipes-core/glibc/glibc_2.29.bb
+++ b/meta/recipes-core/glibc/glibc_2.29.bb
@@ -85,6 +85,7 @@ EXTRA_OECONF = "--enable-kernel=${OLDEST_KERNEL} \
--disable-crypt \
--with-default-link \
--enable-nscd \
+ ${@bb.utils.contains_any('SELECTED_OPTIMIZATION', '-O0 -Og', '--disable-werror', '', d)} \
${GLIBCPIE} \
${GLIBC_EXTRA_OECONF}"
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list