Move rust support to libports

Issue #1899
This commit is contained in:
Christian Helmuth
2016-05-12 10:26:36 +02:00
parent bb3e9300f6
commit 3ba61a2ddf
13 changed files with 7 additions and 7 deletions

View File

@ -1,11 +0,0 @@
{
"llvm-target": "armv6-pc-genode-gnueabi",
"target-endian": "little",
"target-pointer-width": "32",
"arch": "arm",
"os": "genode",
"cpu": "generic",
"env": "armv6",
"no_compiler_rt": true,
"features": "+v6"
}

View File

@ -1,11 +0,0 @@
{
"llvm-target": "armv7-pc-genode-gnueabi",
"target-endian": "little",
"target-pointer-width": "32",
"arch": "arm",
"os": "genode",
"cpu": "generic",
"env": "armv7",
"no_compiler_rt": true,
"features": "+v7"
}

View File

@ -1,9 +0,0 @@
{
"pre-link-args": ["-mriscv=RV64IAMFD"],
"llvm-target": "riscv-pc-genode-elf",
"target-endian": "little",
"target-pointer-width": "64",
"arch": "riscv",
"os": "genode",
"no_compiler_rt": true
}

View File

@ -1,8 +0,0 @@
{
"llvm-target": "i686-pc-genode-elf",
"target-endian": "little",
"target-pointer-width": "32",
"arch": "x86",
"os": "genode",
"no_compiler_rt": true
}

View File

@ -1,9 +0,0 @@
{
"pre-link-args": ["-m64"],
"llvm-target": "x86_64-pc-genode-elf",
"target-endian": "little",
"target-pointer-width": "64",
"arch": "x86_64",
"os": "genode",
"no_compiler_rt": true
}

View File

@ -1,24 +0,0 @@
#![no_std]
#![feature(lang_items,collections,alloc)]
extern crate collections;
extern crate alloc;
extern crate libc;
use alloc::boxed::Box;
extern "C"{
fn print_num(num: libc::c_int);
}
#[no_mangle]
pub fn main() -> libc::c_int{
let n = Box::new(42);
unsafe {
print_num(*n);
}
0
}
#[lang="panic_fmt"]
#[no_mangle]
pub fn panic_fmt() -> ! { loop{} }
#[lang="eh_personality"]
#[no_mangle]
pub fn eh_personality() -> ! { loop{} }

View File

@ -1,4 +0,0 @@
#include <base/printf.h>
extern "C" void print_num(int num) {
Genode::printf("Number from rust: %d \n",num);
}

View File

@ -1,4 +0,0 @@
TARGET = rust-test
SRC_RS = main.rs
SRC_CC = printf.cc
LIBS = libcore-rust libcollections-rust base librustc_unicode-rust liballoc-rust liblibc-rust liballoc_system-rust