From 3082afafbe1d1be0ad50f174df545e05b33279d3 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Tue, 15 Apr 2014 06:41:27 -0700 Subject: [PATCH] test: Un-ignore smallest-hello-world.rs Rebased through the ages to bring the test up to date. Closes #8538 --- src/test/run-pass/smallest-hello-world.rs | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/src/test/run-pass/smallest-hello-world.rs b/src/test/run-pass/smallest-hello-world.rs index cd9afa0311b39..0ec1ec79a60c6 100644 --- a/src/test/run-pass/smallest-hello-world.rs +++ b/src/test/run-pass/smallest-hello-world.rs @@ -8,30 +8,21 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore-test - FIXME(#8538) some kind of problem linking induced by extern "C" fns - // Smallest hello world with no runtime #![no_std] -// This is an unfortunate thing to have to do on linux :( -#[cfg(target_os = "linux")] -#[doc(hidden)] -pub mod linkhack { - #[link_args="-lrustrt -lrt"] - extern {} -} +extern crate libc; -extern { - fn puts(s: *u8); -} +extern { fn puts(s: *u8); } +extern "rust-intrinsic" { fn transmute(t: T) -> U; } -extern "rust-intrinsic" { - fn transmute(t: T) -> U; -} +#[no_mangle] +pub extern fn rust_stack_exhausted() {} #[start] -pub fn main(_: int, _: **u8, _: *u8) -> int { +#[no_split_stack] +fn main(_: int, _: **u8) -> int { unsafe { let (ptr, _): (*u8, uint) = transmute("Hello!"); puts(ptr);