[],
[#include <pthread.h>])
-# Convenience function. Set flags based on the existing HWCAP entries.
-# The AT_HWCAP entries are generated by glibc, and are based on
-# functions supported by the hardware/system/libc.
-# Subsequent support for whether the capability will actually be utilized
-# will also be checked against the compiler capabilities.
-# called as
-# AC_HWCAP_CONTAINS_FLAG[hwcap_string_to_match],[VARIABLE_TO_SET]
-AC_DEFUN([AC_HWCAP_CONTAINS_FLAG],[
- AUXV_CHECK_FOR=$1
- AC_MSG_CHECKING([if AT_HWCAP contains the $AUXV_CHECK_FOR indicator])
- if env LD_SHOW_AUXV=1 true | grep ^AT_HWCAP | grep -q -w ${AUXV_CHECK_FOR}
- then
- AC_MSG_RESULT([yes])
- AC_SUBST([$2],[yes])
- else
- AC_MSG_RESULT([no])
- AC_SUBST([$2],[])
- fi
-])
-
-# gather hardware capabilities. (hardware/kernel/libc)
-AC_HWCAP_CONTAINS_FLAG([altivec],[HWCAP_HAS_ALTIVEC])
-AC_HWCAP_CONTAINS_FLAG([vsx],[HWCAP_HAS_VSX])
-AC_HWCAP_CONTAINS_FLAG([dfp],[HWCAP_HAS_DFP])
-AC_HWCAP_CONTAINS_FLAG([arch_2_05],[HWCAP_HAS_ISA_2_05])
-AC_HWCAP_CONTAINS_FLAG([arch_2_06],[HWCAP_HAS_ISA_2_06])
-AC_HWCAP_CONTAINS_FLAG([arch_2_07],[HWCAP_HAS_ISA_2_07])
-AC_HWCAP_CONTAINS_FLAG([arch_3_00],[HWCAP_HAS_ISA_3_00])
-AC_HWCAP_CONTAINS_FLAG([arch_3_1],[HWCAP_HAS_ISA_3_1])
-AC_HWCAP_CONTAINS_FLAG([htm],[HWCAP_HAS_HTM])
-AC_HWCAP_CONTAINS_FLAG([mma],[HWCAP_HAS_MMA])
# ISA Levels
-AM_CONDITIONAL(HAS_ISA_2_05, [test x$HWCAP_HAS_ISA_2_05 = xyes])
-AM_CONDITIONAL(HAS_ISA_2_06, [test x$HWCAP_HAS_ISA_2_06 = xyes])
+# ISA 2.05 (POWER6) is assumed always available on any supported PowerPC system
+AM_CONDITIONAL(HAS_ISA_2_05, [true])
# compiler support for isa 2.07 level instructions
AC_MSG_CHECKING([that assembler knows ISA 2.07 instructions ])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
ac_asm_have_isa_2_07=no
AC_MSG_RESULT([no])
])
-AM_CONDITIONAL(HAS_ISA_2_07, [test x$ac_asm_have_isa_2_07 = xyes \
- -a x$HWCAP_HAS_ISA_2_07 = xyes])
+AM_CONDITIONAL(HAS_ISA_2_07, [test x$ac_asm_have_isa_2_07 = xyes])
# altivec (vsx) support.
# does this compiler support -maltivec and does it have the include file
AC_MSG_RESULT([no])
])
CFLAGS=$safe_CFLAGS
-AM_CONDITIONAL([HAS_ALTIVEC], [test x$ac_have_altivec = xyes \
- -a x$HWCAP_HAS_ALTIVEC = xyes])
+AM_CONDITIONAL([HAS_ALTIVEC], [test x$ac_have_altivec = xyes])
# Check that both: the compiler supports -mvsx and that the assembler
# understands VSX instructions. If either of those doesn't work,
])
CFLAGS=$safe_CFLAGS
AM_CONDITIONAL([HAS_VSX], [test x$ac_compiler_supports_vsx_flag = xyes \
- -a x$ac_compiler_supports_vsx = xyes \
- -a x$HWCAP_HAS_VSX = xyes ])
+ -a x$ac_compiler_supports_vsx = xyes])
+
+# HAS_ISA_2_06 uses the VSX assembler check since VSX support implies ISA 2.06
+AM_CONDITIONAL(HAS_ISA_2_06, [test x$ac_compiler_supports_vsx = xyes])
# DFP (Decimal Float)
# The initial DFP support was added in Power 6. The dcffix instruction
])
CFLAGS=$safe_CFLAGS
AM_CONDITIONAL(HAS_DFP, test x$ac_asm_have_dfp = xyes \
- -a x$ac_compiler_have_dfp = xyes \
- -a x$HWCAP_HAS_DFP = xyes )
+ -a x$ac_compiler_have_dfp = xyes)
AC_MSG_CHECKING([that compiler knows DFP datatypes])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
ac_compiler_have_dfp_type=no
AC_MSG_RESULT([no])
])
-AM_CONDITIONAL(BUILD_DFP_TESTS, test x$ac_compiler_have_dfp_type = xyes \
- -a x$HWCAP_HAS_DFP = xyes )
+AM_CONDITIONAL(BUILD_DFP_TESTS, test x$ac_compiler_have_dfp_type = xyes)
# HTM (Hardware Transactional Memory)
CFLAGS=$safe_CFLAGS
AM_CONDITIONAL(SUPPORTS_HTM, test x$ac_compiler_supports_htm = xyes \
- -a x$ac_compiler_sees_htm_builtins = xyes \
- -a x$HWCAP_HAS_HTM = xyes )
+ -a x$ac_compiler_sees_htm_builtins = xyes)
# isa 3.0 checking. (actually 3.0 or newer)
AC_MSG_CHECKING([that assembler knows ISA 3.00 ])
])
-AM_CONDITIONAL(HAS_ISA_3_00, [test x$ac_asm_have_isa_3_00 = xyes \
- -a x$HWCAP_HAS_ISA_3_00 = xyes])
+AM_CONDITIONAL(HAS_ISA_3_00, [test x$ac_asm_have_isa_3_00 = xyes])
AM_CONDITIONAL(HAS_XSCVHPDP, [test x$ac_asm_have_xscvhpdp = xyes])
AM_CONDITIONAL(HAS_DARN, [test x$ac_asm_have_darn_inst = xyes])
-AM_CONDITIONAL(HAS_ISA_3_1, [test x$ac_asm_have_isa_3_1 = xyes \
- -a x$HWCAP_HAS_ISA_3_1 = xyes])
+AM_CONDITIONAL(HAS_ISA_3_1, [test x$ac_asm_have_isa_3_1 = xyes])
# Check for pthread_create@GLIBC2.0
AC_MSG_CHECKING([for pthread_create@GLIBC2.0()])