# Linux / ARM?

**URL:** <https://forums.swift.org/t/linux-arm/39>\
**Category:** Using Swift\
**Created:** [December 3, 2015, 11:50pm UTC](https://forums.swift.org/t/linux-arm/39 "2015-12-03T23:50:57Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![David\_Abraham](https://avatars.discourse-cdn.com/v4/letter/d/51bf81/32.png) [@David\_Abraham](https://forums.swift.org/u/David_Abraham)\
**Post date:** [December 3, 2015, 11:50pm UTC](https://forums.swift.org/t/linux-arm/39/1 "2015-12-03T23:50:57Z")

</div>

Is a Linux / ARM port on the horizon? I'm interested in using Swift with Rasberry Pi

- David

---

<div class="post-metadata">

**Author:** ![gribozavr](https://avatars.discourse-cdn.com/v4/letter/g/65b543/32.png) [@gribozavr](https://forums.swift.org/u/gribozavr)\
**Post date:** [December 3, 2015, 11:59pm UTC](https://forums.swift.org/t/linux-arm/39/2 "2015-12-03T23:59:54Z")

</div>

We don't have resources to develop the port ourselves, but Swift ports  
to non-x86 architectures are most welcome!

Dmitri

> **···**
>
> On Thu, Dec 3, 2015 at 3:50 PM, David Abraham \<sirdavidabraham@gmail.com\> wrote:
> 
> > Is a Linux / ARM port on the horizon? I'm interested in using Swift with Rasberry Pi
> 
> --  
> 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@gmail.com\>\*/

---

<div class="post-metadata">

**Author:** ![Brian\_Swetland](https://avatars.discourse-cdn.com/v4/letter/b/8dc957/32.png) [@Brian\_Swetland](https://forums.swift.org/u/Brian_Swetland)\
**Post date:** [December 4, 2015, 12:50am UTC](https://forums.swift.org/t/linux-arm/39/3 "2015-12-04T00:50:41Z")

</div>

Any pointers or existing docs to look at regarding bringup against new  
architectures?

I'm definitely interested in Linux-ARM as a target as well (cross-compiled  
more interesting than self-hosted).

I'd hope, given it's based on LLVM and targets IOS-ARM, that this would not  
be a horribly complex thing to attempt.

Brian

> **···**
>
> On Thu, Dec 3, 2015 at 3:59 PM, Dmitri Gribenko \<gribozavr@gmail.com\> wrote:
> 
> > On Thu, Dec 3, 2015 at 3:50 PM, David Abraham \<sirdavidabraham@gmail.com\> \> wrote:  
> > \>  
> > \> Is a Linux / ARM port on the horizon? I'm interested in using Swift  
> > with Rasberry Pi
> > 
> > We don't have resources to develop the port ourselves, but Swift ports  
> > to non-x86 architectures are most welcome!

---

<div class="post-metadata">

**Author:** ![gribozavr](https://avatars.discourse-cdn.com/v4/letter/g/65b543/32.png) [@gribozavr](https://forums.swift.org/u/gribozavr)\
**Post date:** [December 4, 2015, 4:03am UTC](https://forums.swift.org/t/linux-arm/39/4 "2015-12-04T04:03:12Z")

</div>

> > \>  
> > \> Is a Linux / ARM port on the horizon? I'm interested in using Swift with  
> > \> Rasberry Pi
> > 
> > We don't have resources to develop the port ourselves, but Swift ports  
> > to non-x86 architectures are most welcome!
> 
> Any pointers or existing docs to look at regarding bringup against new  
> architectures?

I'd attack this problem in this order:

\* Make C++ pieces build, while not breaking existing platforms:

\*\* Make build-script-impl invoke cmake on your platform.

\*\* Make the required cmake changes (hopefully close to none).

\*\* Make the C++ compiler code build with your C++ compiler and standard library.

\*\* Implement the necessary plumbing for running tests, remotely on the  
target device, if you are cross-compiling.

\* Checkpoint: make ./validation-test/stdlib/MicroStdlib.swift test pass.

\* Make the standard library build:

\*\* Make the runtime build.

\*\* Make the core standard library and StdlibUnittest build.

\* XFAIL all failing tests for your platform.

\* Make validation-test/stdlib/StdlibUnittest\* tests pass. This will  
likely involve fixing a few portability issues in the library and the  
runtime.

\* Make the rest of the tests pass incrementally.

> I'm definitely interested in Linux-ARM as a target as well (cross-compiled  
> more interesting than self-hosted).

Do you mean building a cross-compiler, or cross-compiling the swift  
compiler for ARM?

> I'd hope, given it's based on LLVM and targets IOS-ARM, that this would not  
> be a horribly complex thing to attempt.

Since it is an ELF platform, and running Linux, I don't expect major issues.

Dmitri

> **···**
>
> On Thu, Dec 3, 2015 at 4:50 PM, Brian Swetland \<swetland@frotz.net\> wrote:
> 
> > On Thu, Dec 3, 2015 at 3:59 PM, Dmitri Gribenko \<gribozavr@gmail.com\> wrote:
> > 
> > > On Thu, Dec 3, 2015 at 3:50 PM, David Abraham \<sirdavidabraham@gmail.com\> \>\> wrote:
> 
> --  
> 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@gmail.com\>\*/

---

<div class="post-metadata">

**Author:** ![Brian\_Swetland](https://avatars.discourse-cdn.com/v4/letter/b/8dc957/32.png) [@Brian\_Swetland](https://forums.swift.org/u/Brian_Swetland)\
**Post date:** [December 4, 2015, 4:36am UTC](https://forums.swift.org/t/linux-arm/39/5 "2015-12-04T04:36:59Z")

</div>

I meant building a cross-compiler (host linux-x86-64, target linux-arm).

Thanks for the suggested plan of attack!

Brian

> **···**
>
> On Thu, Dec 3, 2015 at 8:03 PM, Dmitri Gribenko \<gribozavr@gmail.com\> wrote:
> 
> > On Thu, Dec 3, 2015 at 4:50 PM, Brian Swetland \<swetland@frotz.net\> wrote:  
> > \> On Thu, Dec 3, 2015 at 3:59 PM, Dmitri Gribenko \<gribozavr@gmail.com\> \> wrote:  
> > \>\>  
> > \>\> We don't have resources to develop the port ourselves, but Swift ports  
> > \>\> to non-x86 architectures are most welcome!  
> > \>  
> > \> Any pointers or existing docs to look at regarding bringup against new  
> > \> architectures?
> > 
> > I'd attack this problem in this order:
> > 
> > ...
> 
> > \> I'm definitely interested in Linux-ARM as a target as well  
> > (cross-compiled  
> > \> more interesting than self-hosted).
> > 
> > Do you mean building a cross-compiler, or cross-compiling the swift  
> > compiler for ARM?
> > 
> > \> I'd hope, given it's based on LLVM and targets IOS-ARM, that this would  
> > not  
> > \> be a horribly complex thing to attempt.
> > 
> > Since it is an ELF platform, and running Linux, I don't expect major  
> > issues.

---

<div class="post-metadata">

**Author:** ![David\_Abraham](https://avatars.discourse-cdn.com/v4/letter/d/51bf81/32.png) [@David\_Abraham](https://forums.swift.org/u/David_Abraham)\
**Post date:** [December 4, 2015, 12:54pm UTC](https://forums.swift.org/t/linux-arm/39/6 "2015-12-04T12:54:48Z")

</div>

Sounds awesome!!

-David

> **···**
>
> On Dec 3, 2015, at 11:36 PM, Brian Swetland \<swetland@frotz.net\> wrote:
> 
> > I meant building a cross-compiler (host linux-x86-64, target linux-arm).
> > 
> > Thanks for the suggested plan of attack!
> > 
> > Brian
