Skip to content

Commit

Permalink
CI: build gcc in a separate directory
Browse files Browse the repository at this point in the history
Signed-off-by: Filip Kokosiński <filip.kokosinski@gmail.com>
  • Loading branch information
fkokosinski committed Jun 21, 2024
1 parent 546afaf commit 6bcae7e
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/pdp1-playground.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ jobs:
- name: Build gcc for PDP-1
run: |
cd pdp1-gcc
./configure --target=pdp1-elf --enable-languages=c --disable-bootstrap
# gcc doesn't support running `./configure` in the source directory
mkdir -p build-gcc
cd build-gcc
../pdp1-gcc/configure --target=pdp1-elf --enable-languages=c --disable-bootstrap
make -j $(nproc) all-gcc
- name: Build samples
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
*.s
*.log
*.sum
build-gcc/
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ sudo make install

## Building gcc
```
cd pdp1-gcc
./configure --target=pdp1-elf --enable-languages=c --disable-bootstrap
mkdir -p build-gcc
cd build-gcc
../pdp1-gcc/configure --target=pdp1-elf --enable-languages=c --disable-bootstrap
make -j $(nproc) all-gcc
```

Expand Down
2 changes: 1 addition & 1 deletion common/common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ objects := $(objects-asm) $(objects-c)
default: $(APP_NAME).rim

%.s: %.c
../pdp1-gcc/host-x86_64-pc-linux-gnu/gcc/cc1 $<
../build-gcc/gcc/cc1 $<

%.o: %.S
pdp1-elf-as $< -o $@
Expand Down

0 comments on commit 6bcae7e

Please sign in to comment.