<div><div dir="auto">What's the link to upstream bug in linker </div><br><div class="gmail_quote"><div>On Thu, Jun 22, 2017 at 12:34 AM Randy MacLeod <<a href="mailto:randy.macleod@windriver.com">randy.macleod@windriver.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Merge if you like or wait for the real fix to binutils.<br>
<br>
This bug has been around for more than a week<br>
since the binutils upgrade was merged and<br>
no one else seems to have noticed so it doesn't<br>
seem urgent.<br>
<br>
I needed the work-around to keep our auto-builders happy.<br>
Oh and I did basic sanity testing to show that booting<br>
and systemctl status works on qemuppc.<br>
<br>
../Randy<br>
<br>
On 2017-06-21 10:14 PM, Randy MacLeod wrote:<br>
> If you enable systemd and build for qemuppc, then the<br>
> compile of systemd fails due to a gold linker failure:<br>
><br>
> .../powerpc-oe-linux-ld.gold:<br>
> error: invalid STB_LOCAL symbol in external symbols<br>
> error: linker defined: multiple definition of '00000001.plt_call.memcpy+8000'<br>
> command line: previous definition here<br>
><br>
> A git bisect confirms that the commit:<br>
> 0b0f545 binutils-2.28: Update to latest on release branch<br>
> is the problem. This is only known to affect powerpc machines.<br>
><br>
> Work-around this for powerpc by getting configure to use<br>
> the bfd linker rather than the gold linker.<br>
><br>
> This unblocks powerpc use until the linker bug can be resolved.<br>
><br>
> Signed-off-by: Randy MacLeod <<a href="mailto:Randy.MacLeod@windriver.com" target="_blank">Randy.MacLeod@windriver.com</a>><br>
> ---<br>
> .../systemd/systemd/systemd-drop-gold-use-bfd.patch | 19 +++++++++++++++++++<br>
> meta/recipes-core/systemd/<a href="http://systemd_232.bb" rel="noreferrer" target="_blank">systemd_232.bb</a> | 2 ++<br>
> 2 files changed, 21 insertions(+)<br>
> create mode 100644 meta/recipes-core/systemd/systemd/systemd-drop-gold-use-bfd.patch<br>
><br>
> diff --git a/meta/recipes-core/systemd/systemd/systemd-drop-gold-use-bfd.patch b/meta/recipes-core/systemd/systemd/systemd-drop-gold-use-bfd.patch<br>
> new file mode 100644<br>
> index 0000000..e0eb0bd<br>
> --- /dev/null<br>
> +++ b/meta/recipes-core/systemd/systemd/systemd-drop-gold-use-bfd.patch<br>
> @@ -0,0 +1,19 @@<br>
> +Upstream-Status: Inappropriate [other]<br>
> +<br>
> +The patch is not appropriate for upstream since it's a temporary<br>
> +work-around for only ppc arches. Once the binutils defect in the<br>
> +gold linker is resolved, this patch can be dropped.<br>
> +<br>
> +Signed-off-by: Randy MacLeod <<a href="mailto:Randy.MacLeod@windriver.com" target="_blank">Randy.MacLeod@windriver.com</a>><br>
> +<br>
> +--- a/<a href="http://configure.ac" rel="noreferrer" target="_blank">configure.ac</a><br>
> ++++ b/<a href="http://configure.ac" rel="noreferrer" target="_blank">configure.ac</a><br>
> +@@ -260,7 +260,7 @@<br>
> + -Wl,-z,relro \<br>
> + -Wl,-z,now \<br>
> + -pie \<br>
> +- -Wl,-fuse-ld=gold])<br>
> ++ -Wl,-fuse-ld=bfd])<br>
> + AC_SUBST([OUR_LDFLAGS], "$with_ldflags $sanitizer_ldflags")<br>
> +<br>
> + AC_CHECK_SIZEOF(pid_t)<br>
> diff --git a/meta/recipes-core/systemd/<a href="http://systemd_232.bb" rel="noreferrer" target="_blank">systemd_232.bb</a> b/meta/recipes-core/systemd/<a href="http://systemd_232.bb" rel="noreferrer" target="_blank">systemd_232.bb</a><br>
> index 1007360..1e8dffe 100644<br>
> --- a/meta/recipes-core/systemd/<a href="http://systemd_232.bb" rel="noreferrer" target="_blank">systemd_232.bb</a><br>
> +++ b/meta/recipes-core/systemd/<a href="http://systemd_232.bb" rel="noreferrer" target="_blank">systemd_232.bb</a><br>
> @@ -41,6 +41,8 @@ SRC_URI_append_libc-uclibc = "\<br>
> "<br>
> SRC_URI_append_qemuall = " file://0001-core-device.c-Change-the-default-device-timeout-to-2.patch"<br>
><br>
> +SRC_URI_append_powerpc = " file://systemd-drop-gold-use-bfd.patch"<br>
> +<br>
> PACKAGECONFIG ??= "xz \<br>
> ${@bb.utils.filter('DISTRO_FEATURES', 'efi pam selinux ldconfig', d)} \<br>
> ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xkbcommon', '', d)} \<br>
><br>
<br>
<br>
--<br>
# Randy MacLeod. SMTS, Linux, Wind River<br>
Direct: 613.963.1350 | 350 Terry Fox Drive, Suite 200, Ottawa, ON,<br>
Canada, K2K 2W5<br>
--<br>
_______________________________________________<br>
Openembedded-core mailing list<br>
<a href="mailto:Openembedded-core@lists.openembedded.org" target="_blank">Openembedded-core@lists.openembedded.org</a><br>
<a href="http://lists.openembedded.org/mailman/listinfo/openembedded-core" rel="noreferrer" target="_blank">http://lists.openembedded.org/mailman/listinfo/openembedded-core</a><br>
</blockquote></div></div>