diff options
author | Brian Behlendorf <[email protected]> | 2020-01-17 12:40:09 -0800 |
---|---|---|
committer | GitHub <[email protected]> | 2020-01-17 12:40:09 -0800 |
commit | 70835c5b755e4fe1e16724e0a5d24e7e451f755c (patch) | |
tree | 9da58ece476b54ab6e0bda786f60c4da2dc2fc8d /module/icp | |
parent | e5030fbc2846c347f58e3a0bae436da84b98ef16 (diff) |
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 <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #9848
Diffstat (limited to 'module/icp')
-rw-r--r-- | module/icp/Makefile.in | 29 |
1 files changed, 8 insertions, 21 deletions
diff --git a/module/icp/Makefile.in b/module/icp/Makefile.in index 18e8dc313..9e1f2906d 100644 --- a/module/icp/Makefile.in +++ b/module/icp/Makefile.in @@ -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 |