diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2023-02-14 18:37:33 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2023-02-14 18:47:29 +0900 |
commit | ef9efcf0bf699f772fcc2e70f96f7db840e03fc0 (patch) | |
tree | cc3f5ae414896f5606e8e8cbd48c38c0491401ec /configure.ac | |
parent | 2490b2e1216f02aa896abdf121a28e50cac107c3 (diff) | |
download | ruby-ef9efcf0bf699f772fcc2e70f96f7db840e03fc0.tar.gz |
Check if objcopy works to localize symbol
LLVM objcopy does not support localizing symbols option, e.g,
`--localize-symbol` and `--keep-global-symbol`, for MachO.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index ff903a9260..fa5f815042 100644 --- a/configure.ac +++ b/configure.ac @@ -506,6 +506,16 @@ AS_CASE(["$target_os"], ], [hiuxmpp*], [AC_DEFINE(__HIUX_MPP__)]) # by TOYODA Eizi <toyoda@npd.kishou.go.jp> + +AS_IF([test "$OBJCOPY" != :], [ + AC_MSG_CHECKING([if $OBJCOPY works to localize symbols]) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[void conftest_objcopy(void) {}]])], + [ + $OBJCOPY -w -L '*conftest_*' conftest.$OBJEXT 2>/dev/null || OBJCOPY=: + ]) + AS_IF([test "$OBJCOPY" = :], [AC_MSG_RESULT(no)], [AC_MSG_RESULT(yes)]) +]) + AC_PROG_LN_S AC_PROG_MAKE_SET AC_PROG_INSTALL |