* [PATCH 1/2] Revert "eglibc: always compile with optimization."
2012-11-28 6:11 [PATCH 0/2] eglibc: move the fix code for optimization isssue to .inc jackie.huang
@ 2012-11-28 6:11 ` jackie.huang
2012-11-28 6:11 ` [PATCH 2/2] eglibc: always compile with optimization jackie.huang
2012-11-28 7:42 ` [PATCH 0/2] eglibc: move the fix code for optimization isssue to .inc Richard Purdie
2 siblings, 0 replies; 4+ messages in thread
From: jackie.huang @ 2012-11-28 6:11 UTC (permalink / raw)
To: openembedded-core; +Cc: Jackie.Huang, saul.wold
From: Jackie Huang <jackie.huang@windriver.com>
This reverts commit 9ca1c6120fad5dcae1694e8e37331c1b903f1fd0.
The fix is not version specific, so revert it and move the
fix code to the .inc in the following commit.
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
---
meta/recipes-core/eglibc/eglibc_2.16.bb | 11 -----------
1 files changed, 0 insertions(+), 11 deletions(-)
diff --git a/meta/recipes-core/eglibc/eglibc_2.16.bb b/meta/recipes-core/eglibc/eglibc_2.16.bb
index 71bcc30..aa9256c 100644
--- a/meta/recipes-core/eglibc/eglibc_2.16.bb
+++ b/meta/recipes-core/eglibc/eglibc_2.16.bb
@@ -87,17 +87,6 @@ EXTRA_OECONF = "--enable-kernel=${OLDEST_KERNEL} \
EXTRA_OECONF += "${@get_libc_fpu_setting(bb, d)}"
-# eglibc can't be built without optimization, if someone tries to compile an
-# entire image as -O0, we override it with -O2 here and give a note about it.
-def get_optimization(d):
- selected_optimization = d.getVar("SELECTED_OPTIMIZATION", True)
- if base_contains("SELECTED_OPTIMIZATION", "-O0", "x", "", d) == "x":
- bb.note("eglibc can't be built with -O0, -O2 will be used instead.")
- return selected_optimization.replace("-O0", "-O2")
- return selected_optimization
-
-SELECTED_OPTIMIZATION := "${@get_optimization(d)}"
-
do_unpack_append() {
bb.build.exec_func('do_move_ports', d)
}
--
1.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread* [PATCH 2/2] eglibc: always compile with optimization.
2012-11-28 6:11 [PATCH 0/2] eglibc: move the fix code for optimization isssue to .inc jackie.huang
2012-11-28 6:11 ` [PATCH 1/2] Revert "eglibc: always compile with optimization." jackie.huang
@ 2012-11-28 6:11 ` jackie.huang
2012-11-28 7:42 ` [PATCH 0/2] eglibc: move the fix code for optimization isssue to .inc Richard Purdie
2 siblings, 0 replies; 4+ messages in thread
From: jackie.huang @ 2012-11-28 6:11 UTC (permalink / raw)
To: openembedded-core; +Cc: Jackie.Huang, saul.wold
From: Jackie Huang <jackie.huang@windriver.com>
eglibc fails to compile if someone tries to compile an entire image as -O0:
error "glibc cannot be compiled without optimization"
so in this case, force to use -O2 and give a note about it.
[YOCTO #3405]
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
---
meta/recipes-core/eglibc/eglibc.inc | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/meta/recipes-core/eglibc/eglibc.inc b/meta/recipes-core/eglibc/eglibc.inc
index 3d136bf..1e04197 100644
--- a/meta/recipes-core/eglibc/eglibc.inc
+++ b/meta/recipes-core/eglibc/eglibc.inc
@@ -8,6 +8,17 @@ PATH_prepend = "${STAGING_BINDIR_TOOLCHAIN}.${STAGINGCC}:"
TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_TCBOOTSTRAP}"
+# eglibc can't be built without optimization, if someone tries to compile an
+# entire image as -O0, we override it with -O2 here and give a note about it.
+def get_optimization(d):
+ selected_optimization = d.getVar("SELECTED_OPTIMIZATION", True)
+ if base_contains("SELECTED_OPTIMIZATION", "-O0", "x", "", d) == "x":
+ bb.note("eglibc can't be built with -O0, -O2 will be used instead.")
+ return selected_optimization.replace("-O0", "-O2")
+ return selected_optimization
+
+SELECTED_OPTIMIZATION := "${@get_optimization(d)}"
+
# siteconfig.bbclass runs configure which needs a working compiler
# For the compiler to work we need a working libc yet libc isn't
# in the sysroots directory at this point. This means the libc.so
--
1.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH 0/2] eglibc: move the fix code for optimization isssue to .inc
2012-11-28 6:11 [PATCH 0/2] eglibc: move the fix code for optimization isssue to .inc jackie.huang
2012-11-28 6:11 ` [PATCH 1/2] Revert "eglibc: always compile with optimization." jackie.huang
2012-11-28 6:11 ` [PATCH 2/2] eglibc: always compile with optimization jackie.huang
@ 2012-11-28 7:42 ` Richard Purdie
2 siblings, 0 replies; 4+ messages in thread
From: Richard Purdie @ 2012-11-28 7:42 UTC (permalink / raw)
To: jackie.huang; +Cc: saul.wold, openembedded-core
On Wed, 2012-11-28 at 14:11 +0800, jackie.huang@windriver.com wrote:
> From: Jackie Huang <jackie.huang@windriver.com>
>
> I made a patch against the eglibc_2.16.bb for the optimization issue two weeks ago,
> but it's not a version specific issue and we still keep the versions 2.13 and 2.15
> (and not having the 2.16 yet), so it would be more appropriate to move the code to
> the .inc file.
> And we also want to cherry-pick this commit to our oe-core branch so I revert the
> previous one and make a new commit against the .inc file but I'm not sure if it is
> proper to do that. Please correct me if it is not, thanks!
>
> * Test info:
> 1) MACHINE=qemux86-64/qemuppc/qemumips
> $ bitbake core-image-sato
> $ bitbake eglibc
>
> 2) MACHINE=qemux86-64/qemuppc/qemumips
> DEBUG_OPTIMIZATION = "-O0 -fno-omit-frame-pointer ${DEBUG_FLAGS} -pipe"
> DEBUG_BUILD = "1" or SELECTED_OPTIMIZATION = "${DEBUG_OPTIMIZATION}"
> $ bitbake core-image-sato
> $ bitbake eglibc
>
> The following changes since commit 764cc1eb3043c84121f597d2271108b91052095e:
>
> bitbake.conf: Change build output message to list BUILD_SYS, TARGET_SYS and NATIVELSBSTRING (2012-11-27 08:57:39 +0000)
>
> are available in the git repository at:
> git://git.pokylinux.org/poky-contrib jhuang0/d_eglibc_1128_1
> http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=jhuang0/d_eglibc_1128_1
>
> Jackie Huang (2):
> Revert "eglibc: always compile with optimization."
> eglibc: always compile with optimization.
I've queued this on master-next. I changed it from two commits to one
commit which just moves the code for the reason you describe.
Cheers,
Richard
^ permalink raw reply [flat|nested] 4+ messages in thread