summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/glibc/glibc.inc
diff options
context:
space:
mode:
authorMartin Jansa <martin.jansa@gmail.com>2018-09-19 11:26:30 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-09-20 05:41:31 -0700
commit19c64533eb3f039ab18be21b436f7cc9d0897916 (patch)
tree1b78fcf94e2ae30bbe0ad8dd8139d0290fa31f99 /meta/recipes-core/glibc/glibc.inc
parentf13f1dd286d7a8b1cd8a8f1b926b65859a7d5ea8 (diff)
downloadpoky-19c64533eb3f039ab18be21b436f7cc9d0897916.tar.gz
glibc: fix build with -O
* tested for qemuarm, qemux86 with -O, -O0, -Os, with gcc * to build with -O0 I had to remove restriction from systemtap first (From OE-Core rev: be3d12c6b1003348f1dabec9d2253f22b42f0387) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/glibc/glibc.inc')
-rw-r--r--meta/recipes-core/glibc/glibc.inc12
1 files changed, 0 insertions, 12 deletions
diff --git a/meta/recipes-core/glibc/glibc.inc b/meta/recipes-core/glibc/glibc.inc
index 91491a35f0..e673707369 100644
--- a/meta/recipes-core/glibc/glibc.inc
+++ b/meta/recipes-core/glibc/glibc.inc
@@ -6,18 +6,6 @@ STAGINGCC = "gcc-cross-initial-${TARGET_ARCH}"
6STAGINGCC_class-nativesdk = "gcc-crosssdk-initial-${SDK_SYS}" 6STAGINGCC_class-nativesdk = "gcc-crosssdk-initial-${SDK_SYS}"
7PATH_prepend = "${STAGING_BINDIR_TOOLCHAIN}.${STAGINGCC}:" 7PATH_prepend = "${STAGING_BINDIR_TOOLCHAIN}.${STAGINGCC}:"
8 8
9python () {
10 opt_effective = "-O"
11 for opt in d.getVar('SELECTED_OPTIMIZATION').split():
12 if opt in ("-O0", "-O", "-O1", "-O2", "-O3", "-Os"):
13 opt_effective = opt
14 if opt_effective == "-O0":
15 bb.fatal("%s can't be built with %s, try -O1 instead" % (d.getVar('PN'), opt_effective))
16 if opt_effective in ("-O", "-O1", "-Os"):
17 bb.note("%s doesn't build cleanly with %s, adding -Wno-error to SELECTED_OPTIMIZATION" % (d.getVar('PN'), opt_effective))
18 d.appendVar("SELECTED_OPTIMIZATION", " -Wno-error")
19}
20
21# siteconfig.bbclass runs configure which needs a working compiler 9# siteconfig.bbclass runs configure which needs a working compiler
22# For the compiler to work we need a working libc yet libc isn't 10# For the compiler to work we need a working libc yet libc isn't
23# in the sysroots directory at this point. This means the libc.so 11# in the sysroots directory at this point. This means the libc.so