1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

configure.ac: set CC_WRAPPER by checking message

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65520 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2018-11-03 23:10:57 +00:00
parent 7b84521207
commit 0f28fe2bcd

View file

@ -257,14 +257,13 @@ AS_CASE(["$build_os"],
# Xcode linker warns for deprecated architecture and wrongly
# installed TBD files.
CC_WRAPPER=""
AS_IF([! $CC -E -xc - <<SRC >/dev/null 2>&1], [
@%:@if defined __APPLE_CC__ && defined __clang_major__ && __clang_major__ >= 10
@%:@error ignore linker warnings
@%:@endif
SRC
echo 'int main(void) {return 0;}' > conftest.c
AS_IF([$CC -framework Foundation -o conftest conftest.c 2>&1 |
grep '^ld: warning: text-based stub file' >/dev/null], [
CC_WRAPPER=`cd -P "$srcdir/tool" && pwd`/darwin-cc
CC="$CC_WRAPPER $CC"
])
rm -fr conftest*
])
cc_version=