Skip to content

Commit fac8d3a

Browse files
authored
Merge pull request rust-lang#238 from GuillaumeGomez/fix-build-instructions
Fix gcc build instructions
2 parents cc5c387 + 1a2c8b0 commit fac8d3a

File tree

1 file changed

+24
-9
lines changed

1 file changed

+24
-9
lines changed

Readme.md

+24-9
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,32 @@ To build it (most of these instructions come from [here](https://gcc.gnu.org/onl
2222

2323
```bash
2424
$ git clone https://github.com/antoyo/gcc
25-
$ cd gcc
2625
$ sudo apt install flex libmpfr-dev libgmp-dev libmpc3 libmpc-dev
27-
$ ./configure \
28-
--enable-host-shared \
29-
--enable-languages=jit \
30-
--disable-bootstrap \
31-
--enable-checking=release \
32-
--prefix=$(pwd)/install \
33-
--disable-multilib
26+
$ mkdir gcc-build gcc-install
27+
$ cd gcc-build
28+
$ ../gcc/configure \
29+
--enable-host-shared \
30+
--enable-languages=jit \
31+
--enable-checking=release \ # it enables extra checks which allow to find bugs
32+
--disable-bootstrap \
33+
--disable-multilib \
34+
--prefix=$(pwd)/../gcc-install
3435
$ make -j4 # You can replace `4` with another number depending on how many cores you have.
35-
$ cd ..
36+
```
37+
38+
If you want to run libgccjit tests, you will need to also enable the C++ language in the `configure`:
39+
40+
```bash
41+
--enable-languages=jit,c++
42+
```
43+
44+
Then to run libgccjit tests:
45+
46+
```bash
47+
$ cd gcc # from the `gcc-build` folder
48+
$ make check-jit
49+
# To run one specific test:
50+
$ make check-jit RUNTESTFLAGS="-v -v -v jit.exp=jit.dg/test-asm.cc"
3651
```
3752

3853
**Put the path to your custom build of libgccjit in the file `gcc_path`.**

0 commit comments

Comments
 (0)