diff options
Diffstat (limited to 'meta/recipes-core/glibc/glibc.inc')
-rw-r--r-- | meta/recipes-core/glibc/glibc.inc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/meta/recipes-core/glibc/glibc.inc b/meta/recipes-core/glibc/glibc.inc index e673707369..ddf0c6b80e 100644 --- a/meta/recipes-core/glibc/glibc.inc +++ b/meta/recipes-core/glibc/glibc.inc | |||
@@ -6,6 +6,15 @@ STAGINGCC = "gcc-cross-initial-${TARGET_ARCH}" | |||
6 | STAGINGCC_class-nativesdk = "gcc-crosssdk-initial-${SDK_SYS}" | 6 | STAGINGCC_class-nativesdk = "gcc-crosssdk-initial-${SDK_SYS}" |
7 | PATH_prepend = "${STAGING_BINDIR_TOOLCHAIN}.${STAGINGCC}:" | 7 | PATH_prepend = "${STAGING_BINDIR_TOOLCHAIN}.${STAGINGCC}:" |
8 | 8 | ||
9 | python () { | ||
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 | } | ||
17 | |||
9 | # siteconfig.bbclass runs configure which needs a working compiler | 18 | # siteconfig.bbclass runs configure which needs a working compiler |
10 | # For the compiler to work we need a working libc yet libc isn't | 19 | # For the compiler to work we need a working libc yet libc isn't |
11 | # in the sysroots directory at this point. This means the libc.so | 20 | # in the sysroots directory at this point. This means the libc.so |