Red/System 语言获得了OS X, ARM, Android 后端

红色/系统(Red/System)在Syllable项目使用的新式程序语言,有了下一个里程碑式的成果——其编译器的一个ARM代码生成器后端。该后端支持Android( 见截图)和通用ARM Linux( Debian上的截图)。之前,用于生成 Mac OS X 可执行文件的后端已经完成(到目前为止支持x86的CPU)。

hello-arm-android.png

hello arm android

hello-arm-qemu.png

hello arm qemu




红语言现在拥有两个完整的CPU代码生成器后端:一个用在x86上,另一个用在ARM上。新的ARM后端支持ARMv5及更高版本的架构。这意味着除了最 小的嵌入式版本CPU(它们使用使用一种不为红语言所支持的独特的Thumbs指令集)外,所有当前的CPU都能被支持。

除了对这些32位的CPU的支持之外,在对AVR Atmel 8位CPU上的一个代码生成器的支持上也做了 部分工作

现在支持的可执行文件格式包括 ELF, OS X 上的 Mach-O , Windows 上的 PE 以及 Arduino等嵌入式设备上的 Intel HEX 格式。ELF支持涵盖 x86 Linux, ARM Linux, Android 以及 Syllable桌面。对FreeBSD 的支持正在开发中。

交叉编译对红语言来说有如家常便饭。比如,canonical 演示程序可被从Syllable Server以及其他被支持的主平台中面向Android ARM进行编译。方法如下:
  1. rebol -s rsc.r -t Android /path/to/tests/hello.reds
复制代码


转载请注明:Linux人社区> 英文资讯翻译专版.编译

英文原文:
Red/System Language Gets OS X, ARM, Android Backends
posted by Kaj-de-Vos on Sun 1st Jan 2012 19:42 UTC
Red/System, the new programming language that is used in the Syllable project, has reached its next milestone: an ARM code generator backend for its compiler. It supports Android ( screenshot) and generic ARM Linux ( screenshot on Debian). Earlier, the backend for generating Mac OS X executables was already completed (for x86 CPUs so far).

Red now has two complete CPU code generator backends: one for x86 and one for ARM. The new ARM backend supports the ARMv5 architecture and up. This means that all current ARM CPUs are supported except the smallest embedded versions, which use a distinct Thumbs instruction set that is not yet supported by Red.
Apart from these 32 bits CPUs, work has also been done on a code generator for AVR Atmel 8 bits CPUs. This has been demonstrated running on an Arduino board at Software Freedom Day 2011 in the Netherlands (the Arduino demonstration is towards the end of the English spoken video).
Executable file formats now supported are ELF, Mach-O for OS X, PE for Windows and Intel HEX format for embedded devices such as Arduino. ELF support has variations for x86 Linux, ARM Linux, Android and Syllable Desktop. FreeBSD support is under development.
Cross-compiling is trivially easy with Red. For example, the canonical demo program can be compiled to target Android ARM from Syllable Server or any of the other supported host platforms like this:
  1. rebol -s rsc.r -t Android /path/to/tests/hello.reds
复制代码       

转载于:https://my.oschina.net/xyxzfj/blog/38353

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值