From 441e1dbdc6dac7c7ee4b617e9ee22710f6303f34 Mon Sep 17 00:00:00 2001 From: Antonio Gomes Date: Tue, 3 Feb 2015 15:16:49 -0800 Subject: [PATCH] Use ld gold for all targets on non-tv builds. Patch enables linker gold for all targets on mobile builds, and completely disables it for TV builds. Reason is that TV build environment has the following problems with gold linker: [ 661s] /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 [ 661s] /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 [ 661s] /home/abuild/rpmbuild/BUILD/chromium-efl-40.2214.38.51/build/prebuild/ld: error: DIV usage mismatch between /usr/lib/crtn.o and output This partly merges http://165.213.202.130:8080/#/c/73747/, from Piotr Tworek . Original patch aimed at fixing linking and packaging of binaries larger than 2Gb. As this does not affect yet beta/m40 branch, these specific bits of the patch were not merged. Bug: http://107.108.218.239/bugzilla/show_bug.cgi?id=6629 Reviewed by: KC Park, Piotr Tworek, arno renevier Change-Id: I6cb46c74d4a25047d92ae8f30ec9484befd44699 Signed-off-by: Antonio Gomes --- tizen_src/impl/chromium-efl.gyp | 16 ---------------- tizen_src/impl/chromium-efl.gypi | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/tizen_src/impl/chromium-efl.gyp b/tizen_src/impl/chromium-efl.gyp index fd6e44b63c29..9d87ea0def5a 100644 --- a/tizen_src/impl/chromium-efl.gyp +++ b/tizen_src/impl/chromium-efl.gyp @@ -487,22 +487,6 @@ 'defines': [ 'EWK_BRINGUP=1' ], 'defines!': [ 'TIZEN_CONTENTS_DETECTION=1' ], }], - ['prebuilt_ld_gold_dir!=""', { - 'ldflags': [ - '-B<(prebuilt_ld_gold_dir)', - ], - } , { # prebuild_ld_gold_dir == "" - 'ldflags': [ - # Building the RPM in the GBS chroot fails with errors such as - # [ XXs] error: create archive failed on file //libchromium-efl.so: cpio: Bad magic - # [ XXs] RPM build errors: - # [ XXs] create archive failed on file //libchromium-efl.so: cpio: Bad magic - # For now, work around it by passing a GNU ld-specific flag that optimizes the - # linker for memory usage. - # http://107.108.218.239/bugzilla/show_bug.cgi?id=6457 - '-Wl,--no-keep-memory', - ], - }], ['enable_basic_printing==0 and enable_print_preview==0', { 'sources!': [ 'renderer/print_pages_params.cc', diff --git a/tizen_src/impl/chromium-efl.gypi b/tizen_src/impl/chromium-efl.gypi index 7099731a9118..2c622789b454 100644 --- a/tizen_src/impl/chromium-efl.gypi +++ b/tizen_src/impl/chromium-efl.gypi @@ -173,6 +173,22 @@ ['building_for_tizen_tv==1', { 'defines': ['OS_TIZEN_TV=1'], }], + ['prebuilt_ld_gold_dir!="" and building_for_tizen_tv==0', { + 'ldflags': [ + '-B<(prebuilt_ld_gold_dir)', + ], + } , { # prebuild_ld_gold_dir == "" + 'ldflags': [ + # Building the RPM in the GBS chroot fails with errors such as + # [ XXs] error: create archive failed on file //libchromium-efl.so: cpio: Bad magic + # [ XXs] RPM build errors: + # [ XXs] create archive failed on file //libchromium-efl.so: cpio: Bad magic + # For now, work around it by passing a GNU ld-specific flag that optimizes the + # linker for memory usage. + # http://107.108.218.239/bugzilla/show_bug.cgi?id=6457 + '-Wl,--no-keep-memory', + ], + }], ['host_arch=="arm"', { 'target_conditions': [ ['_toolset=="host"', { -- 2.34.1