]> code.ossystems Code Review - openembedded-core.git/commitdiff
bitbake.conf: add DEBUG_PREFIX_MAP to TARGET_LDFLAGS
authorTony Battersby <tonyb@cybernetics.com>
Tue, 27 Jul 2021 13:36:53 +0000 (09:36 -0400)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 12 Aug 2021 05:21:55 +0000 (06:21 +0100)
-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]

Signed-off-by: Tony Battersby <tonyb@cybernetics.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/conf/bitbake.conf

index 1d5f5b7fcd73708b35f9b721f28d8a6f57141ce5..afb82eb370744c3ada2d83a5fca054eca1cb06c5 100644 (file)
@@ -597,7 +597,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"