riscv32mini: include the path of origin source

* this supports including other files in the original .S source
This commit is contained in:
Zihao Yu 2024-02-20 09:58:55 +08:00
parent 031dd9d931
commit 9d1cb1d563
2 changed files with 2 additions and 3 deletions

View file

@ -20,5 +20,3 @@ AM_SRCS += riscv/npc/libgcc/div.S \
riscv/npc/libgcc/multi3.c \
riscv/npc/libgcc/ashldi3.c \
riscv/npc/libgcc/unused.c
INC_PATH += $(AM_HOME)/am/src/riscv/npc/libgcc

View file

@ -26,4 +26,5 @@ lut_bin_path=$rvmini_path/lut.bin
sed -i "1i#include \"$rvmini_path/inst-replace.h\"" $dst_S
flock $rvmini_path/.lock -c "test -e $lut_bin_path || (cd $rvmini_path && gcc gen-lut.c && ./a.out && rm a.out)"
riscv64-linux-gnu-gcc $flags -D_LUT_BIN_PATH=\"$lut_bin_path\" -Wno-trigraphs -c -o $dst $dst_S
src_dir=`dirname $src`
riscv64-linux-gnu-gcc -I$src_dir $flags -D_LUT_BIN_PATH=\"$lut_bin_path\" -Wno-trigraphs -c -o $dst $dst_S