mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
Unify target_cpu handling
Over the years several slightly different approaches were used in the Makefiles to determine the target architecture. This change updates both the build system and Makefile to handle this in a consistent fashion. TARGET_CPU is set to i386, x86_64, powerpc, aarch6 or sparc64 and made available in the Makefiles to be used as appropriate. Reviewed-by: Ryan Moeller <ryan@ixsystems.com> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #9848
This commit is contained in:
+8
-21
@@ -3,26 +3,6 @@ obj = @abs_builddir@
|
||||
|
||||
MODULE := icp
|
||||
|
||||
TARGET_ASM_DIR = @TARGET_ASM_DIR@
|
||||
|
||||
ifeq ($(TARGET_ASM_DIR), asm-x86_64)
|
||||
ASM_SOURCES := asm-x86_64/aes/aeskey.o
|
||||
ASM_SOURCES += asm-x86_64/aes/aes_amd64.o
|
||||
ASM_SOURCES += asm-x86_64/aes/aes_aesni.o
|
||||
ASM_SOURCES += asm-x86_64/modes/gcm_pclmulqdq.o
|
||||
ASM_SOURCES += asm-x86_64/sha1/sha1-x86_64.o
|
||||
ASM_SOURCES += asm-x86_64/sha2/sha256_impl.o
|
||||
ASM_SOURCES += asm-x86_64/sha2/sha512_impl.o
|
||||
endif
|
||||
|
||||
ifeq ($(TARGET_ASM_DIR), asm-i386)
|
||||
ASM_SOURCES :=
|
||||
endif
|
||||
|
||||
ifeq ($(TARGET_ASM_DIR), asm-generic)
|
||||
ASM_SOURCES :=
|
||||
endif
|
||||
|
||||
obj-$(CONFIG_ZFS) := $(MODULE).o
|
||||
|
||||
asflags-y := -I$(src)/include
|
||||
@@ -66,7 +46,14 @@ $(MODULE)-objs += algs/sha1/sha1.o
|
||||
$(MODULE)-objs += algs/skein/skein.o
|
||||
$(MODULE)-objs += algs/skein/skein_block.o
|
||||
$(MODULE)-objs += algs/skein/skein_iv.o
|
||||
$(MODULE)-objs += $(ASM_SOURCES)
|
||||
|
||||
$(MODULE)-$(CONFIG_X86_64) += asm-x86_64/aes/aeskey.o
|
||||
$(MODULE)-$(CONFIG_X86_64) += asm-x86_64/aes/aes_amd64.o
|
||||
$(MODULE)-$(CONFIG_X86_64) += asm-x86_64/aes/aes_aesni.o
|
||||
$(MODULE)-$(CONFIG_X86_64) += asm-x86_64/modes/gcm_pclmulqdq.o
|
||||
$(MODULE)-$(CONFIG_X86_64) += asm-x86_64/sha1/sha1-x86_64.o
|
||||
$(MODULE)-$(CONFIG_X86_64) += asm-x86_64/sha2/sha256_impl.o
|
||||
$(MODULE)-$(CONFIG_X86_64) += asm-x86_64/sha2/sha512_impl.o
|
||||
|
||||
$(MODULE)-$(CONFIG_X86) += algs/modes/gcm_pclmulqdq.o
|
||||
$(MODULE)-$(CONFIG_X86) += algs/aes/aes_impl_aesni.o
|
||||
|
||||
Reference in New Issue
Block a user