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

Don't set LDFLAGS by default

This fixes a bug where Ruby on macOS running on ARM would try to look in
`/usr/local/lib` for things to link against, but the libraries in that
directory are from the x86 installation of Homebrew

[ruby-core:108424]
This commit is contained in:
Aaron Patterson 2022-04-27 15:37:58 -07:00 committed by Aaron Patterson
parent 0eb237d99c
commit 907b31d7b9
Notes: git 2022-04-29 07:15:10 +09:00

View file

@ -1007,13 +1007,6 @@ AS_CASE(["$target_os"],
])
ac_cv_func_getcontext=no
ac_cv_func_setcontext=no
incs=`$CC -v -E -xc - < /dev/null 2>&1 | sed ['1,/^@%:@include </d;s/^ *//;s|[^./][^/]*/\.\./||g;/\/include$/!d;s||/lib|;/\/usr\/lib/d']`
for d in `$CC -print-search-dirs | sed -e '/^libraries: */!d;s///' | tr : '\012' | fgrep -v /../ | sed -n 's|^\(/.*/lib\)/$|\1|p'`; do
incs=`echo "$incs" | fgrep -v "$d"`
done
for d in $incs; do
test -d "$d" && RUBY_APPEND_OPTIONS(LDFLAGS, "-L$d")
done
ac_cv_type_getgroups=gid_t # getgroups() on Rosetta fills garbage
ac_cv_lib_crypt_crypt=no
ac_cv_func_fdatasync=no # Mac OS X wrongly reports it has fdatasync()