Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Rust on ia64 works with gccrs

8 views
Skip to first unread message

John Paul Adrian Glaubitz

unread,
Dec 27, 2022, 4:00:03 PM12/27/22
to
Hi!

With the first gcc-13 packages becoming available in Debian, I thought I'd give
it a try with the initial Rust support through gccrs on a platform which hasn't
had any Rust support so far - like ia64 - and lo and behold, it actually works:

(experimental_ia64-dchroot)glaubitz@yttrium:~$ uname -a
Linux yttrium 5.19.0-2-mckinley #1 SMP Debian 5.19.11-1 (2022-09-24) ia64 GNU/Linux
(experimental_ia64-dchroot)glaubitz@yttrium:~$ cat rust42.rs
fn main() -> i32 {
return 42;
}
(experimental_ia64-dchroot)glaubitz@yttrium:~$ ia64-linux-gnu-gccrs-13 -frust-incomplete-and-experimental-compiler-do-not-use rust42.rs -o rust42
(experimental_ia64-dchroot)glaubitz@yttrium:~$ ./rust42
(experimental_ia64-dchroot)glaubitz@yttrium:~$ echo $?
42
(experimental_ia64-dchroot)glaubitz@yttrium:~$ cat hello.rs
extern "C" {
fn printf(s: *const i8, ...);
}

unsafe fn main() {
let a = "Hello world from Rust!\n\0";
let b = a as *const str;
let c = b as *const i8;

printf(c);
}
(experimental_ia64-dchroot)glaubitz@yttrium:~$ ia64-linux-gnu-gccrs-13 -frust-incomplete-and-experimental-compiler-do-not-use hello.rs -o hello
(experimental_ia64-dchroot)glaubitz@yttrium:~$ ./hello
Hello world from Rust!
(experimental_ia64-dchroot)glaubitz@yttrium:~$

Examples taken from here: https://briancallahan.net/blog/20221219.html

Will test other Debian Ports architectures such as m68k and hppa once the buildds
have finished building the current gcc-13 packages.

Adrian

--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer
`. `' Physicist
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
0 new messages