<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>138840</bug_id>
          
          <creation_ts>2014-11-18 11:39:03 -0800</creation_ts>
          <short_desc>Incorrect detection of toolchain support for Cortex-A53 erratum 835769 workaround</short_desc>
          <delta_ts>2015-04-29 04:21:03 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Tools / Tests</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Akos Kiss">akiss</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>berto</cc>
    
    <cc>commit-queue</cc>
    
    <cc>ossy</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1049543</commentid>
    <comment_count>0</comment_count>
    <who name="Akos Kiss">akiss</who>
    <bug_when>2014-11-18 11:39:03 -0800</bug_when>
    <thetext>If the compiler already implements the workaround for the erratum but the linker still does not, the build fails with 
/usr/bin/ld: unrecognized option &apos;--fix-cortex-a53-835769&apos;

The current code in OptionsCommon.cmake only checks for the compilation to work but does not try to link.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1049545</commentid>
    <comment_count>1</comment_count>
      <attachid>241797</attachid>
    <who name="Akos Kiss">akiss</who>
    <bug_when>2014-11-18 11:46:31 -0800</bug_when>
    <thetext>Created attachment 241797
Proposed patch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1049741</commentid>
    <comment_count>2</comment_count>
      <attachid>241797</attachid>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2014-11-19 00:26:52 -0800</bug_when>
    <thetext>Comment on attachment 241797
Proposed patch.

r=me</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1049744</commentid>
    <comment_count>3</comment_count>
      <attachid>241797</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2014-11-19 01:06:28 -0800</bug_when>
    <thetext>Comment on attachment 241797
Proposed patch.

Clearing flags on attachment: 241797

Committed r176314: &lt;http://trac.webkit.org/changeset/176314&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1049745</commentid>
    <comment_count>4</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2014-11-19 01:06:43 -0800</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1089919</commentid>
    <comment_count>5</comment_count>
    <who name="Alberto Garcia">berto</who>
    <bug_when>2015-04-29 00:51:45 -0700</bug_when>
    <thetext>This fails in Debian, likely because of the -fuse-ld=gold flag:

/usr/bin/c++   -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -Wall -DENABLE_YARR_JIT=0 -DENABLE_ASSEMBLER=0 -DNDEBUG  -std=c++11 -mfix-cortex-a53-835769  -fno-exceptions -fno-strict-aliasing -fno-rtti   -Wl,-z,relro -Wl,--as-needed -fuse-ld=gold -Wl,--disable-new-dtags CMakeFiles/LLIntOffsetsExtractor.dir/llint/LLIntOffsetsExtractor.cpp.o  -o ../../bin/LLIntOffsetsExtractor -rdynamic ../../lib/libWTFGTK.a -ldl ../../lib/libbmalloc.a -licui18n -licuuc -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lpthread -lz
/usr/bin/ld.gold: --fix-cortex-a53-835769: unknown option
/usr/bin/ld.gold: use the --help option for usage information
collect2: error: ld returned 1 exit status

Full log here:

https://buildd.debian.org/status/fetch.php?pkg=webkit2gtk&amp;arch=arm64&amp;ver=2.8.1%2Bdfsg1-1&amp;stamp=1430218110</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1089930</commentid>
    <comment_count>6</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2015-04-29 01:33:35 -0700</bug_when>
    <thetext>Thanks for the report, I&apos;ll check and try to fix it soon.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1089934</commentid>
    <comment_count>7</comment_count>
    <who name="Alberto Garcia">berto</who>
    <bug_when>2015-04-29 01:46:36 -0700</bug_when>
    <thetext>I guess something like this might be enough:

--- a/Source/cmake/OptionsCommon.cmake
+++ b/Source/cmake/OptionsCommon.cmake
@@ -57,6 +57,7 @@ if (WTF_CPU_ARM64_CORTEXA53)
         set(CMAKE_C_FLAGS &quot;${CMAKE_C_FLAGS} -mfix-cortex-a53-835769&quot;)
         set(CMAKE_CXX_FLAGS &quot;${CMAKE_CXX_FLAGS} -mfix-cortex-a53-835769&quot;)
         message(STATUS &quot;Enabling Cortex-A53 workaround for compiler&quot;)
+        set(USE_LD_GOLD OFF)
     endif ()
 endif ()</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1089937</commentid>
    <comment_count>8</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2015-04-29 02:01:52 -0700</bug_when>
    <thetext>I think I found the root of the problem. This errata detection is placed
before the gold linker detection. It tries to detect if the default
system linker supports --fix-cortex-a53-835769 and later uses gold
linker for the real build.

Do we know why only the BFD linker supports this errata fix?
Is there a gold linker version which supports it?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1089958</commentid>
    <comment_count>9</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2015-04-29 04:21:03 -0700</bug_when>
    <thetext>new bug report for this issue: bug144382</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>241797</attachid>
            <date>2014-11-18 11:46:31 -0800</date>
            <delta_ts>2014-11-19 01:06:28 -0800</delta_ts>
            <desc>Proposed patch.</desc>
            <filename>fix-a53-workaround-detection-v1.patch</filename>
            <type>text/plain</type>
            <size>1645</size>
            <attacher name="Akos Kiss">akiss</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL0NoYW5nZUxvZyBiL0NoYW5nZUxvZwppbmRleCBmNjUyMTYwLi40NzIwYzUy
IDEwMDY0NAotLS0gYS9DaGFuZ2VMb2cKKysrIGIvQ2hhbmdlTG9nCkBAIC0xLDMgKzEsMTIgQEAK
KzIwMTQtMTEtMTggIEFrb3MgS2lzcyAgPGFraXNzQGluZi51LXN6ZWdlZC5odT4KKworICAgICAg
ICBGaXggdGhlIGRldGVjdGlvbiBvZiB0b29sY2hhaW4gc3VwcG9ydCBmb3IgQ29ydGV4LUE1MyBl
cnJhdHVtIDgzNTc2OSB3b3JrYXJvdW5kCisgICAgICAgIGh0dHBzOi8vYnVncy53ZWJraXQub3Jn
L3Nob3dfYnVnLmNnaT9pZD0xMzg4NDAKKworICAgICAgICBSZXZpZXdlZCBieSBOT0JPRFkgKE9P
UFMhKS4KKworICAgICAgICAqIFNvdXJjZS9jbWFrZS9PcHRpb25zQ29tbW9uLmNtYWtlOgorCiAy
MDE0LTExLTEzICBDc2FiYSBPc3p0cm9nb27DoWMgIDxvc3N5QHdlYmtpdC5vcmc+CiAKICAgICAg
ICAgUmVtb3ZlIFNvdXJjZS9QbGF0Zm9ybSBjcnVmdApkaWZmIC0tZ2l0IGEvU291cmNlL2NtYWtl
L09wdGlvbnNDb21tb24uY21ha2UgYi9Tb3VyY2UvY21ha2UvT3B0aW9uc0NvbW1vbi5jbWFrZQpp
bmRleCAwNDVmZGNmLi5jNzZhYTkwIDEwMDY0NAotLS0gYS9Tb3VyY2U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zZXQoQ01B
S0VfQ1hYX0ZMQUdTICIke0NNQUtFX0NYWF9GTEFHU30gLW1maXgtY29ydGV4LWE1My04MzU3Njki
KQotICAgICAgICBtZXNzYWdlKCJFbmFibGluZyBDb3J0ZXgtQTUzIHdvcmthcm91bmQgZm9yIGNv
bXBpbGVyIikKKyAgICAgICAgbWVzc2FnZShTVEFUVVMgIkVuYWJsaW5nIENvcnRleC1BNTMgd29y
a2Fyb3VuZCBmb3IgY29tcGlsZXIiKQogICAgIGVuZGlmICgpCiBlbmRpZiAoKQogCg==
</data>

          </attachment>
      

    </bug>

</bugzilla>