Use ld gold for all targets on non-tv builds.
authorAntonio Gomes <a1.gomes@samsung.com>
Tue, 3 Feb 2015 23:16:49 +0000 (15:16 -0800)
committerYoungsoo Choi <kenshin.choi@samsung.com>
Tue, 10 Jul 2018 06:57:09 +0000 (06:57 +0000)
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 <p.tworek@samsung.com>.
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 <a1.gomes@samsung.com>
tizen_src/impl/chromium-efl.gyp
tizen_src/impl/chromium-efl.gypi

index fd6e44b63c2996f5104f580c65e0a9740ae96025..9d87ea0def5a26d3d74de5ed59d37792ead493ee 100644 (file)
         '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 /<path>/libchromium-efl.so: cpio: Bad magic
-          # [  XXs] RPM build errors:
-          # [  XXs]     create archive failed on file /<path>/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',
index 7099731a911828a851e30f447f9750099c517ca5..2c622789b45426f2fb582d0b0c525733d8230dcc 100644 (file)
       ['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 /<path>/libchromium-efl.so: cpio: Bad magic
+          # [  XXs] RPM build errors:
+          # [  XXs]     create archive failed on file /<path>/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"', {