Skip to content

Commit

Permalink
Build: get rid of UseIt.sh
Browse files Browse the repository at this point in the history
The build system uses relative paths to the toolchain binaries, so
modifying $PATH is no longer necessary, and nothing needs
$SERENITY_ROOT anymore.
  • Loading branch information
jcs authored and awesomekling committed Dec 20, 2019
1 parent 23158ae commit 73c953b
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 22 deletions.
5 changes: 0 additions & 5 deletions Kernel/makeall.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
#!/bin/sh
if [ -z "$SERENITY_ROOT" ]; then
echo "You must source Toolchain/UseIt.sh to build Serenity."
exit 1
fi

set -e

# Get user and group details for setting qemu disk image ownership
Expand Down
10 changes: 5 additions & 5 deletions Ports/.port_include.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#!/bin/bash
if [ -z "$SERENITY_ROOT" ]; then
echo "You must source UseIt.sh to build ports."
exit 1
fi
set -eu
prefix=$(pwd)/..

SCRIPT=`dirname $0`
export SERENITY_ROOT=`realpath $SCRIPT/../`
prefix=$SERENITY_ROOT/Ports

export CC=i686-pc-serenity-gcc
export CXX=i686-pc-serenity-g++
export PATH=$SERENITY_ROOT/Toolchain/Local/bin:$PATH

. "$@"
shift
Expand Down
4 changes: 2 additions & 2 deletions ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ sudo apt-get install gcc-8 g++-8
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 800 --slave /usr/bin/g++ g++ /usr/bin/g++-8
```

Go into the `Toolchain/` directory and run the **BuildIt.sh** script. Then ***source*** the **UseIt.sh** script to put the `i686-pc-serenity` toolchain in your `$PATH`.
Go into the `Toolchain/` directory and run the **BuildIt.sh** script.

Once you've done both of those, go into the `Kernel/` directory, then run
Once you've built the toolchain, go into the `Kernel/` directory, then run
**./makeall.sh**, and if nothing breaks too much, take it for a spin by using
**./run**.

Expand Down
1 change: 0 additions & 1 deletion Toolchain/BuildIt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ echo PREFIX is "$PREFIX"
echo SYSROOT is "$SYSROOT"

mkdir -p "$DIR/Tarballs"
source "$DIR/UseIt.sh"

BINUTILS_VERSION="2.33.1"
BINUTILS_MD5SUM="1a6b16bcc926e312633fcc3fae14ba0a"
Expand Down
9 changes: 0 additions & 9 deletions Toolchain/UseIt.sh

This file was deleted.

0 comments on commit 73c953b

Please sign in to comment.