<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Thanks Dmitri,<div class=""><br class=""></div><div class="">I’ve been reading cmake files all day, and noticing that some references to the gold linker (specifically this one in cmake/modules/AddSwift):</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(83, 48, 225);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #ce7924" class="">1058 </span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">&nbsp; </span># Handle gold linker flags for shared libraries.</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(52, 187, 199);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #ce7924" class="">1059 </span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">&nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #ce7924" class="">if</span>(SWIFT_ENABLE_GOLD_LINKER <span style="font-variant-ligatures: no-common-ligatures; color: #ce7924" class="">AND</span> SWIFTLIB_SINGLE_SHARED)</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(52, 189, 38);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #ce7924" class="">1060 </span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">&nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #ce7924" class="">if</span><span style="font-variant-ligatures: no-common-ligatures; color: #34bbc7" class="">(</span><span style="font-variant-ligatures: no-common-ligatures; color: #c33720" class="">"</span>${SWIFTLIB_SINGLE_SDK}<span style="font-variant-ligatures: no-common-ligatures; color: #c33720" class="">"</span><span style="font-variant-ligatures: no-common-ligatures; color: #34bbc7" class=""> </span><span style="font-variant-ligatures: no-common-ligatures; color: #ce7924" class="">STREQUAL</span><span style="font-variant-ligatures: no-common-ligatures; color: #34bbc7" class=""> </span><span style="font-variant-ligatures: no-common-ligatures; color: #c33720" class="">"LINUX"</span><span style="font-variant-ligatures: no-common-ligatures; color: #34bbc7" class="">)</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(83, 48, 225);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #ce7924" class="">1061 </span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">&nbsp; &nbsp; &nbsp; </span># Extend the link_flags for the gold linker so long as this</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(83, 48, 225);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #ce7924" class="">1062 </span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">&nbsp; &nbsp; &nbsp; </span># isn't the standard library.&nbsp; The standard library uses a</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(83, 48, 225);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #ce7924" class="">1063 </span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">&nbsp; &nbsp; &nbsp; </span># linker script that isn't supported by the gold linker.</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(52, 187, 199);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #ce7924" class="">1064 </span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">&nbsp; &nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #ce7924" class="">if</span>(<span style="font-variant-ligatures: no-common-ligatures; color: #ce7924" class="">NOT</span> SWIFTLIB_SINGLE_IS_STDLIB)</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(52, 187, 199);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #ce7924" class="">1065 </span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #ce7924" class="">list</span>(APPEND link_flags <span style="font-variant-ligatures: no-common-ligatures; color: #c33720" class="">"-fuse-ld=gold"</span>)</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(206, 121, 36);" class="">1066 <span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">&nbsp; &nbsp; &nbsp; </span>endif<span style="font-variant-ligatures: no-common-ligatures; color: #34bbc7" class="">()</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(206, 121, 36);" class="">1067 <span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">&nbsp; &nbsp; </span>endif<span style="font-variant-ligatures: no-common-ligatures; color: #34bbc7" class="">()</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(206, 121, 36);" class="">1068 <span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">&nbsp; </span>endif<span style="font-variant-ligatures: no-common-ligatures; color: #34bbc7" class="">()</span></div></div><div class=""><span style="font-variant-ligatures: no-common-ligatures; color: #34bbc7" class=""><br class=""></span></div><div class="">imply that there are/may be issues with the gold linker. &nbsp;But, if you’re not using it… :)</div><div class=""><br class=""></div><div class="">Anyway, I’ll keep digging.</div><div class=""><br class=""></div><div class="">- Will</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Dec 14, 2015, at 2:25 PM, Dmitri Gribenko &lt;<a href="mailto:gribozavr@gmail.com" class="">gribozavr@gmail.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Hi Will,<br class=""><br class="">I was using the binutils linker, not the gold one.<br class=""><br class="">Dmitri<br class=""><br class="">On Mon, Dec 14, 2015 at 2:19 PM, William Dillon &lt;<a href="mailto:william@housedillon.com" class="">william@housedillon.com</a>&gt; wrote:<br class=""><blockquote type="cite" class="">I’m on a limb here, but is it possible that the gold linker is causing issues, or is it required?<br class=""><br class="">- Will<br class=""><br class=""><blockquote type="cite" class="">On Dec 13, 2015, at 11:45 PM, Dmitri Gribenko via swift-dev &lt;<a href="mailto:swift-dev@swift.org" class="">swift-dev@swift.org</a>&gt; wrote:<br class=""><br class="">Hi,<br class=""><br class="">This weekend I have been playing with Swift on Linux on 64-bit arm. &nbsp;I<br class="">have summarized my findings in this bug:<br class=""><br class=""><a href="https://bugs.swift.org/browse/SR-221" class="">https://bugs.swift.org/browse/SR-221</a><br class=""><br class="">TL;DR: 20 tests fail in the main testsuite; there is an issue with<br class="">type metadata, I'm thinking this is a linker issue.<br class=""><br class="">If someone would like to investigate further -- especially if you are<br class="">familiar with the internals of the binutils linker -- your help would<br class="">be much appreciated!<br class=""><br class="">Dmitri<br class=""><br class="">--<br class="">main(i,j){for(i=2;;i++){for(j=2;j&lt;i;j++){if(!(i%j)){j=0;break;}}if<br class="">(j){printf("%d\n",i);}}} /*Dmitri Gribenko &lt;gribozavr@gmail.com&gt;*/<br class="">_______________________________________________<br class="">swift-dev mailing list<br class="">swift-dev@swift.org<br class="">https://lists.swift.org/mailman/listinfo/swift-dev<br class=""></blockquote><br class=""></blockquote><br class=""><br class=""><br class="">-- <br class="">main(i,j){for(i=2;;i++){for(j=2;j&lt;i;j++){if(!(i%j)){j=0;break;}}if<br class="">(j){printf("%d\n",i);}}} /*Dmitri Gribenko &lt;<a href="mailto:gribozavr@gmail.com" class="">gribozavr@gmail.com</a>&gt;*/<br class=""></div></div></blockquote></div><br class=""></div></body></html>