From 08688304c259fb3282b3de2c9fcfe8d315076fdd Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Fri, 14 Jul 2017 17:09:22 +0200 Subject: tested cross-compilation also with clang --- README.CrossCompiling | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/README.CrossCompiling b/README.CrossCompiling index f3f195d..ce6da70 100644 --- a/README.CrossCompiling +++ b/README.CrossCompiling @@ -143,6 +143,29 @@ Compile abaos and libc tests with: setenv PATH "${PATH}:$HOME/cross-compilers" make clean all CC=i486-unknown-linux-gnu-pcc LD=i486-unknown-linux-gnu-ld +clang +----- + +Clang is easy, usually it already supports common targets. Just +for the kernel we need a i486 linker from binutils: + +mkdir -p $HOME/cross-compilers/pcc +cd $HOME/cross-compilers/pcc +wget https://ftp.gnu.org/gnu/binutils/binutils-2.28.tar.gz +tar xf binutils-2.28.tar.gz +mkdir binutils-build +cd binutils-build +../binutils-2.28/configure --target=i486-unknown-linux-gnu --prefix=$HOME/cross-compilers --disable-nls -v +make all +make check +make install +cd .. + +Compile abaos and libc tests with: + +setenv PATH "${PATH}:$HOME/cross-compilers" +make clean all run-qemu CC='clang -target i386-pc-none-abi' LD=i486-unknown-linux-gnu-ld + Links ----- -- cgit v1.2.3-54-g00ecf