Playing with HEAD/sparc64 and clang
Jean-Sébastien Pédron
dumbbell at FreeBSD.org
Sat Sep 13 16:02:53 UTC 2014
Hi!
With the help of Roman Divacky, I started to play with clang on sparc64.
The build of the kernel and world completes (though, I use a patch to
pcpu.h provided by Roman). However, the loader fail to load the kernel,
and I'm not sure the world binaries are correct.
== Compilation ==
First, I cross-build kernel and world on an amd64 computer. The source
tree is at r271475. Here are the variables I set in the environment:
export MAKEOBJDIRPREFIX=$(pwd)
export TARGET=sparc64
export TARGET_ARCH=sparc64
export WITH_CLANG_BOOTSTRAP=y
export WITH_CLANG=y
export WITH_CLANG_IS_CC=y
export WITH_LIBCPLUSPLUS=y
Compared to mail sent by Dimitry Andric in last February [1], I added
WITH_CLANG_BOOTSTRAP. Otherwise, clang isn't build early enough and the
host compiler is used (producing amd64 binaries).
== Kernel ==
When I boot the kernel built with clang, I get:
jumping to kernel entry at 0xc00a8000
Data Access Exception
Then, I'm left at the OpenBoot prompt.
== World ==
I install world in an alternate directory.
When I run bin/sh from that directory, it works.
When I set LD_LIBRARY_PATH to point to $directory/lib and run bin/sh, it
works.
When I run "chroot $directory /bin/sh", I get:
Illegal instruction
The computer is a Sun Ultra60 with dual UltraSPARC II 450 MHz. Its dmesg
is here:
https://people.freebsd.org/~dumbbell/sparc64/freebsd-ultra60-dmesg.txt
I'm ready to provide any information required and test patches :)
[1]
https://lists.freebsd.org/pipermail/freebsd-sparc64/2014-February/009233.html
--
Jean-Sébastien Pédron
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 949 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-sparc64/attachments/20140913/42c799d4/attachment.sig>
More information about the freebsd-sparc64
mailing list