diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-09-21 07:19:13 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-09-21 07:19:13 +0000 |
commit | d00199a1397c301b57dd108b41001801a25a04b9 (patch) | |
tree | dece488bb20716e6fe132acb107d223c321f3e5c /configure.ac | |
parent | 02cb9c932a6e1a25b5e04c77053face048a11eff (diff) | |
download | ruby-d00199a1397c301b57dd108b41001801a25a04b9.tar.gz |
darwin-cc: hide ld warnings
* tool/darwin-cc: ld in Apple's recent Xcode warns text-based stub
files, which are probably caused by Apple's broken package.
hide such (and architecture deprecation) warnings during
configuration to pass TRY_LDFLAGS.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64802 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac index bfe7c19ce8..e7f2131679 100644 --- a/configure.ac +++ b/configure.ac @@ -211,6 +211,18 @@ AS_CASE(["$build_os"], [xcc|x/usr/bin/cc], [: ${CXX=c++}], [xicc], [: ${CXX=icpc}], [xclang|x/usr/bin/clang], [: ${CXX=clang++}]) + + # 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 + CC_WRAPPER=`PWD=; cd "$srcdir/tool" && pwd`/darwin-cc + CC="$CC_WRAPPER $CC" + ]) ]) test -z "$CXX" || ac_cv_prog_CXX="$CXX" @@ -398,10 +410,6 @@ RUBY_WERROR_FLAG([ ] ) - # now Xcode linker warns for deprecated architecture and wrongly - # installed TBD files. - AS_CASE(["$target_os"], [darwin*], [ac_c_werror_flag=]) - AC_MSG_CHECKING([whether LDFLAGS is valid]) { mkdir tmp.$$.try_link && @@ -3815,6 +3823,13 @@ PACKAGE=$RUBY_BASE_NAME AC_SUBST(PACKAGE) AS_MESSAGE([$PACKAGE library version = $ruby_version]) +AS_CASE(["$build_os"], [darwin1*.*], [ + AS_IF([test x"$CC_WRAPPER" != x], [ + CC="${CC@%:@$CC_WRAPPER }" + CPP="${CPP@%:@$CC_WRAPPER }" + ]) +]) + AS_CASE([" $CPP "], [*" $CC "*], [CPP=`echo " $CPP " | sed "s| $CC |"' $(CC) |;s/^ *//;s/ *$//'`]) AS_IF([test x"$firstmf" != x], [ |