Re: [systemd-devel] [RFC 25/25] add -z muldefs to linker flags

2014-09-19 Thread Michael Biebl
2014-09-19 0:34 GMT+02:00 David Herrmann dh.herrm...@gmail.com:
  -Wl,-fuse-ld=gold])

The reason to use gold  was that the compat libraries require the
ifunc functionality.

This is no longer the case, so I'd suggest to not override the default
linker and simply use the system default one.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [RFC 25/25] add -z muldefs to linker flags

2014-09-19 Thread Emil Renner Berthing
On 19 September 2014 08:42, Michael Biebl mbi...@gmail.com wrote:
 2014-09-19 0:34 GMT+02:00 David Herrmann dh.herrm...@gmail.com:
  -Wl,-fuse-ld=gold])

 The reason to use gold  was that the compat libraries require the
 ifunc functionality.

 This is no longer the case, so I'd suggest to not override the default
 linker and simply use the system default one.

Hi, thanks for looking at this.

This is the error I get when compiling the latest systemd from git,
but with that line from configure.ac removed, so it doesn't use gold
to link:

http://sprunge.us/LWiH

I didn't look into why those functions are defined multiple times yet,
but I thought I'd post this early.

/Emil
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [RFC 25/25] add -z muldefs to linker flags

2014-09-19 Thread Dan Horák
On Fri, 19 Sep 2014 11:24:14 +0200
Emil Renner Berthing syst...@esmil.dk wrote:

 On 19 September 2014 08:42, Michael Biebl mbi...@gmail.com wrote:
  2014-09-19 0:34 GMT+02:00 David Herrmann dh.herrm...@gmail.com:
   -Wl,-fuse-ld=gold])
 
  The reason to use gold  was that the compat libraries require the
  ifunc functionality.
 
  This is no longer the case, so I'd suggest to not override the
  default linker and simply use the system default one.
 
 Hi, thanks for looking at this.
 
 This is the error I get when compiling the latest systemd from git,
 but with that line from configure.ac removed, so it doesn't use gold
 to link:
 
 http://sprunge.us/LWiH
 
 I didn't look into why those functions are defined multiple times yet,
 but I thought I'd post this early.

there was a bug in binutils causing linking problems with systemd for
LTO + ifunc when using ld.bfd instead of gold, see
http://pkgs.fedoraproject.org/cgit/binutils.git/commit/?id=d7c31854e82903e663df160ad4c26c938eca4b59


Dan
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [RFC 25/25] add -z muldefs to linker flags

2014-09-19 Thread Michael Biebl
2014-09-19 11:31 GMT+02:00 Dan Horák d...@danny.cz:
 On Fri, 19 Sep 2014 11:24:14 +0200
 Emil Renner Berthing syst...@esmil.dk wrote:

 On 19 September 2014 08:42, Michael Biebl mbi...@gmail.com wrote:
  2014-09-19 0:34 GMT+02:00 David Herrmann dh.herrm...@gmail.com:
   -Wl,-fuse-ld=gold])
 
  The reason to use gold  was that the compat libraries require the
  ifunc functionality.
 
  This is no longer the case, so I'd suggest to not override the
  default linker and simply use the system default one.

 Hi, thanks for looking at this.

 This is the error I get when compiling the latest systemd from git,
 but with that line from configure.ac removed, so it doesn't use gold
 to link:

 http://sprunge.us/LWiH

 I didn't look into why those functions are defined multiple times yet,
 but I thought I'd post this early.

 there was a bug in binutils causing linking problems with systemd for
 LTO + ifunc when using ld.bfd instead of gold, see
 http://pkgs.fedoraproject.org/cgit/binutils.git/commit/?id=d7c31854e82903e663df160ad4c26c938eca4b59

Right, but we no longer usce ifunc, so we no longer need to override
the default linker.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] [RFC 25/25] add -z muldefs to linker flags

2014-09-18 Thread Emil Renner Berthing
In case we don't have the new gold linker,
linking with ld fails without this option.
---
 configure.ac | 1 +
 1 file changed, 1 insertion(+)

diff --git a/configure.ac b/configure.ac
index 3f17833..4be6e08 100644
--- a/configure.ac
+++ b/configure.ac
@@ -216,6 +216,7 @@ CC_CHECK_FLAGS_APPEND([with_ldflags], [LDFLAGS], [\
 -Wl,--gc-sections \
 -Wl,-z,relro \
 -Wl,-z,now \
+-Wl,-z,muldefs \
 -pie \
 -Wl,-fuse-ld=gold])
 AC_SUBST([OUR_LDFLAGS], $with_ldflags $sanitizer_ldflags)
-- 
2.1.0

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [RFC 25/25] add -z muldefs to linker flags

2014-09-18 Thread David Herrmann
Hi

On Thu, Sep 18, 2014 at 3:25 PM, Emil Renner Berthing syst...@esmil.dk wrote:
 In case we don't have the new gold linker,
 linking with ld fails without this option.
 ---
  configure.ac | 1 +
  1 file changed, 1 insertion(+)

 diff --git a/configure.ac b/configure.ac
 index 3f17833..4be6e08 100644
 --- a/configure.ac
 +++ b/configure.ac
 @@ -216,6 +216,7 @@ CC_CHECK_FLAGS_APPEND([with_ldflags], [LDFLAGS], [\
  -Wl,--gc-sections \
  -Wl,-z,relro \
  -Wl,-z,now \
 +-Wl,-z,muldefs \

Where exactly is that needed? I don't think this is the right fix. We
avoid multiple definitions wherever we can, so please either include
the culprit in the commit-message or fix them directly.

Thanks
David

  -pie \
  -Wl,-fuse-ld=gold])
  AC_SUBST([OUR_LDFLAGS], $with_ldflags $sanitizer_ldflags)
 --
 2.1.0

 ___
 systemd-devel mailing list
 systemd-devel@lists.freedesktop.org
 http://lists.freedesktop.org/mailman/listinfo/systemd-devel
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel