Re: [swift-dev] [SR-40] Port Swift to Arm progress / question

2015-12-16 Thread Dmitri Gribenko via swift-dev
On Wed, Dec 16, 2015 at 11:55 AM, William Dillon wrote: > Hi all, > > I think that I’ve found the culprit with linking errors on ARMv7-linux. I > was looking at the changes between the SwiftAndroid port, and I noticed an > extra flag they added in the AddSwift cmake module: -Wl,-Bsymbolic. I a

Re: [swift-dev] [SR-40] Port Swift to Arm progress / question

2015-12-16 Thread William Dillon via swift-dev
Hi all, I think that I’ve found the culprit with linking errors on ARMv7-linux. I was looking at the changes between the SwiftAndroid port, and I noticed an extra flag they added in the AddSwift cmake module: -Wl,-Bsymbolic. I added that to my copy of the module, and re-built swift. I’m now

Re: [swift-dev] [SR-40] Port Swift to Arm progress / question

2015-12-15 Thread Dmitri Gribenko via swift-dev
On Tue, Dec 15, 2015 at 2:39 AM, Nick Wellnhofer via swift-dev wrote: > On 10/12/2015 00:05, William Dillon via swift-dev wrote: >> >> At this point, the compiler and standard library are all built, and I >> think I have one final issue. In the testing suite, the binaries generated >> by the swif

Re: [swift-dev] [SR-40] Port Swift to Arm progress / question

2015-12-15 Thread Nick Wellnhofer via swift-dev
On 10/12/2015 00:05, William Dillon via swift-dev wrote: At this point, the compiler and standard library are all built, and I think I have one final issue. In the testing suite, the binaries generated by the swift compiler don’t run. They’re emitting unexpected reloc type errors. It appear

Re: [swift-dev] [SR-40] Port Swift to Arm progress / question

2015-12-14 Thread Dmitri Gribenko via swift-dev
On Mon, Dec 14, 2015 at 11:20 PM, William Dillon wrote: > I built a very simple swift program (minimal hello world) using the arm > swiftc and the x86_64 swiftc, and had them emit the sil and llvm ir. The sil > it substantially similar between the toolchain tarball on swift.org and my > arm sw

Re: [swift-dev] [SR-40] Port Swift to Arm progress / question

2015-12-14 Thread William Dillon via swift-dev
I built a very simple swift program (minimal hello world) using the arm swiftc and the x86_64 swiftc, and had them emit the sil and llvm ir. The sil it substantially similar between the toolchain tarball on swift.org and my arm swiftc, except that the arm version has a few sil_vtable, NSArray,

Re: [swift-dev] [SR-40] Port Swift to Arm progress / question

2015-12-14 Thread Dmitri Gribenko via swift-dev
On Mon, Dec 14, 2015 at 5:57 PM, William Dillon via swift-dev wrote: > I’m still stuck on this after a while, but I’ve been paying attention to > other discussions (specifically the FreeBSD port), as well as reading tons of > code. One thing I noticed while writing up my observations on my blog

Re: [swift-dev] [SR-40] Port Swift to Arm progress / question

2015-12-14 Thread William Dillon via swift-dev
I’m still stuck on this after a while, but I’ve been paying attention to other discussions (specifically the FreeBSD port), as well as reading tons of code. One thing I noticed while writing up my observations on my blog http://www.housedillon.com/?p=2267 is that in stdlib/public/runtime/CMake

Re: [swift-dev] [SR-40] Port Swift to Arm progress / question

2015-12-10 Thread Joe Groff via swift-dev
> On Dec 10, 2015, at 9:29 AM, William Dillon wrote: > > Yep. I see that are a few of those in there (1700 and change). When it > comes to linking and ELF, I am fumbling in the dark a bit. With the hope of > getting some context, I decided to see whether R_ARM_REL32 is used in any > other

Re: [swift-dev] [SR-40] Port Swift to Arm progress / question

2015-12-10 Thread William Dillon via swift-dev
Yep. I see that are a few of those in there (1700 and change). When it comes to linking and ELF, I am fumbling in the dark a bit. With the hope of getting some context, I decided to see whether R_ARM_REL32 is used in any other shared libraries in the system; it is not. It seems as though R_A

Re: [swift-dev] [SR-40] Port Swift to Arm progress / question

2015-12-09 Thread Dmitri Gribenko via swift-dev
Here's a relevant line (there are lots, this is just one instance): 003a91cc 0015d403 R_ARM_REL32 003af914 _TMps13GeneratorType _TMps13GeneratorType ---> protocol descriptor for Swift.GeneratorType Dmitri On Wed, Dec 9, 2015 at 7:25 PM, William Dillon wrote: > I’m looking at that pull

Re: [swift-dev] [SR-40] Port Swift to Arm progress / question

2015-12-09 Thread William Dillon via swift-dev
I’m looking at that pull request currently, thanks for the link.Here is the output of readelf -r for libswiftcore, test.swift (as compiled) and test.swift.Thanks for looking into this!- Will relocatable.tar.bz2 Description: BZip2 compressed data On Dec 9, 2015, at 7:14 PM, Dmitri Gribenko

Re: [swift-dev] [SR-40] Port Swift to Arm progress / question

2015-12-09 Thread Dmitri Gribenko via swift-dev
On Wed, Dec 9, 2015 at 7:05 PM, Dmitri Gribenko wrote: > On Wed, Dec 9, 2015 at 3:05 PM, William Dillon via swift-dev > wrote: >> Nick was correct in noting that __muloti4 wasn’t needed on 32-bit platforms. >> I added another case to the preprocessor conditional for __muloti4, and >> specified

Re: [swift-dev] [SR-40] Port Swift to Arm progress / question

2015-12-09 Thread Dmitri Gribenko via swift-dev
On Wed, Dec 9, 2015 at 3:05 PM, William Dillon via swift-dev wrote: > Nick was correct in noting that __muloti4 wasn’t needed on 32-bit platforms. > I added another case to the preprocessor conditional for __muloti4, and > specified __arm__ and __linux__ for mulodi4. The __multi3 and __divti3

Re: [swift-dev] [SR-40] Port Swift to Arm progress / question

2015-12-09 Thread Dmitri Gribenko via swift-dev
On Wed, Dec 9, 2015 at 3:42 AM, Nick Wellnhofer via swift-dev wrote: > I guess this only works on 32-bit and needs another check for 64-bit. Why > isnt't `__swift_ssize_t` simply defined as `ssize_t`? This would avoid this > kind of problems. Because we can't include Glibc headers in SwiftShims.

Re: [swift-dev] [SR-40] Port Swift to Arm progress / question

2015-12-09 Thread Joe Groff via swift-dev
> On Dec 9, 2015, at 10:05 AM, Nick Wellnhofer via swift-dev > wrote: > > On 09/12/2015 18:55, Nick Wellnhofer via swift-dev wrote: >>> Is there a better way to get that symbol, and why wasn’t this a problem for >>> x86_64? >> >> AFAICS, this is a problem for x86_64 Linux. It's not a problem o

Re: [swift-dev] [SR-40] Port Swift to Arm progress / question

2015-12-09 Thread Nick Wellnhofer via swift-dev
On 09/12/2015 18:55, Nick Wellnhofer via swift-dev wrote: Is there a better way to get that symbol, and why wasn’t this a problem for x86_64? AFAICS, this is a problem for x86_64 Linux. It's not a problem on Apple platforms, because there C++ binaries are linked with compiler-rt instead of the

Re: [swift-dev] [SR-40] Port Swift to Arm progress / question

2015-12-09 Thread Nick Wellnhofer via swift-dev
On 09/12/2015 18:43, William Dillon via swift-dev wrote: I have no intention of addressing every issue here, but there is another I have a question about while I’m at it. While linking Swift.o, there is an undefined reference to __mulodi4. I found that __muloti4 is copied from compiler-rt int

Re: [swift-dev] [SR-40] Port Swift to Arm progress / question

2015-12-08 Thread Dmitri Gribenko via swift-dev
Hi William, On Tue, Dec 8, 2015 at 8:00 PM, William Dillon via swift-dev < swift-dev@swift.org> wrote: > Hi all, > > I’ve been working on trying to get Swift to compile on ARMv7 (armv7l > specifically, not sure if other variants will work as well). I’ve gotten > pretty far, but I ran a cross an