ruby-changes:66057
From: Yusuke <ko1@a...>
Date: Wed, 5 May 2021 13:01:44 +0900 (JST)
Subject: [ruby-changes:66057] e71c9ca529 (master): configure.ac: check if __builtin_expect is available or not
https://git.ruby-lang.org/ruby.git/commit/?id=e71c9ca529 From e71c9ca529f1dce2c3816653cd974ce786eea7d8 Mon Sep 17 00:00:00 2001 From: Yusuke Endoh <mame@r...> Date: Wed, 5 May 2021 12:58:12 +0900 Subject: configure.ac: check if __builtin_expect is available or not include/ruby/internal/has/builtin.h uses HAVE_BUILTIN___BUILTIN_EXPECT for icc but previously it was not defined. This is a follow up of 8b32de2ec9b72d4c9ede19b70ec9497718fb25a6 and this will fix the following failures: http://rubyci.s3.amazonaws.com/icc-x64/ruby-master/log/20210505T030003Z.fail.html.gz ``` 1) Failure: TestMkmf::TestConvertible#test_typeof_builtin [/home/chkbuild/chkbuild/tmp/build/20210505T030003Z/ruby/test/mkmf/test_convertible.rb:9]: convertible_int: checking for convertible type of short... -------------------- short -------------------- convertible_int: checking for convertible type of int... -------------------- int -------------------- convertible_int: checking for convertible type of long... -------------------- long -------------------- convertible_int: checking for convertible type of signed short... -------------------- failed "icc -std=gnu99 -o conftest -I. -I/home/chkbuild/chkbuild/tmp/build/20210505T030003Z/ruby/.ext/include/x86_64-linux -I/home/chkbuild/chkbuild/tmp/build/20210505T030003Z/ruby/include -I./test -O3 -ggdb -Wall -Wextra -Wdeprecated-declarations -Wimplicit-function-declaration -Wimplicit-int -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-unused-parameter -Wunused-variable -diag-disable=175,188,1684,2259,2312 -Wextra-tokens -Wundef conftest.c -L. -L/home/chkbuild/chkbuild/tmp/build/20210505T030003Z/ruby -Wl,-rpath,/home/chkbuild/chkbuild/tmp/build/20210505T030003Z/ruby -L. -fstack-protector-strong -rdynamic -Wl,-export-dynamic -Wl,-rpath,/home/chkbuild/chkbuild/tmp/build/20210505T030003Z/lib -L/home/chkbuild/chkbuild/tmp/build/20210505T030003Z/lib -lruby-static -lz -lpthread -lrt -lrt -ldl -lcrypt -lm -lm -lc" In file included from /home/chkbuild/chkbuild/tmp/build/20210505T030003Z/ruby/include/ruby/defines.h(72), from /home/chkbuild/chkbuild/tmp/build/20210505T030003Z/ruby/include/ruby/ruby.h(23), from /home/chkbuild/chkbuild/tmp/build/20210505T030003Z/ruby/include/ruby.h(39), from conftest.c(1): /home/chkbuild/chkbuild/tmp/build/20210505T030003Z/ruby/include/ruby/backward/2/assume.h(34): warning #193: zero used for undefined preprocessing identifier "HAVE_BUILTIN___BUILTIN_EXPECT" #if RBIMPL_HAS_BUILTIN(__builtin_expect) ... ``` --- configure.ac | 1 + 1 file changed, 1 insertion(+) diff --git a/configure.ac b/configure.ac index 2d11169..d2ea9ea 100644 --- a/configure.ac +++ b/configure.ac @@ -2118,6 +2118,7 @@ AS_IF([test x$rb_cv_builtin___builtin_choose_expr = xyes], [ https://github.com/ruby/ruby/blob/trunk/configure.ac#L2118 ]) RUBY_CHECK_BUILTIN_FUNC(__builtin_types_compatible_p, [__builtin_types_compatible_p(int, int)]) RUBY_CHECK_BUILTIN_FUNC(__builtin_trap, [__builtin_trap()]) +RUBY_CHECK_BUILTIN_FUNC(__builtin_expect, [__builtin_expect(0, 0)]) AS_IF([test "$ac_cv_func_qsort_r" != no], [ AC_CACHE_CHECK(whether qsort_r is GNU version, rb_cv_gnu_qsort_r, -- cgit v1.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/