aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Young <wenzhang5800@gmail.com>2021-06-18 19:41:41 +0800
committerThomas Young <wenzhang5800@gmail.com>2021-06-18 20:03:16 +0800
commitabdb744aecb0cc08b23e58867daaed65e89051dc (patch)
treea78cb33a457f17e7d88d8992e3302c53694e56f8
parentbe78228790d125fe46af339d6b323a6a545f278f (diff)
downloadgcc-abdb744aecb0cc08b23e58867daaed65e89051dc.zip
gcc-abdb744aecb0cc08b23e58867daaed65e89051dc.tar.gz
gcc-abdb744aecb0cc08b23e58867daaed65e89051dc.tar.bz2
Update README.md for building steps on MacOS.
-rw-r--r--README.md15
1 files changed, 15 insertions, 0 deletions
diff --git a/README.md b/README.md
index 192d829..0da8d5a 100644
--- a/README.md
+++ b/README.md
@@ -38,6 +38,8 @@ Clone the repository
$ git clone git@github.com:Rust-GCC/gccrs.git
```
+#### Linux
+
It is important to remember that GNU toolchain projects are designed to be built outside of their source directory
which is why a build directory is created.
@@ -48,6 +50,19 @@ $ ../gccrs/configure --prefix=$HOME/gccrs-install --disable-bootstrap --enable-m
$ make
```
+#### MacOS
+
+The path of header dir and sysroot should be specified when you configure the project.
+```bash
+$ mkdir mac-build
+$ cd mac-build
+$ ../gccrs/configure --prefix=$HOME/gccrs-install --disable-bootstrap --enable-multilib --enable-languages=rust --with-native-system-header-dir=/usr/include --with-sysroot=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
+$ make
+
+```
+
+#### Running GCC Rust
+
Running the compiler itself without make install we can simply invoke the compiler proper:
```bash