[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#803474: src:systemd: Please use the default linker instead of gold on sparc64

On 10/30/2015 01:59 PM, John Paul Adrian Glaubitz wrote:
> Could you please change the build system (e.g. rules file) such that it uses
> ld/bfd on *both* sparc *and* sparc64 (we are planning to ressurrect sparc
> in the future)?

More specific, please re-apply this patch [1] and extend it for sparc64
as well:

diff --git a/debian/rules b/debian/rules
index f7effa5..78074ff 100755
--- a/debian/rules
+++ b/debian/rules
@@ -10,6 +10,13 @@ ifneq (,$(findstring stage1,$(DEB_BUILD_PROFILES)))
 BOOTSTRAP_DH_FLAGS := -Ngir1.2-gudev-1.0 -Nlibgudev-1.0-0

+# sparc/sparc64 must use the bfd linker since gold will
+# will result in broken shared libraries
+ifneq ($(findstring $(DEB_BUILD_ARCH), sparc sparc64),)
+    LD=ld
 	--with-rootprefix= \
 	--with-rootlibdir=/lib/$(DEB_HOST_MULTIARCH) \

This patch was dropped when gudev was removed from systemd upstream
assuming that linking with gold would affect gudev only. However,
it affects linking against libsystemd and libudev in general,
for example usbutils [2]:

/bin/bash ../libtool  --tag=CC   --mode=link gcc  -Os -Wall -g -O2
-fstack-protector-strong -Wformat -Werror=format-security
-I/usr/include/libusb-1.0   -Wl,-z,relro -o usbhid-dump usbhid-dump.o
../lib/libuhd.la -lusb-1.0
libtool: link: gcc -Os -Wall -g -O2 -fstack-protector-strong -Wformat
-Werror=format-security -I/usr/include/libusb-1.0 -Wl,-z -Wl,relro -o
usbhid-dump usbhid-dump.o  ../lib/.libs/libuhd.a -lusb-1.0
/usr/bin/ld: //lib/sparc64-linux-gnu/libudev.so.1: Only registers
%g[2367] can be declared using STT_REGISTER
//lib/sparc64-linux-gnu/libudev.so.1: error adding symbols: No such file
or directory
collect2: error: ld returned 1 exit status



> [1]
> [2]
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaubitz@debian.org
`. `'   Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

Reply to: