diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2023-04-09 22:47:26 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-09 22:47:26 +0900 |
commit | 038f9ade3c4d965415e4956561975454cf9eeb21 (patch) | |
tree | 1344237e1a624cb9c8995d6ec2bb026fb926b2b4 | |
parent | 3423ba9cef7e6f3604719ef1f84c66f0de82603c (diff) | |
download | ruby-038f9ade3c4d965415e4956561975454cf9eeb21.tar.gz |
Use tools appropriate with CC
To get rid of mysterious errors such as:
```
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/nm: error: libruby.3.3-static.a(/): The end of the file was unexpectedly encountered
```
and
```
ld: warning: ignoring file ../../libruby.3.3-static.a, building for macOS-x86_64 but attempting to link with file built for macOS-x86_64
Undefined symbols for architecture x86_64:
"_rb_rational_num", referenced from:
```
-rw-r--r-- | configure.ac | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 68ad4fef8c..a9cd745d31 100644 --- a/configure.ac +++ b/configure.ac @@ -233,6 +233,12 @@ AS_CASE(["${build_os}"], ], [aix*], [ AC_PATH_TOOL([NM], [nm], [/usr/ccs/bin/nm], [/usr/ccs/bin:$PATH]) +], +[darwin*], [ + # For Apple clang version 14.0.3 (clang-1403.0.22.14.1) + ac_cv_prog_ac_ct_AR=`$CC -print-prog-name=ar` + ac_cv_prog_ac_ct_LD=`$CC -print-prog-name=ld` + ac_cv_prog_ac_ct_NM=`$CC -print-prog-name=nm` ]) AS_CASE(["${target_os}"], [cygwin*|msys*|mingw*|darwin*], [ |