aboutsummaryrefslogtreecommitdiff
path: root/libgo/configure.ac
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2017-01-03 20:41:54 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2017-01-03 20:41:54 +0000
commitb379f8d81f6141336c8585b19f9703bc26b99e2a (patch)
treee91a764a7f1c84b2581d2ad59d2e3c768e807937 /libgo/configure.ac
parentd4eff95b5795146476524ee1d558323ca98eb292 (diff)
downloadgcc-b379f8d81f6141336c8585b19f9703bc26b99e2a.zip
gcc-b379f8d81f6141336c8585b19f9703bc26b99e2a.tar.gz
gcc-b379f8d81f6141336c8585b19f9703bc26b99e2a.tar.bz2
re PR go/78789 (Error: no such instruction: `aesenc %xmm0,%xmm2' when compiling libgo/runtime/aeshash.c)
PR go/78789 runtime: don't build aeshash.c if the assembler doesn't support it This is for CentOS 5, whose assembler does not know the aesinc instruction. Fixes GCC PR 78789. Patch by Uros Bizjak. Reviewed-on: https://go-review.googlesource.com/34796 From-SVN: r244031
Diffstat (limited to 'libgo/configure.ac')
-rw-r--r--libgo/configure.ac18
1 files changed, 18 insertions, 0 deletions
diff --git a/libgo/configure.ac b/libgo/configure.ac
index b7710ca..a326730 100644
--- a/libgo/configure.ac
+++ b/libgo/configure.ac
@@ -934,6 +934,24 @@ if test "x$libgo_cv_as_x86_64_unwind_section_type" = xyes; then
[Define if your assembler supports unwind section type.])
fi
+AC_CACHE_CHECK([assembler supports AES instructions],
+libgo_cv_as_x86_aes, [
+libgo_cv_as_x86_aes=yes
+echo 'aesenc %xmm0, %xmm1' > conftest.s
+CFLAGS_hold=$CFLAGS
+if test "$libgo_cv_c_unused_arguments" = yes; then
+ CFLAGS="$CFLAGS -Qunused-arguments"
+fi
+if $CC $CFLAGS -c conftest.s 2>&1 | grep -i error > /dev/null; then
+ libgo_cv_as_x86_aes=no
+fi
+CFLAGS=$CFLAGS_hold
+])
+if test "x$libgo_cv_as_x86_aes" = xyes; then
+ AC_DEFINE(HAVE_AS_X86_AES, 1,
+ [Define if your assembler supports AES instructions.])
+fi
+
AC_CACHE_SAVE
if test ${multilib} = yes; then