[1] https://github.com/M680x0/M680x0-mono-repo
I just received the news that the m68k backend for LLVM has been finished [1].I have had a go at the code now and with some changes to clang, I can actually cross-compile "Hello World" in C now, cross-compile it with clang and get a working
glaubitz@epyc:/tmp/llvm-build> ./bin/clang -target m68k-linux-gnu ~/hello.c -o hello.m68k
glaubitz@epyc:/tmp/llvm-build> file hello.m68k
hello.m68k: ELF 32-bit MSB executable, Motorola m68k, 68020, version 1 (SYSV), dynamically linked, interpreter /lib/ld.so.1, for GNU/Linux 3.2.0, not stripped
glaubitz@epyc:/tmp/llvm-build> cp -av hello.m68k /local_scratch/glaubitz/ 'hello.m68k' -> '/local_scratch/glaubitz/hello.m68k' glaubitz@epyc:/tmp/llvm-build> schroot -c sid-m68k-sbuild glaubitz@epyc:/tmp/llvm-build> uname -a
Linux epyc 5.6.0-2-amd64 #1 SMP Debian 5.6.14-1 (2020-05-23) m68k GNU/Linux glaubitz@epyc:/tmp/llvm-build> /glaubitz/hello.m68k
Hello World!
glaubitz@epyc:/tmp/llvm-build>
[1] https://github.com/M680x0/M680x0-mono-repo/pull/7
Hi!
On 6/21/20 10:12 PM, John Paul Adrian Glaubitz wrote:
I just received the news that the m68k backend for LLVM has been
finished [1].
I have had a go at the code now and with some changes to clang, I can actually cross-compile "Hello World" in C now, cross-compile it with
clang and get a working m68k executable [1].
glaubitz@epyc:/tmp/llvm-build> ./bin/clang -target m68k-linux-gnu ~/hello.c -o hello.m68k
glaubitz@epyc:/tmp/llvm-build> file hello.m68k
hello.m68k: ELF 32-bit MSB executable, Motorola m68k, 68020, version 1 (SYSV), dynamically linked, interpreter /lib/ld.so.1, for GNU/Linux 3.2.0, not stripped
glaubitz@epyc:/tmp/llvm-build> cp -av hello.m68k /local_scratch/glaubitz/ 'hello.m68k' -> '/local_scratch/glaubitz/hello.m68k' glaubitz@epyc:/tmp/llvm-build> schroot -c sid-m68k-sbuild glaubitz@epyc:/tmp/llvm-build> uname -a
Linux epyc 5.6.0-2-amd64 #1 SMP Debian 5.6.14-1 (2020-05-23) m68k GNU/Linux glaubitz@epyc:/tmp/llvm-build> /glaubitz/hello.m68k
Hello World!
glaubitz@epyc:/tmp/llvm-build>
Adrian
[1] https://github.com/M680x0/M680x0-mono-repo/pull/7
Very impressive! I imagine that creating an LLVM backend would be a
massive undertaking.
Does this backend bring any benefits compared with gcc? E.g. will it help gain support for other languages, like rust?
Do you know if anyone has run the LLVM unit tests on Motorola silicon?
[1] https://github.com/glaubitz/rust/tree/m68k-linux
[2] https://github.com/glaubitz/rust/blob/m68k-linux/src/librustc_target/abi/call/m68k.rs
[3] https://github.com/M680x0/M680x0-mono-repo/issues/10
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 296 |
Nodes: | 16 (2 / 14) |
Uptime: | 58:14:34 |
Calls: | 6,652 |
Calls today: | 4 |
Files: | 12,200 |
Messages: | 5,331,136 |