mirror of
https://github.com/kmc7468/cs420.git
synced 2025-12-15 23:18:48 +00:00
Add -fsigned-char option
This commit is contained in:
@@ -129,7 +129,7 @@ sudo apt install gcc-riscv64-linux-gnu g++-riscv64-linux-gnu qemu-user-static
|
|||||||
|
|
||||||
```sh
|
```sh
|
||||||
# Compile C source code into RISC-V assembly
|
# Compile C source code into RISC-V assembly
|
||||||
riscv64-linux-gnu-gcc hello.c -S -o hello.S
|
riscv64-linux-gnu-gcc hello.c -S -fsigned-char -o hello.S
|
||||||
|
|
||||||
# Link to an RISC-V executable
|
# Link to an RISC-V executable
|
||||||
riscv64-linux-gnu-gcc -static hello.S -o hello
|
riscv64-linux-gnu-gcc -static hello.S -o hello
|
||||||
|
|||||||
@@ -23,13 +23,13 @@ run-gcc: bench-gcc
|
|||||||
qemu-riscv64-static -L /usr/riscv64-linux-gnu ./bench-gcc
|
qemu-riscv64-static -L /usr/riscv64-linux-gnu ./bench-gcc
|
||||||
|
|
||||||
driver.o: $(SRCS) driver.cpp
|
driver.o: $(SRCS) driver.cpp
|
||||||
$(CXX) $(CFLAGS) -o driver.o -c -I. driver.cpp
|
$(CXX) $(CFLAGS) -fsigned-char -o driver.o -c -I. driver.cpp
|
||||||
|
|
||||||
.c.s: $(KECC)
|
.c.s: $(KECC)
|
||||||
($(KECC) -O $< >$@) || (rm $@ -rf; exit 1)
|
($(KECC) -O $< >$@) || (rm $@ -rf; exit 1)
|
||||||
|
|
||||||
.c.o:
|
.c.o:
|
||||||
($(CC) -O -c $< -o $@) || (rm $@ -rf; exit 1)
|
($(CC) -O -fsigned-char -c $< -o $@) || (rm $@ -rf; exit 1)
|
||||||
|
|
||||||
$(KECC):
|
$(KECC):
|
||||||
cargo build --manifest-path=../Cargo.toml --release --bin kecc
|
cargo build --manifest-path=../Cargo.toml --release --bin kecc
|
||||||
|
|||||||
Reference in New Issue
Block a user