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 5bcf944
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 952 deletions.
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 5bcf944

Please sign in to comment.