From 0f28fe2bcdc04126ea23bf92304585981adeda97 Mon Sep 17 00:00:00 2001 From: nobu Date: Sat, 3 Nov 2018 23:10:57 +0000 Subject: [PATCH] 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 --- configure.ac | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index 70d8ed9cc3..622850e371 100644 --- a/configure.ac +++ b/configure.ac @@ -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 - </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=