[OE-core] [PATCH 2/4] base/bbclass: disallow appending the compile options in debugging info

Khem Raj raj.khem at gmail.com
Wed Jan 27 19:20:25 UTC 2016


On Wed, Jan 27, 2016 at 3:45 AM, Hongxu Jia <hongxu.jia at windriver.com> wrote:
> In order to drop TMPDIR in debugging info, add option '-gno-record-gcc-switches'
> to disallow appending the compile options to the DW_AT_producer attribute in
> DWARF debugging information.

this is vital information when debugging field issues. What is the
purpose of this ?

>
> Compile with '-fdebug-prefix-map':
> objdump -g packages-split/lib32-glibc-dev/usr/lib/gcrt1.o
> ...
> | <0><5e>: Abbrev Number: 1 (DW_TAG_compile_unit)
> |    <5f>   DW_AT_producer    : (indirect string, offset: 0xbb): GNU C99 5.3.0 -m32
> -march=core2 -mtune=core2 -msse3 -mfpmath=sse -mpreferred-stack-boundary=4 -g -O2
> -std=gnu99 -fgnu89-inline -fdebug-prefix-map=/buildarea/raid0/hjia/build-20160119-
> yocto-buildpath/tmp/work/core2-32-pokymllib32-linux/lib32-glibc/2.22-r0/git=/usr/src/glibc
> -feliminate-unused-debug-types -fmerge-all-constants -frounding-math -ftls-model=initial-exec
> |    <64>   DW_AT_name        : (indirect string, offset: 0xb9): init.c
> |    <68>   DW_AT_comp_dir    : (indirect string, offset: 0x60): /usr/src/glibc/csu
> ...
>
> Compile with '-gno-record-gcc-switches' and '-fdebug-prefix-map':
> objdump -g packages-split/lib32-glibc-dev/usr/lib/gcrt1.o
> ...
> |    <5f>   DW_AT_producer    : (indirect string, offset: 0x1b): GNU C99 5.3.0
> |    <64>   DW_AT_name        : (indirect string, offset: 0xb9): init.c
> |    <68>   DW_AT_comp_dir    : (indirect string, offset: 0x6e): /usr/src/glibc/csu
> ...
>
> [YOCTO #7058]
>
> Signed-off-by: Hongxu Jia <hongxu.jia at windriver.com>
> ---
>  meta/classes/base.bbclass | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
> index 3159587..e05552c 100644
> --- a/meta/classes/base.bbclass
> +++ b/meta/classes/base.bbclass
> @@ -91,6 +91,7 @@ def debug_prefix_map(d):
>          buildsrc = d.getVar("S", True)
>          targetsrc = "/usr/src/%s" % d.getVar("BPN", True)
>          opts += " -fdebug-prefix-map=%s=%s" % (buildsrc, targetsrc)
> +        opts += " -gno-record-gcc-switches"
>      return opts
>
>  TARGET_CFLAGS += "${@debug_prefix_map(d)}"
> --
> 1.9.1
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core at lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core



More information about the Openembedded-core mailing list