Skip to content

Commit

Permalink
Override ARCH_CFLAGS
Browse files Browse the repository at this point in the history
  • Loading branch information
Cuda-Chen committed Nov 27, 2023
1 parent a1e359b commit 20a7216
Showing 1 changed file with 17 additions and 9 deletions.
26 changes: 17 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,24 @@ EXEC_WRAPPER = qemu-$(processor)
endif

# Follow platform-specific configurations
ifeq ($(processor),$(filter $(processor),aarch64 arm64))
ARCH_CFLAGS = -march=armv8-a+fp+simd
else ifeq ($(processor),$(filter $(processor),i386 x86_64))
ARCH_CFLAGS = -maes -mpclmul -mssse3 -msse4.2
else ifeq ($(processor),$(filter $(processor),arm armv7 armv7l))
ifeq ($(ARCH_CFLAGS),)
ARCH_CFLAGS = -mfpu=neon
ARCH_CFLAGS ?=
ARCH_CFLAGS_IS_SET =
ifeq ($(ARCH_CFLAGS),)
ARCH_CFLAGS_IS_SET = true
endif
ifeq ($(ARCH_CFLAGS),none)
ARCH_CFLAGS_IS_SET = true
endif
ifdef ARCH_CFLAGS_IS_SET
ifeq ($(processor),$(filter $(processor),aarch64 arm64))
override ARCH_CFLAGS := -march=armv8-a+fp+simd
else ifeq ($(processor),$(filter $(processor),i386 x86_64))
override ARCH_CFLAGS := -maes -mpclmul -mssse3 -msse4.2
else ifeq ($(processor),$(filter $(processor),arm armv7 armv7l))
override ARCH_CFLAGS := -mfpu=neon
else
$(error Unsupported architecture)
endif
else
$(error Unsupported architecture)
endif

FEATURE ?=
Expand Down

0 comments on commit 20a7216

Please sign in to comment.