Skip to content

Commit 413120e

Browse files
committed
Do not use objcopy on macOS
On macOS, it is not used to localize symbols in dynamic libraries (libruby.dylib and libyjit.o). Instead, using `objcopy` which does not support recent mach-O causes linker errors as bellow. ``` linking shared-library libruby.3.3.dylib error: cannot parse the debug map for 'libruby.3.3.dylib': Invalid data was encountered while parsing the file linking ruby ld: malformed mach-o: LC_*_DYLIB load command string extends beyond end of load command file './libruby.3.3.dylib' clang: error: linker command failed with exit code 1 (use -v to see invocation) ```
1 parent fba8f77 commit 413120e

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

configure.ac

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ AS_CASE(["${build_os}"],
235235
AC_PATH_TOOL([NM], [nm], [/usr/ccs/bin/nm], [/usr/ccs/bin:$PATH])
236236
])
237237
AS_CASE(["${target_os}"],
238-
[cygwin*|msys*|mingw*], [
238+
[cygwin*|msys*|mingw*|darwin*], [
239239
ac_cv_prog_ac_ct_OBJCOPY=":"
240240
])
241241

@@ -507,15 +507,6 @@ AS_CASE(["$target_os"],
507507
[hiuxmpp*], [AC_DEFINE(__HIUX_MPP__)]) # by TOYODA Eizi <toyoda@npd.kishou.go.jp>
508508

509509

510-
AS_IF([test "$OBJCOPY" != :], [
511-
AC_MSG_CHECKING([if $OBJCOPY works to localize symbols])
512-
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[void conftest_objcopy(void) {}]])],
513-
[
514-
$OBJCOPY -w -L '*conftest_*' conftest.$OBJEXT 2>/dev/null || OBJCOPY=:
515-
])
516-
AS_IF([test "$OBJCOPY" = :], [AC_MSG_RESULT(no)], [AC_MSG_RESULT(yes)])
517-
])
518-
519510
AC_PROG_LN_S
520511
AC_PROG_MAKE_SET
521512
AC_PROG_INSTALL

0 commit comments

Comments
 (0)