[prev in list] [next in list] [prev in thread] [next in thread] 

List:       flac-dev
Subject:    [flac-dev] [PATCH 5/7] Check if compiler supports target attribute on ppc64
From:       Anton Blanchard <anton () ozlabs ! org>
Date:       2018-07-10 21:31:33
Message-ID: 20180710213135.3605-6-anton () ozlabs ! org
[Download RAW message or body]

From: Amitay Isaacs <amitay@ozlabs.org>

Check if the compiler supports __attribute__((target("cpu=power8")))
and __attribute__((target("cpu=power9")))

Signed-off-by: Amitay Isaacs <amitay@ozlabs.org>
---
 configure.ac | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/configure.ac b/configure.ac
index 55078293..3d18bb91 100644
--- a/configure.ac
+++ b/configure.ac
@@ -175,6 +175,26 @@ else
 AC_DEFINE([FLAC__HAS_X86INTRIN], 0)
 fi
 
+if test x"$cpu_ppc64" = xtrue ; then
+
+AC_C_ATTRIBUTE([target("cpu=power8")],
+  [have_cpu_power8=yes],
+  [have_cpu_power8=no])
+if test x"$have_cpu_power8" = xyes ; then
+  AC_DEFINE(FLAC__HAS_TARGET_POWER8)
+  AH_TEMPLATE(FLAC__HAS_TARGET_POWER8, [define if compiler has \
__attribute__((target("cpu=power8"))) support]) +fi
+
+AC_C_ATTRIBUTE([target("cpu=power9")],
+  [have_cpu_power9=yes],
+  [have_cpu_power9=no])
+if test x"$have_cpu_power9" = xyes ; then
+  AC_DEFINE(FLAC__HAS_TARGET_POWER9)
+  AH_TEMPLATE(FLAC__HAS_TARGET_POWER9, [define if compiler has \
__attribute__((target("cpu=power9"))) support]) +fi
+
+fi
+
 case "$host" in
 	i386-*-openbsd3.[[0-3]]) OBJ_FORMAT=aoutb ;;
 	*-*-cygwin|*mingw*) OBJ_FORMAT=win32 ;;
-- 
2.17.1

_______________________________________________
flac-dev mailing list
flac-dev@xiph.org
http://lists.xiph.org/mailman/listinfo/flac-dev


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic