From 4977fd22b874fb9d6d089665e36badd03bcde827 Mon Sep 17 00:00:00 2001 From: VAN BOSSUYT Nicolas Date: Wed, 17 Apr 2019 17:29:45 +0200 Subject: [PATCH] Toolchain: Useit.sh finish and added an install target for the libc's Makefile and a bit of ground work for a gcc port --- Base/usr/include/.gitignore | 2 ++ Base/usr/include/.gitkeep | 0 Base/usr/lib/.gitignore | 2 ++ Base/usr/lib/.gitkeep | 0 LibC/Makefile | 8 ++++++++ Toolchain/BuildIt.sh | 7 ++++++- Toolchain/UseIt.sh | 6 +++++- 7 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 Base/usr/include/.gitignore create mode 100644 Base/usr/include/.gitkeep create mode 100644 Base/usr/lib/.gitignore create mode 100644 Base/usr/lib/.gitkeep diff --git a/Base/usr/include/.gitignore b/Base/usr/include/.gitignore new file mode 100644 index 00000000000000..5dd51d7b23e068 --- /dev/null +++ b/Base/usr/include/.gitignore @@ -0,0 +1,2 @@ +* +!.git* \ No newline at end of file diff --git a/Base/usr/include/.gitkeep b/Base/usr/include/.gitkeep new file mode 100644 index 00000000000000..e69de29bb2d1d6 diff --git a/Base/usr/lib/.gitignore b/Base/usr/lib/.gitignore new file mode 100644 index 00000000000000..5dd51d7b23e068 --- /dev/null +++ b/Base/usr/lib/.gitignore @@ -0,0 +1,2 @@ +* +!.git* \ No newline at end of file diff --git a/Base/usr/lib/.gitkeep b/Base/usr/lib/.gitkeep new file mode 100644 index 00000000000000..e69de29bb2d1d6 diff --git a/LibC/Makefile b/LibC/Makefile index 9c690d3f398cc2..67cc90cc71f5e0 100644 --- a/LibC/Makefile +++ b/LibC/Makefile @@ -77,3 +77,11 @@ $(LIBRARY): $(CPP_OBJS) $(ASM_OBJS) clean: @echo "CLEAN"; rm -f $(LIBRARY) $(CPP_OBJS) $(ASM_OBJS) *.d +install: $(LIBRARY) + # Copy headers + rsync -a --include '*/' --include '*.h' --exclude '*' . ../Base/usr/include + # Install the library + cp $(LIBRARY) ../Base/usr/lib + cp crt0.o ../Base/usr/lib/ + cp crti.ao ../Base/usr/lib/crti.o + cp crtn.ao ../Base/usr/lib/crtn.o \ No newline at end of file diff --git a/Toolchain/BuildIt.sh b/Toolchain/BuildIt.sh index 48dca5f0465fc8..2d4d911d123ad0 100644 --- a/Toolchain/BuildIt.sh +++ b/Toolchain/BuildIt.sh @@ -5,7 +5,7 @@ echo $DIR TARGET=i686-pc-serenity PREFIX="$DIR/Local" -SYSROOT="$DIR/../Root" +SYSROOT="$DIR/../Base" mkdir -p "$DIR/Tarballs" @@ -70,5 +70,10 @@ pushd "$DIR/Build/" make -j $(nproc) all-gcc all-target-libgcc make install-gcc install-target-libgcc + + make -c ../LibC/ install + + make all-target-libstdc++-v3 + make install-target-libstdc++-v3 popd popd \ No newline at end of file diff --git a/Toolchain/UseIt.sh b/Toolchain/UseIt.sh index cc1f786e84631f..f80ba51ce0321d 100644 --- a/Toolchain/UseIt.sh +++ b/Toolchain/UseIt.sh @@ -1 +1,5 @@ -#!/bin/bash \ No newline at end of file +#!/bin/bash +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +export PATH="$DIR/Local/bin:$PATH" +export TOOLCHAIN="$DIR" +echo "$PATH" \ No newline at end of file