Bug 3405

Summary: eglibc: do_compile failed with #error "glibc cannot be compiled without optimization"
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Jackie Huang <jackie.huang>
Component: coreAssignee: Jackie Huang <jackie.huang>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: corneliux.stoicescu, jessica.zhang, meta.mr.watcher, meta.watcher
Version: 1.4   
Target Milestone: 1.4 M1   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---

Description Jackie Huang 2012-11-12 02:44:29 UTC
eglibc: do_compile failed with #error "glibc cannot be compiled without optimization" when -O0 is used to compile.

Steps to reproduce:
1. Add the following in local.conf
DEBUG_OPTIMIZATION = "-O0 -fno-omit-frame-pointer ${DEBUG_FLAGS} -pipe"
SELECTED_OPTIMIZATION = "${DEBUG_OPTIMIZATION}"

2. bitbake eglibc


error logs:
===========
| In file included from ./../include/libc-symbols.h:52:0,
|                  from <command-line>:0:
| /buildarea1/jhuang0/yocto/p_x64_1016/tmp/work/x86_64-poky-linux/eglibc-initial-2.16-r14+svnr20393/build-x86_64-poky-linux/config.h:4:3: error: #error "glibc cannot be comp
iled without optimization"
| In file included from ./../include/libc-symbols.h:52:0,
|                  from <command-line>:0:
| /buildarea1/jhuang0/yocto/p_x64_1016/tmp/work/x86_64-poky-linux/eglibc-initial-2.16-r14+svnr20393/build-x86_64-poky-linux/config.h:4:3: error: #error "glibc cannot be compiled without optimization"
Comment 1 Jackie Huang 2012-11-14 08:54:49 UTC
(In reply to comment #0)
> eglibc: do_compile failed with #error "glibc cannot be compiled without
> optimization" when -O0 is used to compile.
> 
> Steps to reproduce:
> 1. Add the following in local.conf
> DEBUG_OPTIMIZATION = "-O0 -fno-omit-frame-pointer ${DEBUG_FLAGS} -pipe"
> SELECTED_OPTIMIZATION = "${DEBUG_OPTIMIZATION}"

or
DEBUG_OPTIMIZATION = "-O0 -fno-omit-frame-pointer ${DEBUG_FLAGS} -pipe"
DEBUG_BUILD = "1"

> 
> 2. bitbake eglibc
>
Comment 3 Stoicescu Cornel 2013-01-07 16:33:16 UTC
eglibc builds fine with the mentioned lines in local.conf

Verified in master: 5b658729eff73963262dda4d6c683fdd023b8d04