summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2019-02-28 19:21:09 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-03-02 16:49:07 +0000
commit3dd005248f56aa774631d6bb868b1f7328d57f3c (patch)
tree382a872fc21f40bc3402093575765c3dc3baa40f
parent36754fed127bf2a5b91bbebe5a4c8c350a13c755 (diff)
downloadpoky-3dd005248f56aa774631d6bb868b1f7328d57f3c.tar.gz
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 (From OE-Core rev: 9772eaafc1cb5957661d43e8f76c6f9b07b854dc) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-core/glibc/glibc.inc9
-rw-r--r--meta/recipes-core/glibc/glibc_2.29.bb1
2 files changed, 1 insertions, 9 deletions
diff --git a/meta/recipes-core/glibc/glibc.inc b/meta/recipes-core/glibc/glibc.inc
index b550abd877..252fd56c13 100644
--- a/meta/recipes-core/glibc/glibc.inc
+++ b/meta/recipes-core/glibc/glibc.inc
@@ -2,15 +2,6 @@ require glibc-common.inc
2require glibc-ld.inc 2require glibc-ld.inc
3require glibc-testing.inc 3require glibc-testing.inc
4 4
5python () {
6 opt_effective = "-O"
7 for opt in d.getVar('SELECTED_OPTIMIZATION').split():
8 if opt in ("-O0", "-O", "-O1", "-O2", "-O3", "-Os"):
9 opt_effective = opt
10 if opt_effective == "-O0":
11 bb.fatal("%s can't be built with %s, try -O1 instead" % (d.getVar('PN'), opt_effective))
12}
13
14DEPENDS = "virtual/${TARGET_PREFIX}gcc libgcc-initial linux-libc-headers" 5DEPENDS = "virtual/${TARGET_PREFIX}gcc libgcc-initial linux-libc-headers"
15 6
16PROVIDES = "virtual/libc" 7PROVIDES = "virtual/libc"
diff --git a/meta/recipes-core/glibc/glibc_2.29.bb b/meta/recipes-core/glibc/glibc_2.29.bb
index c3e969d2f8..4577350eae 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} \
85 --disable-crypt \ 85 --disable-crypt \
86 --with-default-link \ 86 --with-default-link \
87 --enable-nscd \ 87 --enable-nscd \
88 ${@bb.utils.contains_any('SELECTED_OPTIMIZATION', '-O0 -Og', '--disable-werror', '', d)} \
88 ${GLIBCPIE} \ 89 ${GLIBCPIE} \
89 ${GLIBC_EXTRA_OECONF}" 90 ${GLIBC_EXTRA_OECONF}"
90 91