-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
1 parent
e5030fb
commit 70835c5
Showing
8 changed files
with
61 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,41 @@ | ||
dnl # | ||
dnl # Set the target arch for libspl atomic implementation and the icp | ||
dnl # Set the target cpu architecture. This allows the | ||
dnl # following syntax to be used in a Makefile.am. | ||
dnl # | ||
dnl # ifeq ($(TARGET_CPU),x86_64) | ||
dnl # ... | ||
dnl # endif | ||
dnl # | ||
dnl # if TARGET_CPU_POWERPC | ||
dnl # ... | ||
dnl # else | ||
dnl # ... | ||
dnl # endif | ||
dnl # | ||
AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_ARCH], [ | ||
AC_MSG_CHECKING(for target asm dir) | ||
TARGET_ARCH=`echo ${target_cpu} | sed -e s/i.86/i386/` | ||
case $TARGET_ARCH in | ||
i386|x86_64) | ||
TARGET_ASM_DIR=asm-${TARGET_ARCH} | ||
case $target_cpu in | ||
i?86) | ||
TARGET_CPU=i386 | ||
;; | ||
x86_64) | ||
TARGET_CPU=x86_64 | ||
;; | ||
*) | ||
TARGET_ASM_DIR=asm-generic | ||
powerpc*) | ||
TARGET_CPU=powerpc | ||
;; | ||
aarch64*) | ||
TARGET_CPU=aarch64 | ||
;; | ||
sparc64) | ||
TARGET_CPU=sparc64 | ||
;; | ||
esac | ||
AC_SUBST([TARGET_ASM_DIR]) | ||
AM_CONDITIONAL([TARGET_ASM_X86_64], test $TARGET_ASM_DIR = asm-x86_64) | ||
AM_CONDITIONAL([TARGET_ASM_I386], test $TARGET_ASM_DIR = asm-i386) | ||
AM_CONDITIONAL([TARGET_ASM_GENERIC], test $TARGET_ASM_DIR = asm-generic) | ||
AC_MSG_RESULT([$TARGET_ASM_DIR]) | ||
AC_SUBST(TARGET_CPU) | ||
AM_CONDITIONAL([TARGET_CPU_I386], test $TARGET_CPU = i386) | ||
AM_CONDITIONAL([TARGET_CPU_X86_64], test $TARGET_CPU = x86_64) | ||
AM_CONDITIONAL([TARGET_CPU_POWERPC], test $TARGET_CPU = powerpc) | ||
AM_CONDITIONAL([TARGET_CPU_AARCH64], test $TARGET_CPU = aarch64) | ||
AM_CONDITIONAL([TARGET_CPU_SPARC64], test $TARGET_CPU = sparc64) | ||
]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/atomic.S |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters