All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Khem Raj" <raj.khem@gmail.com>
To: Tony Battersby <tonyb@cybernetics.com>,
	openembedded-core@lists.openembedded.org
Cc: randy.macleod@windriver.com
Subject: Re: [OE-core] [master][PATCH 3/4] bitbake.conf: add DEBUG_PREFIX_MAP to TARGET_LDFLAGS
Date: Tue, 27 Jul 2021 10:58:35 -0700	[thread overview]
Message-ID: <7927ac56-e5ad-1276-e9d0-38392ad93bb7@gmail.com> (raw)
In-Reply-To: <30028597-3dcb-cbe2-f7a7-54b0e7bd8e1f@cybernetics.com>



On 7/27/21 6:36 AM, Tony Battersby wrote:
> -f*-prefix-map flags are required when linking with LTO enabled to make
> the output binary reproducible.
> 
> See discussion here:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101473
> 
> [YOCTO #14481]
> 

Looks ok

> Signed-off-by: Tony Battersby <tonyb@cybernetics.com>
> ---
> 
> /usr/sbin/lspci from pciutils is a good program to test that shows how
> adding -f*-prefix-map to LDFLAGS makes a program binary reproducible
> with LTO enabled.
> 
>   meta/conf/bitbake.conf | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
> index 160abf40ee..c0d2e3f82f 100644
> --- a/meta/conf/bitbake.conf
> +++ b/meta/conf/bitbake.conf
> @@ -595,7 +595,7 @@ TARGET_LINK_HASH_STYLE ?= "${@['-Wl,--hash-style=gnu',''][d.getVar('LINKER_HASH_
>   ASNEEDED ?= "-Wl,--as-needed"
>   
>   export LDFLAGS = "${TARGET_LDFLAGS}"
> -TARGET_LDFLAGS = "-Wl,-O1 ${TARGET_LINK_HASH_STYLE} ${ASNEEDED}"
> +TARGET_LDFLAGS = "-Wl,-O1 ${TARGET_LINK_HASH_STYLE} ${ASNEEDED} ${DEBUG_PREFIX_MAP}"
>   # mips does not support GNU hash style therefore we override
>   LINKER_HASH_STYLE_mipsarch_libc-musl = "sysv"
>   
> 
> 
> 
> 
> 

  reply	other threads:[~2021-07-27 17:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-27 13:36 [master][PATCH 3/4] bitbake.conf: add DEBUG_PREFIX_MAP to TARGET_LDFLAGS Tony Battersby
2021-07-27 17:58 ` Khem Raj [this message]
2021-08-05 16:00 ` [OE-core] " Richard Purdie
     [not found] ` <1698745FB6BE4CCB.3515@lists.openembedded.org>
2021-08-05 16:59   ` Richard Purdie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7927ac56-e5ad-1276-e9d0-38392ad93bb7@gmail.com \
    --to=raj.khem@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=randy.macleod@windriver.com \
    --cc=tonyb@cybernetics.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.