Your message dated Sun, 27 Nov 2016 14:25:54 +0100
with message-id <9ee717dd-652f-16cd-9f85-a5351b462...@debian.org>
and subject line Re: gcc-6-arm-linux-gnueabihf: cross-compiled code fails to
link on target with native gcc-6
has caused the Debian Bug report #844780,
regarding gcc-6-arm-linux-gnueabihf: cross-compiled code fails to link on
target with native gcc-6
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)
--
844780: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=844780
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: gcc-6-arm-linux-gnueabihf
Version: 6.1.1-9cross1
Severity: important
Dear Maintainer,
If I cross-compile any code (even a basic hello-world) and then attempt
to link the resulting objects on the target system (stretch, armhf)
using the native gcc-6 toolchain (which is 6.2.0 in testing and has
already been for a while) I get the following failure:
/usr/bin/ld: hello.o: relocation R_ARM_THM_MOVW_ABS_NC against `a local symbol'
can not be used when making a shared object; recompile with -fPIC
hello.o: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
Recompiling with -fPIC as suggested does in fact fix the problem, but
this should not be necessary and never has been. (Compiling without it
but linking with the cross-toolchain also results in a working binary.)
Note that cross-compiling + native linking is for example needed to be
able to use distcc to speed up compilation on small ARM systems by
delegating most of the work to a build server, which is how I ran into
this issue. This setup is currently completely broken due to this bug.
-- System Information:
Debian Release: stretch/sid
APT prefers unstable
APT policy: (500, 'unstable'), (100, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 4.8.0-2.1-liquorix-amd64 (SMP w/4 CPU cores; PREEMPT)
Locale: LANG=en_NL.UTF-8, LC_CTYPE=en_NL.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Init: systemd (via /run/systemd/system)
Versions of packages gcc-6-arm-linux-gnueabihf depends on:
ii binutils-arm-linux-gnueabihf 2.27.51.20161108-1
ii cpp-6-arm-linux-gnueabihf 6.1.1-9cross1
ii gcc-6-arm-linux-gnueabihf-base 6.1.1-9cross1
ii libc6 2.24-5
ii libcc1-0 6.2.0-13
ii libgcc-6-dev-armhf-cross 6.1.1-9cross1
ii libgcc1 1:6.2.0-13
ii libgmp10 2:6.1.1+dfsg-1
ii libisl15 0.17.1-1
ii libmpc3 1.0.3-1
ii libmpfr4 3.1.5-1
ii libstdc++6 6.2.0-13
ii zlib1g 1:1.2.8.dfsg-2+b3
Versions of packages gcc-6-arm-linux-gnueabihf recommends:
ii libc6-dev-armhf-cross 2.24-1cross1
Versions of packages gcc-6-arm-linux-gnueabihf suggests:
ii gcc-6-doc 6.1.0-1
pn gcc-6-locales <none>
pn libasan3-dbg-armhf-cross <none>
pn libatomic1-dbg-armhf-cross <none>
pn libcilkrts5-dbg-armhf-cross <none>
pn libgcc1-dbg-armhf-cross <none>
pn libgomp1-dbg-armhf-cross <none>
pn libitm1-dbg-armhf-cross <none>
pn liblsan0-dbg-armhf-cross <none>
pn libmpx2-dbg-armhf-cross <none>
pn libquadmath0-dbg-armhf-cross <none>
pn libtsan0-dbg-armhf-cross <none>
pn libubsan0-dbg-armhf-cross <none>
-- no debconf information
--- End Message ---
--- Begin Message ---
Version: 6.2.1-5cross1
This version now matches the pie defaults.
--- End Message ---