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 | |
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')
-rw-r--r-- | module/icp/Makefile.in | 29 | ||||
-rw-r--r-- | module/os/linux/zfs/Makefile.in | 4 | ||||
-rw-r--r-- | module/zcommon/Makefile.in | 4 | ||||
-rw-r--r-- | module/zfs/Makefile.in | 8 |
4 files changed, 13 insertions, 32 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 diff --git a/module/os/linux/zfs/Makefile.in b/module/os/linux/zfs/Makefile.in index 60d92182f..3c4a4cbb1 100644 --- a/module/os/linux/zfs/Makefile.in +++ b/module/os/linux/zfs/Makefile.in @@ -3,9 +3,7 @@ # # Suppress unused-value warnings in sparc64 architecture headers -ifeq ($(target_cpu),sparc64) -ccflags-y += -Wno-unused-value -endif +ccflags-$(CONFIG_SPARC64) += -Wno-unused-value ccflags-y += -I@abs_top_srcdir@/module/os/linux/zfs diff --git a/module/zcommon/Makefile.in b/module/zcommon/Makefile.in index 0ac0d43ee..b2e34f2e9 100644 --- a/module/zcommon/Makefile.in +++ b/module/zcommon/Makefile.in @@ -9,9 +9,7 @@ obj-$(CONFIG_ZFS) := $(MODULE).o ccflags-y := $(ZFS_MODULE_CFLAGS) $(ZFS_MODULE_CPPFLAGS) # Suppress unused-value warnings in sparc64 architecture headers -ifeq ($(target_cpu),sparc64) -ccflags-y += -Wno-unused-value -endif +ccflags-$(CONFIG_SPARC64) += -Wno-unused-value $(MODULE)-objs += zfeature_common.o $(MODULE)-objs += zfs_comutil.o diff --git a/module/zfs/Makefile.in b/module/zfs/Makefile.in index a98ba4fac..ef35ea5dd 100644 --- a/module/zfs/Makefile.in +++ b/module/zfs/Makefile.in @@ -8,14 +8,12 @@ obj-$(CONFIG_ZFS) := $(MODULE).o ccflags-y := $(ZFS_MODULE_CFLAGS) $(ZFS_MODULE_CPPFLAGS) -# Suppress unused-value warnings in sparc64 architecture headers -ifeq ($(target_cpu),sparc64) -ccflags-y += -Wno-unused-value -endif - # Suppress unused but set variable warnings often due to ASSERTs ccflags-y += $(NO_UNUSED_BUT_SET_VARIABLE) +# Suppress unused-value warnings in sparc64 architecture headers +ccflags-$(CONFIG_SPARC64) += -Wno-unused-value + $(MODULE)-objs += aggsum.o $(MODULE)-objs += arc.o $(MODULE)-objs += blkptr.o |