[swift-dev] Porting Swift to Linux aarch64 (arm64)

William Dillon william at housedillon.com
Mon Dec 14 17:16:34 CST 2015


Thanks Dmitri,

I’ve been reading cmake files all day, and noticing that some references to the gold linker (specifically this one in cmake/modules/AddSwift):

1058   # Handle gold linker flags for shared libraries.
1059   if(SWIFT_ENABLE_GOLD_LINKER AND SWIFTLIB_SINGLE_SHARED)
1060     if("${SWIFTLIB_SINGLE_SDK}" STREQUAL "LINUX")
1061       # Extend the link_flags for the gold linker so long as this
1062       # isn't the standard library.  The standard library uses a
1063       # linker script that isn't supported by the gold linker.
1064       if(NOT SWIFTLIB_SINGLE_IS_STDLIB)
1065         list(APPEND link_flags "-fuse-ld=gold")
1066       endif()
1067     endif()
1068   endif()

imply that there are/may be issues with the gold linker.  But, if you’re not using it… :)

Anyway, I’ll keep digging.

- Will

> On Dec 14, 2015, at 2:25 PM, Dmitri Gribenko <gribozavr at gmail.com> wrote:
> 
> Hi Will,
> 
> I was using the binutils linker, not the gold one.
> 
> Dmitri
> 
> On Mon, Dec 14, 2015 at 2:19 PM, William Dillon <william at housedillon.com> wrote:
>> I’m on a limb here, but is it possible that the gold linker is causing issues, or is it required?
>> 
>> - Will
>> 
>>> On Dec 13, 2015, at 11:45 PM, Dmitri Gribenko via swift-dev <swift-dev at swift.org> wrote:
>>> 
>>> Hi,
>>> 
>>> This weekend I have been playing with Swift on Linux on 64-bit arm.  I
>>> have summarized my findings in this bug:
>>> 
>>> https://bugs.swift.org/browse/SR-221
>>> 
>>> TL;DR: 20 tests fail in the main testsuite; there is an issue with
>>> type metadata, I'm thinking this is a linker issue.
>>> 
>>> If someone would like to investigate further -- especially if you are
>>> familiar with the internals of the binutils linker -- your help would
>>> be much appreciated!
>>> 
>>> Dmitri
>>> 
>>> --
>>> main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
>>> (j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/
>>> _______________________________________________
>>> swift-dev mailing list
>>> swift-dev at swift.org
>>> https://lists.swift.org/mailman/listinfo/swift-dev
>> 
> 
> 
> 
> -- 
> main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
> (j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-dev/attachments/20151214/1ce5835b/attachment.html>


More information about the swift-dev mailing list