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
|
||||
# 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
|
||||
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
|
||||
|
||||
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)
|
||||
($(KECC) -O $< >$@) || (rm $@ -rf; exit 1)
|
||||
|
||||
.c.o:
|
||||
($(CC) -O -c $< -o $@) || (rm $@ -rf; exit 1)
|
||||
($(CC) -O -fsigned-char -c $< -o $@) || (rm $@ -rf; exit 1)
|
||||
|
||||
$(KECC):
|
||||
cargo build --manifest-path=../Cargo.toml --release --bin kecc
|
||||
|
||||
Reference in New Issue
Block a user