glibc: Fix check for -Os.

The check is supposed to be for -Os, but it's actually testing -O0.

(From OE-Core rev: 32d01a341cac894617d47ab7ebe9485ec3c8ac92)

Signed-off-by: Peter Urbanec <openembedded-devel@urbanec.net>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Peter Urbanec 2015-03-02 15:28:22 +11:00 committed by Richard Purdie
parent 03a357765f
commit ecd052ebf9
1 changed files with 1 additions and 1 deletions

View File

@ -15,7 +15,7 @@ def get_optimization(d):
if bb.utils.contains("SELECTED_OPTIMIZATION", "-O0", "x", "", d) == "x":
bb.note("glibc can't be built with -O0, -O2 will be used instead.")
return selected_optimization.replace("-O0", "-O2")
elif bb.utils.contains("SELECTED_OPTIMIZATION", "-O0", "x", "", d) == "x":
elif bb.utils.contains("SELECTED_OPTIMIZATION", "-Os", "x", "", d) == "x":
bb.note("glibc can't be built with -Os, -Os -Wno-error will be used instead.")
return selected_optimization.replace("-Os", "-Os -Wno-error")
return selected_optimization