Over the weekend I managed to get a build of Swift working on the Odroid C2 SBC. As soon as I get a chance I’ll TAR up the build and put it up on Dropbox. The build for the Raspberry Pi is still compiling.

Here’s the little sample program I wrote to test it out. I had to comment out line 18 because the “Float80” data type (literally an 80-bit floating point) is only for Intel based processors and the C2 is, of course, ARM based.
import Foundation print("") print(" Int8 - size: \(MemoryLayout<Int8>.size); stride: \(MemoryLayout<Int8>.stride); alignment: \(MemoryLayout<Int8>.alignment)") print("Int16 - size: \(MemoryLayout<Int16>.size); stride: \(MemoryLayout<Int16>.stride); alignment: \(MemoryLayout<Int16>.alignment)") print("Int32 - size: \(MemoryLayout<Int32>.size); stride: \(MemoryLayout<Int32>.stride); alignment: \(MemoryLayout<Int32>.alignment)") print("Int64 - size: \(MemoryLayout<Int64>.size); stride: \(MemoryLayout<Int64>.stride); alignment: \(MemoryLayout<Int64>.alignment)") print(" Int - size: \(MemoryLayout<Int>.size); stride: \(MemoryLayout<Int>.stride); alignment: \(MemoryLayout<Int>.alignment)") print("") print(" UInt8 - size: \(MemoryLayout<UInt8>.size); stride: \(MemoryLayout<UInt8>.stride); alignment: \(MemoryLayout<UInt8>.alignment)") print("UInt16 - size: \(MemoryLayout<UInt16>.size); stride: \(MemoryLayout<UInt16>.stride); alignment: \(MemoryLayout<UInt16>.alignment)") print("UInt32 - size: \(MemoryLayout<UInt32>.size); stride: \(MemoryLayout<UInt32>.stride); alignment: \(MemoryLayout<UInt32>.alignment)") print("UInt64 - size: \(MemoryLayout<UInt64>.size); stride: \(MemoryLayout<UInt64>.stride); alignment: \(MemoryLayout<UInt64>.alignment)") print(" UInt - size: \(MemoryLayout<UInt>.size); stride: \(MemoryLayout<UInt>.stride); alignment: \(MemoryLayout<UInt>.alignment)") print("") print(" Float - size: \(MemoryLayout<Float>.size); stride: \(MemoryLayout<Float>.stride); alignment: \(MemoryLayout<Float>.alignment)") print(" Double - size: \(MemoryLayout<Double>.size); stride: \(MemoryLayout<Double>.stride); alignment: \(MemoryLayout<Double>.alignment)") //print("Float80 - size: \(MemoryLayout<Float80>.size); stride: \(MemoryLayout<Float80>.stride); alignment: \(MemoryLayout<Float80>.alignment)") print("") print("timespec - size: \(MemoryLayout<timespec>.size); stride: \(MemoryLayout<timespec>.stride); alignment: \(MemoryLayout<timespec>.alignment)") print("")