[前][次][番号順一覧][スレッド一覧]

ruby-changes:63771

From: Yusuke <ko1@a...>
Date: Fri, 27 Nov 2020 19:53:42 +0900 (JST)
Subject: [ruby-changes:63771] 5d8fe1267d (master): configure.ac: Check x86intrin.h only when the target CPU is x86

https://git.ruby-lang.org/ruby.git/commit/?id=5d8fe1267d

From 5d8fe1267d2d4e60943e7b41f6dad990a53e077b Mon Sep 17 00:00:00 2001
From: Yusuke Endoh <mame@r...>
Date: Fri, 27 Nov 2020 17:51:07 +0900
Subject: configure.ac: Check x86intrin.h only when the target CPU is x86

The check output a warning on M1 Mac mini

http://rubyci.s3.amazonaws.com/osx1100arm/ruby-master/log/20201127T074507Z.log.html.gz
```
checking x86intrin.h usability... no
checking x86intrin.h presence... yes
configure: WARNING: x86intrin.h: present but cannot be compiled
configure: WARNING: x86intrin.h:     check for missing prerequisite headers?
configure: WARNING: x86intrin.h: see the Autoconf documentation
configure: WARNING: x86intrin.h:     section "Present But Cannot Be Compiled"
configure: WARNING: x86intrin.h: proceeding with the compiler's result
checking for x86intrin.h... no
```

diff --git a/configure.ac b/configure.ac
index c2b1a07..6c6d73f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1204,7 +1204,9 @@ AC_CHECK_HEADERS(syscall.h) https://github.com/ruby/ruby/blob/trunk/configure.ac#L1204
 AC_CHECK_HEADERS(time.h)
 AC_CHECK_HEADERS(ucontext.h)
 AC_CHECK_HEADERS(utime.h)
-AC_CHECK_HEADERS(x86intrin.h)
+AS_CASE("$target_cpu", [x64|x86_64|i[3-6]86*], [
+  AC_CHECK_HEADERS(x86intrin.h)
+])
 
 AC_ARG_WITH([gmp],
   [AS_HELP_STRING([--without-gmp],
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]