Skip to content

Commit

Permalink
Toolchain: Useit.sh finish and added an install target for the libc's…
Browse files Browse the repository at this point in the history
… Makefile and a bit of ground work for a gcc port
  • Loading branch information
sleepy-monax authored and awesomekling committed Apr 29, 2019
1 parent 8ac8131 commit 4977fd2
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Base/usr/include/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!.git*
Empty file added Base/usr/include/.gitkeep
Empty file.
2 changes: 2 additions & 0 deletions Base/usr/lib/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!.git*
Empty file added Base/usr/lib/.gitkeep
Empty file.
8 changes: 8 additions & 0 deletions LibC/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
7 changes: 6 additions & 1 deletion Toolchain/BuildIt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ echo $DIR

TARGET=i686-pc-serenity
PREFIX="$DIR/Local"
SYSROOT="$DIR/../Root"
SYSROOT="$DIR/../Base"

mkdir -p "$DIR/Tarballs"

Expand Down Expand Up @@ -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
6 changes: 5 additions & 1 deletion Toolchain/UseIt.sh
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
#!/bin/bash
#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
export PATH="$DIR/Local/bin:$PATH"
export TOOLCHAIN="$DIR"
echo "$PATH"

0 comments on commit 4977fd2

Please sign in to comment.