about summary refs log tree commit diff
diff options
context:
space:
mode:
authorantoyo <antoyo@users.noreply.github.com>2022-10-24 12:17:56 -0400
committerGitHub <noreply@github.com>2022-10-24 12:17:56 -0400
commitfac8d3aacfad27f9012b11f69118cf5df845055d (patch)
treee60e86bf8f4154bb7ce9e713e71e6744fbbbc495
parentcc5c38717da46b561a392d56ba27848533056b7b (diff)
parent1a2c8b01cbc53322845607af8cc041133d37f36a (diff)
downloadrust-fac8d3aacfad27f9012b11f69118cf5df845055d.tar.gz
rust-fac8d3aacfad27f9012b11f69118cf5df845055d.zip
Merge pull request #238 from GuillaumeGomez/fix-build-instructions
Fix gcc build instructions
-rw-r--r--Readme.md33
1 files changed, 24 insertions, 9 deletions
diff --git a/Readme.md b/Readme.md
index 4d776b6c7a3..c681e3ca3bc 100644
--- a/Readme.md
+++ b/Readme.md
@@ -22,17 +22,32 @@ To build it (most of these instructions come from [here](https://gcc.gnu.org/onl
 
 ```bash
 $ git clone https://github.com/antoyo/gcc
-$ cd gcc
 $ sudo apt install flex libmpfr-dev libgmp-dev libmpc3 libmpc-dev
-$ ./configure \
-   --enable-host-shared \
-   --enable-languages=jit \
-   --disable-bootstrap \
-   --enable-checking=release \
-   --prefix=$(pwd)/install \
-   --disable-multilib
+$ mkdir gcc-build gcc-install
+$ cd gcc-build
+$ ../gcc/configure \
+    --enable-host-shared \
+    --enable-languages=jit \
+    --enable-checking=release \ # it enables extra checks which allow to find bugs
+    --disable-bootstrap \
+    --disable-multilib \
+    --prefix=$(pwd)/../gcc-install
 $ make -j4 # You can replace `4` with another number depending on how many cores you have.
-$ cd ..
+```
+
+If you want to run libgccjit tests, you will need to also enable the C++ language in the `configure`:
+
+```bash
+--enable-languages=jit,c++
+```
+
+Then to run libgccjit tests:
+
+```bash
+$ cd gcc # from the `gcc-build` folder
+$ make check-jit
+# To run one specific test:
+$ make check-jit RUNTESTFLAGS="-v -v -v jit.exp=jit.dg/test-asm.cc"
 ```
 
 **Put the path to your custom build of libgccjit in the file `gcc_path`.**