<?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>141481</bug_id>
          
          <creation_ts>2015-02-11 11:20:37 -0800</creation_ts>
          <short_desc>[CMake] Don&apos;t set flag fuse-ld on the C/C++ compiler flags, but on the linker flags.</short_desc>
          <delta_ts>2015-02-11 12:13:21 -0800</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="Carlos Alberto Lopez Perez">clopez</reporter>
          <assigned_to name="Carlos Alberto Lopez Perez">clopez</assigned_to>
          <cc>cgarcia</cc>
    
    <cc>commit-queue</cc>
    
    <cc>gyuyoung.kim</cc>
    
    <cc>jfernandez</cc>
    
    <cc>ossy</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1068406</commentid>
    <comment_count>0</comment_count>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2015-02-11 11:20:37 -0800</bug_when>
    <thetext>Revision r176442 &lt;http://trac.webkit.org/r176442&gt; added support for the automatic detection and usage of the gold linker.

However, setting the flag fuse-ld on the C/C++ compiler flags causes trouble with the Clang compiler when this is used in combination with icecc https://trac.webkit.org/wiki/WebKitGTK/SpeedUpBuild#Usingiceccwithclang

It seem that the proper place to set this flag is on the linker flags.

For reference, Chromium developers also faced the same problem https://codereview.chromium.org/265263002</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1068408</commentid>
    <comment_count>1</comment_count>
      <attachid>246399</attachid>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2015-02-11 11:23:57 -0800</bug_when>
    <thetext>Created attachment 246399
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1068409</commentid>
    <comment_count>2</comment_count>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2015-02-11 11:25:07 -0800</bug_when>
    <thetext>I tested the attached patch by setting both fuse-ld=bfd and fuse-ld=gold and checking what linker was used when compiling, it works fine with both GCC and Clang.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1068410</commentid>
    <comment_count>3</comment_count>
      <attachid>246399</attachid>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2015-02-11 11:28:13 -0800</bug_when>
    <thetext>Comment on attachment 246399
Patch

LGTM, r=me.

