This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH][BZ #6816][1/5] Configure check for .machine "power7"
- From: Carlos Eduardo Seo <cseo at linux dot vnet dot ibm dot com>
- To: libc-alpha at sourceware dot org
- Date: Tue, 05 Aug 2008 19:44:24 -0300
- Subject: [PATCH][BZ #6816][1/5] Configure check for .machine "power7"
- Openpgp: id=8BFFA900
Added a configure check for .machine "power7" and #define
HAVE_ASM_PPC_VSX based on that. That #define is used to guard VSX
instructions in the *context routines.
--
Carlos Eduardo Seo
Software Engineer
IBM Linux Technology Center
2008-07-31 Carlos Eduardo Seo <cseo@linux.vnet.ibm.com>
Steven Munroe <sjmunroe@us.ibm.com>
[BZ #6816]
* sysdeps/powerpc/configure.in: Added a check for
.machine "power7". Define HAVE_ASM_PPC_VSX based
on that.
Index: libc/sysdeps/powerpc/configure.in
===================================================================
--- libc.orig/sysdeps/powerpc/configure.in 2008-07-31 16:37:35.000000000 -0500
+++ libc/sysdeps/powerpc/configure.in 2008-07-31 16:39:27.000000000 -0500
@@ -19,3 +19,24 @@
*** .machine "altivec"
*** is needed.])
fi
+
+AC_CACHE_CHECK(for .machine support, libc_cv_ppc_machine, [dnl
+cat > conftest.s <<\EOF
+ .machine "power7"
+ blr
+EOF
+if AC_TRY_COMMAND(${CC-cc} -c $CFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD); then
+ libc_cv_ppc_vsx=yes
+else
+ libc_cv_ppc_vsx=no
+fi
+rm -f conftest*])
+if test $libc_cv_ppc_vsx != yes; then
+ AC_MSG_ERROR([
+*** A binutils version which can handle
+*** .machine "power7"
+*** is needed.])
+else
+ AC_DEFINE(HAVE_ASM_PPC_VSX)
+fi
+