[M40][Tizen3.0]Enabling gold linker for hawk-p TV target
authorAntonio Gomes <a1.gomes@samsung.com>
Thu, 12 Feb 2015 23:35:39 +0000 (15:35 -0800)
committerYoungsoo Choi <kenshin.choi@samsung.com>
Tue, 10 Jul 2018 06:57:09 +0000 (06:57 +0000)
commita814377e3d1fbdf3d0fc2f71a99477b6c1c02b0c
treecf926e963001df42aae07c8c6cea67c53b27d95a
parenteda52fc3af318c8dde6f2c3ff90e52fcbcf49cff
[M40][Tizen3.0]Enabling gold linker for hawk-p TV target

Recently TV builds started suffering from the following
problem:

[  XXs] /home/abuild/rpmbuild/BUILD/chromium-efl-40.2214.38.51/build/prebuild/ld:
error: DIV usage mismatch between //usr/lib/libc_nonshared.a(atexit.oS) and output
[  XXs] /home/abuild/rpmbuild/BUILD/chromium-efl-40.2214.38.51/build/prebuild/ld:
error: DIV usage mismatch between /usr/lib/gcc/armv7l-tizen-linux-gnueabi/4.8.3/crtendS.o and output
[  XXs] /home/abuild/rpmbuild/BUILD/chromium-efl-40.2214.38.51/build/prebuild/ld:
error: DIV usage mismatch between /usr/lib/crtn.o and output

The above problem is explained in details here [1] and fixed in
gold linker itself, released as part of binutils-2.24 [2].

However, our current bundled linker gold binary (in build/prebuild)
built by Viatcheslav Ostapenko was based on binutils-2.23 [3].
Patch fixes the problem by rebuilding linker gold from [1]
and enabling it for TV builds.

[1] https://sourceware.org/ml/binutils/2012-12/msg00202.html
[2] http://ftp.gnu.org/gnu/binutils/binutils-2.24.tar.gz
[3] http://ftp.gnu.org/gnu/binutils/binutils-2.23.2.tar.gz

Patch also work arounds a Tizen 3.0 GBS QEMU problem that was causing
the following issue with linker gold:

[ XXs] eu-strip: while writing '<path>/<package>/<binary>': cannot write data to file

Problem is reported in various places, including [4], [5] and [6].
The solution applied to Tizen public requires to patch QEMU [7].
Until our Tizen 3.x QEMU is fixed, we use a home made x64 bit statically
linked eu-strip, so that we can link with gold.

[4] https://bugzilla.redhat.com/show_bug.cgi?id=1174267
[5] http://lists.gnu.org/archive/html/qemu-devel/2014-12/msg02702.html
[6] http://bit.ly/1E8W1Uo
[7] https://review.tizen.org/gerrit/#/c/32365/

Bug: http://web.sec.samsung.net/bugzilla/show_bug.cgi?id=10967
Reviewed by: Antonio Gomes, KC Park, Piotr Tworek

Change-Id: Ifd5cb31b1fa6d67eac633e371574c8bbd715f492
Signed-off-by: Antonio Gomes <a1.gomes@samsung.com>
tizen_src/build/prebuild/ld.gold.static
tizen_src/build/prebuild/tizen_3.0/eu-strip [new file with mode: 0755]
tizen_src/impl/chromium-efl.gypi
tizen_src/packaging/chromium-efl.spec