ruby-changes:52590
From: nobu <ko1@a...>
Date: Fri, 21 Sep 2018 16:19:19 +0900 (JST)
Subject: [ruby-changes:52590] nobu:r64802 (trunk): darwin-cc: hide ld warnings
nobu 2018-09-21 16:19:13 +0900 (Fri, 21 Sep 2018) New Revision: 64802 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=64802 Log: 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. Added files: trunk/tool/darwin-cc Modified files: trunk/configure.ac Index: tool/darwin-cc =================================================================== --- tool/darwin-cc (nonexistent) +++ tool/darwin-cc (revision 64802) @@ -0,0 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/tool/darwin-cc#L1 +#!/bin/bash +exec 2> >(exec grep -v \ + -e '^ld: warning: The [a-z0-9_][a-z0-9_]* architecture is deprecated for macOS' \ + -e '^ld: warning: text-based stub file /System/Library/Frameworks/' \ + >&2) +exec "$@" Property changes on: tool/darwin-cc ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Index: configure.ac =================================================================== --- configure.ac (revision 64801) +++ configure.ac (revision 64802) @@ -211,6 +211,18 @@ AS_CASE(["$build_os"], https://github.com/ruby/ruby/blob/trunk/configure.ac#L211 [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([ https://github.com/ruby/ruby/blob/trunk/configure.ac#L410 ] ) - # 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 https://github.com/ruby/ruby/blob/trunk/configure.ac#L3823 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], [ -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/