Skip to content

Commit

Permalink
fix: With arch flags
Browse files Browse the repository at this point in the history
  • Loading branch information
howjmay committed Oct 30, 2023
1 parent e758ae0 commit c11a564
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 975 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ tests/main
.vs/
Debug/
Release/
*.log
10 changes: 8 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ else # CROSS_COMPILE was set
$(error Unsupported cross-compiler)
endif

ARCH_CFLAGS = -march=$(processor)gcv_zba

ifeq ($(SIMULATOR_TYPE), qemu)
SIMULATOR += qemu-riscv64
SIMULATOR_FLAGS = -cpu $(processor),v=true,zba=true,vlen=128
Expand All @@ -40,6 +38,14 @@ else # CROSS_COMPILE was set
endif
endif

ifeq ($(processor),$(filter $(processor),rv64 rv32))
ARCH_CFLAGS = -march=$(processor)gcv_zba
else ifeq ($(processor),$(filter $(processor),i386 x86_64))
ARCH_CFLAGS = -maes -mpclmul -mssse3 -msse4.2
else
$(error Unsupported architecture)
endif

CXXFLAGS += -Wall -Wcast-qual -I. $(ARCH_CFLAGS)
LDFLAGS += -lm
OBJS = \
Expand Down
Loading

0 comments on commit c11a564

Please sign in to comment.