Just out of curiosity, what kind of problem have you seen with clang/icecc combo?
I built WebKit EFL many times nowadays without any problem with clang and icecc.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1068431</commentid>
    <comment_count>4</comment_count>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2015-02-11 12:09:27 -0800</bug_when>
    <thetext>(In reply to comment #3)
&gt; Comment on attachment 246399 [details]
&gt; Patch
&gt; 
&gt; LGTM, r=me.
&gt; 
&gt; Just out of curiosity, what kind of problem have you seen with clang/icecc
&gt; combo?
&gt; I built WebKit EFL many times nowadays without any problem with clang and
&gt; icecc.

Some hosts where refusing to build with that flag, don&apos;t know why.

Example:

Run Build Command:&quot;/usr/bin/ninja&quot; &quot;cmTryCompileExec3670415570&quot;
[1/2] Building C object CMakeFiles/cmTryCompileExec3670415570.dir/CheckIncludeFiles.c.o
FAILED: /usr/lib/ccache/clang   -fuse-ld=gold -Qunused-arguments -o CMakeFiles/cmTryCompileExec3670415570.dir/CheckIncludeFiles.c.o   -c CheckIncludeFiles.c
clang: error: invalid linker name in argument &apos;-fuse-ld=gold&apos;
ICECC[1871] 21:07:56: Compiled on 192.168.1.108
ninja: build stopped: subcommand failed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1068432</commentid>
    <comment_count>5</comment_count>
      <attachid>246399</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2015-02-11 12:12:38 -0800</bug_when>
    <thetext>Comment on attachment 246399
Patch

Clearing flags on attachment: 246399

Committed r179943: &lt;http://trac.webkit.org/changeset/179943&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1068433</commentid>
    <comment_count>6</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2015-02-11 12:12:42 -0800</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1068435</commentid>
    <comment_count>7</comment_count>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2015-02-11 12:13:21 -0800</bug_when>
    <thetext>More examples:

[32/5568] Building CXX object Source/WebCore/CMakeFiles/ANGLESupport.dir/__/ThirdParty/ANGLE/src/compiler/translator/Intermediate.cpp.o
FAILED: /usr/lib/ccache/clang++   -DBUILDING_GTK__=1 -DBUILDING_WEBKIT -DBUILDING_WITH_CMAKE=1 -DDATA_DIR=\&quot;share\&quot; -DENABLE_3D_RENDERING=1 -DENABLE_PLUGIN_PROCESS_GTK2=1 -DGETTEXT_PACKAGE=\&quot;WebKit2GTK-4.0\&quot; -DHAVE_CONFIG_H=1 -DMOZ_X11=1 -DUSER_AGENT_GTK_MAJOR_VERSION=601 -DUSER_AGENT_GTK_MINOR_VERSION=1 -DWEBKITGTK_API_VERSION_STRING=\&quot;4.0\&quot; -DWEBKIT_DOM_USE_UNSTABLE_API -DWTF_PLATFORM_X11=1 -DWTF_USE_3D_GRAPHICS=1 -DWTF_USE_EGL=1 -DWTF_USE_GLX=1 -DWTF_USE_GSTREAMER -DWTF_USE_GSTREAMER_MPEGTS -DWTF_USE_LIBNOTIFY=1 -DWTF_USE_OPENGL=1 -DWTF_USE_TEXTURE_MAPPER=1 -DWTF_USE_TEXTURE_MAPPER_GL=1 -DWTF_USE_WEBAUDIO_GSTREAMER -DXP_UNIX -std=c++11 -fuse-ld=gold -Qunused-arguments -O3 -DNDEBUG -fno-exceptions -fno-strict-aliasing -fno-rtti -I../../Source/WebCore -I../../Source/WebCore/Modules/airplay -I../../Source/WebCore/Modules/battery -I../../Source/WebCore/Modules/encryptedmedia -I../../Source/WebCore/Modules/gamepad -I../../Source/WebCore/Modules/gamepad/deprecated -I../../Source/WebCore/Modules/geolocation -I../../Source/WebCore/Modules/indexeddb -I../../Source/WebCore/Modules/indieui -I../../Source/WebCore/Modules/mediacontrols -I../../Source/WebCore/Modules/mediasource -I../../Source/WebCore/Modules/mediastream -I../../Source/WebCore/Modules/navigatorcontentutils -I../../Source/WebCore/Modules/notifications -I../../Source/WebCore/Modules/plugins -I../../Source/WebCore/Modules/proximity -I../../Source/WebCore/Modules/quota -I../../Source/WebCore/Modules/speech -I../../Source/WebCore/Modules/streams -I../../Source/WebCore/Modules/vibration -I../../Source/WebCore/Modules/webaudio -I../../Source/WebCore/Modules/webdatabase -I../../Source/WebCore/Modules/websockets -I../../Source/WebCore/accessibility -I../../Source/WebCore/bindings -I../../Source/WebCore/bindings/generic -I../../Source/WebCore/bindings/js -I../../Source/WebCore/bridge -I../../Source/WebCore/bridge/c -I../../Source/WebCore/bridge/jsc -I../../Source/WebCore/crypto -I../../Source/WebCore/crypto/algorithms -I../../Source/WebCore/crypto/keys -I../../Source/WebCore/crypto/parameters -I../../Source/WebCore/css -I../../Source/WebCore/cssjit -I../../Source/WebCore/dom -I../../Source/WebCore/dom/default -I../../Source/WebCore/editing -I../../Source/WebCore/fileapi -I../../Source/WebCore/history -I../../Source/WebCore/html -I../../Source/WebCore/html/canvas -I../../Source/WebCore/html/forms -I../../Source/WebCore/html/parser -I../../Source/WebCore/html/shadow -I../../Source/WebCore/html/track -I../../Source/WebCore/inspector -I../../Source/WebCore/loader -I../../Source/WebCore/loader/appcache -I../../Source/WebCore/loader/archive -I../../Source/WebCore/loader/archive/mhtml -I../../Source/WebCore/loader/cache -I../../Source/WebCore/loader/icon -I../../Source/WebCore/mathml -I../../Source/WebCore/page -I../../Source/WebCore/page/animation -I../../Source/WebCore/page/scrolling -I../../Source/WebCore/platform -I../../Source/WebCore/platform/animation -I../../Source/WebCore/platform/audio -I../../Source/WebCore/platform/graphics -I../../Source/WebCore/platform/graphics/cpu/arm -I../../Source/WebCore/platform/graphics/cpu/arm/filters -I../../Source/WebCore/platform/graphics/filters -I../../Source/WebCore/platform/graphics/filters/texmap -I../../Source/WebCore/platform/graphics/harfbuzz -I../../Source/WebCore/platform/graphics/harfbuzz/ng -I../../Source/WebCore/platform/graphics/opentype -I../../Source/WebCore/platform/graphics/texmap -I../../Source/WebCore/platform/graphics/transforms -I../../Source/WebCore/platform/image-decoders -I../../Source/WebCore/platform/image-decoders/bmp -I../../Source/WebCore/platform/image-decoders/gif -I../../Source/WebCore/platform/image-decoders/ico -I../../Source/WebCore/platform/image-decoders/jpeg -I../../Source/WebCore/platform/image-decoders/png -I../../Source/WebCore/platform/image-decoders/webp -I../../Source/WebCore/platform/mediastream -I../../Source/WebCore/platform/mock -I../../Source/WebCore/platform/network -I../../Source/WebCore/platform/sql -I../../Source/WebCore/platform/text -I../../Source/WebCore/platform/text/icu -I../../Source/WebCore/plugins -I../../Source/WebCore/rendering -I../../Source/WebCore/rendering/line -I../../Source/WebCore/rendering/mathml -I../../Source/WebCore/rendering/shapes -I../../Source/WebCore/rendering/style -I../../Source/WebCore/rendering/svg -I../../Source/WebCore/replay -I../../Source/WebCore/storage -I../../Source/WebCore/style -I../../Source/WebCore/svg -I../../Source/WebCore/svg/animation -I../../Source/WebCore/svg/graphics -I../../Source/WebCore/svg/graphics/filters -I../../Source/WebCore/svg/properties -I../../Source/WebCore/websockets -I../../Source/WebCore/workers -I../../Source/WebCore/xml -I../../Source/WebCore/xml/parser -I../../Source/JavaScriptCore -I../../Source/JavaScriptCore/ForwardingHeaders -I../../Source/JavaScriptCore/API -I../../Source/JavaScriptCore/assembler -I../../Source/JavaScriptCore/bytecode -I../../Source/JavaScriptCore/bytecompiler -I../../Source/JavaScriptCore/dfg -I../../Source/JavaScriptCore/disassembler -I../../Source/JavaScriptCore/heap -I../../Source/JavaScriptCore/debugger -I../../Source/JavaScriptCore/interpreter -I../../Source/JavaScriptCore/jit -I../../Source/JavaScriptCore/llint -I../../Source/JavaScriptCore/parser -I../../Source/JavaScriptCore/profiler -I../../Source/JavaScriptCore/runtime -I../../Source/JavaScriptCore/yarr -I../../Source/WTF -IDerivedSources -IDerivedSources/ForwardingHeaders -IDerivedSources/JavaScriptCore -IDerivedSources/JavaScriptCore/inspector -IDerivedSources/WebCore -I../../Source -I. -I/usr/include/x86_64-linux-gnu -I../../Source/ThirdParty/ANGLE/src -I../../Source/ThirdParty/ANGLE/include -I../../Source/ThirdParty/ANGLE/include/KHR -I../../Source/ThirdParty/ANGLE/include/GLSLANG -I../../Source/WebCore/platform/graphics/gpu -I../../Source/WebCore/accessibility/atk -I../../Source/WebCore/editing/atk -I../../Source/WebCore/page/gtk -I../../Source/WebCore/platform/cairo -I../../Source/WebCore/platform/geoclue -I../../Source/WebCore/platform/gtk -I../../Source/WebCore/platform/graphics/cairo -I../../Source/WebCore/platform/graphics/egl -I../../Source/WebCore/platform/graphics/glx -I../../Source/WebCore/platform/graphics/gtk -I../../Source/WebCore/platform/graphics/freetype -I../../Source/WebCore/platform/graphics/opengl -I../../Source/WebCore/platform/graphics/wayland -I../../Source/WebCore/platform/linux -I../../Source/WebCore/platform/mediastream/gstreamer -I../../Source/WebCore/platform/mock/mediasource -I../../Source/WebCore/platform/network/gtk -I../../Source/WebCore/platform/network/soup -I../../Source/WebCore/platform/text/gtk -I../DependenciesGTK/Root/include/atk-1.0 -I../DependenciesGTK/Root/include/cairo -I/usr/include/enchant -I../DependenciesGTK/Root/include/freetype2/freetype -I../DependenciesGTK/Root/include/freetype2 -I../DependenciesGTK/Root/include/gio-unix-2.0 -I../DependenciesGTK/Root/include/glib-2.0 -I../DependenciesGTK/Root/lib64/glib-2.0/include -I../DependenciesGTK/Root/include/harfbuzz -I/usr/include/libsecret-1 -I../DependenciesGTK/Root/include/libsoup-2.4 -I../DependenciesGTK/Root/include/libxml2 -I../../Source/WebCore/platform/graphics/gstreamer -I../DependenciesGTK/Root/include/gstreamer-1.0 -I../../Source/WebCore/platform/audio/gstreamer -I../../Source/WebCore/bindings/gobject -IDerivedSources/webkitdom -I../../Source/WebCore/testing    -fPIC -MMD -MT Source/WebCore/CMakeFiles/ANGLESupport.dir/__/ThirdParty/ANGLE/src/compiler/translator/Intermediate.cpp.o -MF Source/WebCore/CMakeFiles/ANGLESupport.dir/__/ThirdParty/ANGLE/src/compiler/translator/Intermediate.cpp.o.d -o Source/WebCore/CMakeFiles/ANGLESupport.dir/__/ThirdParty/ANGLE/src/compiler/translator/Intermediate.cpp.o -c ../../Source/ThirdParty/ANGLE/src/compiler/translator/Intermediate.cpp
ICECC[7177] 21:11:35: write of source chunk to host 192.168.1.35
ICECC[7177] 21:11:35: failed  Connection reset by peer
ICECC[7177] 21:11:35: got exception 15 (192.168.1.35) 
clang: error: unable to execute command: Error waiting for child process: Inappropriate ioctl for device
clang: error: clang frontend command failed due to signal (use -v to see invocation)
Debian clang version 3.5.0-9 (tags/RELEASE_350/final) (based on LLVM 3.5.0)
Target: x86_64-pc-linux-gnu
Thread model: posix
clang: note: diagnostic msg: PLEASE submit a bug report to http://bugs.debian.org/ and include the crash backtrace, preprocessed source, and associated run script.
clang: note: diagnostic msg: Error generating preprocessed source(s) - no preprocessable inputs.
ninja: build stopped: subcommand failed.



This errors are gone once this flag is removed from the C/C++ compiler flags.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>246399</attachid>
            <date>2015-02-11 11:23:57 -0800</date>
            <delta_ts>2015-02-11 12:12:38 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>bug-141481-20150211202400.patch</filename>
            <type>text/plain</type>
            <size>1793</size>
            <attacher name="Carlos Alberto Lopez Perez">clopez</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMTc5OTM3CmRpZmYgLS1naXQgYS9Tb3VyY2UvY21ha2UvT3B0
aW9uc0NvbW1vbi5jbWFrZSBiL1NvdXJjZS9jbWFrZS9PcHRpb25zQ29tbW9uLmNtYWtlCmluZGV4
IGQ1YzgyOGVhYjZmNDE2YzAxMjBjNGQzNjJkNDIzZjBkMTI0ZTAwNjEuLmQ2YWRkNTU3YzEwODdl
NDQ0MjI4NDcyOWZiZmQ4MWM5NmQzOWI3YjQgMTAwNjQ0Ci0tLSBhL1NvdXJjZS9jbWFrZS9PcHRp
b25zQ29tbW9uLmNtYWtlCisrKyBiL1NvdXJjZS9jbWFrZS9PcHRpb25zQ29tbW9uLmNtYWtlCkBA
IC02NSwxMCArNjUsOCBAQCBvcHRpb24oVVNFX0xEX0dPTEQgIlVzZSBHTlUgZ29sZCBsaW5rZXIi
IE9OKQogaWYgKFVTRV9MRF9HT0xEKQogICAgIGV4ZWN1dGVfcHJvY2VzcyhDT01NQU5EICR7Q01B
S0VfQ19DT01QSUxFUn0gLWZ1c2UtbGQ9Z29sZCAtV2wsLS12ZXJzaW9uIEVSUk9SX1FVSUVUIE9V
VFBVVF9WQVJJQUJMRSBMRF9WRVJTSU9OKQogICAgIGlmICgiJHtMRF9WRVJTSU9OfSIgTUFUQ0hF
UyAiR05VIGdvbGQiKQotICAgICAgICBzZXQoQ01BS0VfQ19GTEFHUyAiJHtDTUFLRV9DX0ZMQUdT
fSAtZnVzZS1sZD1nb2xkIikKLSAgICAgICAgc2V0KENNQUtFX0NYWF9GTEFHUyAiJH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