mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: "Riese, Marc AVL DiTEST" <Marc.Riese@avl.com>
To: "ptxdist@pengutronix.de" <ptxdist@pengutronix.de>
Subject: [ptxdist] Systemd linker errors with ld.gold
Date: Thu, 21 Jul 2016 09:54:22 +0000	[thread overview]
Message-ID: <97852488a0514d37a9d12ce5e46613e1@ATGRZSW1691.avl01.avlcorp.lan> (raw)

Hi,

When using the latest toolchain OSELAS.Toolchain-2016.06.0 together with ptxdist-2016.07.0, I get a few of the following linker errors when building systemd-230, for example:

  CCLD     udevadm
/opt/OSELAS.Toolchain-2016.06.0/arm-cortexa8-linux-gnueabi/gcc-5.4.0-glibc-2.23-binutils-2.26-kernel-4.6-sanitized/lib/gcc/arm-cortexa8-linux-gnueabi/5.4.0/../../../../arm-cortexa8-linux-gnueabi/bin/ld.gold: error: --copy-dt-needed-entries is not supported but is required for libuuid.so.1 in /home/developer/ptxdist/ptxdist-beaglebone/platform-pengutronix-beagleboneti/sysroot-target/usr/lib/libblkid.so
collect2: error: ld returned 1 exit status
Makefile:13013: recipe for target 'udevadm' failed
make[3]: *** [udevadm] Error 1

It seems that some of the libraries in the sysroot-target have been built with ld.bfd instead, which supports the --copy-dt-needed-entries option. The ld.gold manpage says explicitly, that it doesn't support the --copy-dt-needed-entries option.

So, I'm not sure if this is the best solution, but removing systemd's configure.ac LDFLAG for ld.gold fixed this for me, as it defaults back to ld.bfd instead.
Although I'm still wondering, why systemd would use ld.gold at all, when it doesn't support a required option. If someone has an explanation, that would be appreciated.

Best regards,
Marc


--- a/configure.ac	2016-07-21 10:11:53.250039000 +0200
+++ b/configure.ac	2016-07-21 10:12:14.322039000 +0200
@@ -247,8 +247,7 @@
         -Wl,--no-undefined \
         -Wl,-z,relro \
         -Wl,-z,now \
-        -pie \
-        -Wl,-fuse-ld=gold])
+        -pie])
 AC_SUBST([OUR_LDFLAGS], "$with_ldflags $sanitizer_ldflags")
 
 AC_CHECK_SIZEOF(pid_t)

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

             reply	other threads:[~2016-07-21  9:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-21  9:54 Riese, Marc AVL DiTEST [this message]
2016-07-22 14:43 Riese, Marc AVL DiTEST

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=97852488a0514d37a9d12ce5e46613e1@ATGRZSW1691.avl01.avlcorp.lan \
    --to=marc.riese@avl.com \
    --cc=ptxdist@pengutronix.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox