diff options
author | Mark Goncharov <110403898+mga-sc@users.noreply.github.com> | 2023-05-03 00:56:01 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-02 14:56:01 -0700 |
commit | 54de960a5e4c91734fcfd454fdc7e593c6ac571d (patch) | |
tree | a63a9f02f5b87670c6610e773c87db44e28d5798 | |
parent | 8ce2dc424eab98b907b3117b7515190c62f63c7f (diff) | |
download | riscv-pk-54de960a5e4c91734fcfd454fdc7e593c6ac571d.zip riscv-pk-54de960a5e4c91734fcfd454fdc7e593c6ac571d.tar.gz riscv-pk-54de960a5e4c91734fcfd454fdc7e593c6ac571d.tar.bz2 |
[GCC]: Fix fence.i bug (#296)
There are many issues: 260, 285, 287 has to be solved
This workaround helps to add neccessary zicsr and
zifencei for cssr and fence.i accordingly.
-rw-r--r-- | Makefile.in | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/Makefile.in b/Makefile.in index 05e3a4d..cdb6007 100644 --- a/Makefile.in +++ b/Makefile.in @@ -57,16 +57,27 @@ endif # *** If --with-abi is given but --with-arch is not, then the ISA uses the # compiler's default. + +ifneq (@WITH_ARCH@,) + is_32bit := $(findstring 32,@WITH_ARCH@) +else +ifneq (@host_alias@,) + is_32bit := $(findstring 32,@host_alias@) +else + is_32bit := "" +endif +endif + ifneq (@WITH_ARCH@,) march := -march=@WITH_ARCH@ - is_32bit := $(findstring 32,$(march)) - ifeq (@WITH_ABI@,) - mabi := -mabi=$(if $(is_32bit),ilp32,lp64) - endif +else + march := -march=$(if $(is_32bit),rv32,rv64)im_zicsr_zifencei endif ifneq (@WITH_ABI@,) mabi := -mabi=@WITH_ABI@ +else + mabi := -mabi=$(if $(is_32bit),ilp32,lp64) endif # Installation directories |