mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Removed dln_a_out
a.out format is considered extinct nowadays.
This commit is contained in:
parent
2dcbc6ef96
commit
1f08b0d18d
Notes:
git
2021-03-24 20:14:25 +09:00
Merged: https://github.com/ruby/ruby/pull/4317 Merged-By: nobu <nobu@ruby-lang.org>
5 changed files with 16 additions and 1069 deletions
62
configure.ac
62
configure.ac
|
@ -1092,7 +1092,6 @@ main()
|
|||
AC_LIBOBJ([langinfo])
|
||||
],
|
||||
[mingw*], [ LIBS="-lshell32 -lws2_32 -liphlpapi -limagehlp -lshlwapi $LIBS"
|
||||
ac_cv_header_a_out_h=no
|
||||
ac_cv_header_pwd_h=no
|
||||
ac_cv_header_utime_h=no
|
||||
ac_cv_header_sys_ioctl_h=no
|
||||
|
@ -1212,7 +1211,6 @@ dnl AC_HEADER_STDC has been checked in AC_USE_SYSTEM_EXTENSIONS
|
|||
AC_HEADER_STDBOOL
|
||||
AC_HEADER_SYS_WAIT
|
||||
|
||||
AC_CHECK_HEADERS(a.out.h)
|
||||
AC_CHECK_HEADERS(atomic.h)
|
||||
AC_CHECK_HEADERS(copyfile.h)
|
||||
AC_CHECK_HEADERS(direct.h)
|
||||
|
@ -2710,16 +2708,13 @@ main(int argc, char *argv[])
|
|||
: "runtime section" && {
|
||||
dnl wheather use dln_a_out or not
|
||||
AC_ARG_WITH(dln-a-out,
|
||||
AS_HELP_STRING([--with-dln-a-out], [use dln_a_out if possible]),
|
||||
AS_HELP_STRING([--with-dln-a-out], [dln_a_out is deprecated]),
|
||||
[
|
||||
AS_CASE([$withval],
|
||||
[yes], [
|
||||
AS_IF([test "$enable_shared" = yes], [
|
||||
AC_MSG_ERROR(dln_a_out can not make shared library)
|
||||
AC_MSG_ERROR(dln_a_out no longer supported)
|
||||
])
|
||||
with_dln_a_out=yes],
|
||||
[
|
||||
with_dln_a_out=no])], [with_dln_a_out=no])
|
||||
])
|
||||
|
||||
AC_CACHE_CHECK(whether ELF binaries are produced, rb_cv_binary_elf,
|
||||
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[
|
||||
|
@ -2729,9 +2724,6 @@ rb_cv_binary_elf=no)])
|
|||
|
||||
AS_IF([test "$rb_cv_binary_elf" = yes], [
|
||||
AC_DEFINE(USE_ELF)
|
||||
AS_IF([test "$with_dln_a_out" = yes], [
|
||||
AC_MSG_ERROR(dln_a_out does not work with ELF)
|
||||
])
|
||||
AC_CHECK_HEADERS([elf.h elf_abi.h])
|
||||
AS_IF([test $ac_cv_header_elf_h = yes -o $ac_cv_header_elf_abi_h = yes], [
|
||||
AC_LIBOBJ([addr2line])
|
||||
|
@ -2747,7 +2739,7 @@ AS_IF([test "$ac_cv_header_mach_o_loader_h" = yes], [
|
|||
AS_CASE(["$target_os"],
|
||||
[linux* | gnu* | k*bsd*-gnu | bsdi* | kopensolaris*-gnu], [
|
||||
AS_IF([test "$rb_cv_binary_elf" = no], [
|
||||
with_dln_a_out=yes
|
||||
AC_MSG_ERROR(Not ELF)
|
||||
], [
|
||||
LDFLAGS="$LDFLAGS -rdynamic"
|
||||
])])
|
||||
|
@ -2781,7 +2773,7 @@ AC_SUBST(ASMEXT, S)dnl
|
|||
|
||||
STATIC=
|
||||
|
||||
AS_IF([test "$with_dln_a_out" != yes], [
|
||||
: "dlopen" && {
|
||||
rb_cv_dlopen=unknown
|
||||
AC_MSG_CHECKING(whether OS depend dynamic link works)
|
||||
AS_IF([test "$GCC" = yes], [
|
||||
|
@ -2806,8 +2798,9 @@ AS_IF([test "$with_dln_a_out" != yes], [
|
|||
[esix*|uxpds*], [CCDLFLAGS="$CCDLFLAGS -KPIC"],
|
||||
[: ${CCDLFLAGS=""}])
|
||||
])
|
||||
}
|
||||
|
||||
|
||||
: "rpath" && {
|
||||
AC_ARG_ENABLE(rpath,
|
||||
AS_HELP_STRING([--enable-rpath], [embed run path into extension libraries.
|
||||
enabled by default on ELF platforms]),
|
||||
|
@ -2933,7 +2926,8 @@ AS_IF([test "$with_dln_a_out" != yes], [
|
|||
RPATHFLAG=" ${rpathflag}%1\$-s"
|
||||
])
|
||||
])
|
||||
])
|
||||
}
|
||||
|
||||
AS_IF([test "${LDSHAREDXX}" = ""], [
|
||||
AS_CASE(["${LDSHARED}"],
|
||||
[*'$(CC)'*], [
|
||||
|
@ -3063,33 +3057,7 @@ AC_ARG_WITH(valgrind,
|
|||
AS_IF([test x$with_valgrind != xno],
|
||||
[AC_CHECK_HEADERS(valgrind/memcheck.h)])
|
||||
|
||||
dln_a_out_works=no
|
||||
AS_IF([test "$ac_cv_header_a_out_h" = yes], [
|
||||
AS_IF([test "$with_dln_a_out" = yes || test "$rb_cv_dlopen" = unknown], [
|
||||
cat confdefs.h > config.h
|
||||
AC_CACHE_CHECK(whether matz's dln works, rb_cv_dln_a_out,
|
||||
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
#define USE_DLN_A_OUT
|
||||
#include "dln.c"
|
||||
]], [[]])],
|
||||
rb_cv_dln_a_out=yes,
|
||||
rb_cv_dln_a_out=no)])
|
||||
AS_IF([test "$rb_cv_dln_a_out" = yes], [
|
||||
dln_a_out_works=yes
|
||||
AC_DEFINE(USE_DLN_A_OUT)
|
||||
])
|
||||
])
|
||||
])
|
||||
|
||||
AS_IF([test "$dln_a_out_works" = yes], [
|
||||
AS_IF([test "$GCC" = yes], [
|
||||
STATIC=-static
|
||||
], [
|
||||
STATIC=-Bstatic
|
||||
])
|
||||
DLEXT=so
|
||||
CCDLFLAGS=
|
||||
], [
|
||||
: "dlext & soext" && {
|
||||
AS_CASE(["$target_os"],
|
||||
[hpux*], [
|
||||
DLEXT=sl],
|
||||
|
@ -3102,9 +3070,10 @@ AS_IF([test "$dln_a_out_works" = yes], [
|
|||
DLEXT=so],
|
||||
[
|
||||
DLEXT=so])
|
||||
])
|
||||
: ${SOEXT="${DLEXT}"}
|
||||
AC_SUBST(SOEXT)
|
||||
}
|
||||
|
||||
AS_IF([test "$rb_cv_dlopen:$load_relative" = yes:yes], [
|
||||
AS_IF([test "$ac_cv_func_dladdr" = yes], [
|
||||
LOAD_RELATIVE=1
|
||||
|
@ -3124,9 +3093,7 @@ test ".$DLEXT" = "." || AC_DEFINE_UNQUOTED(DLEXT, ".$DLEXT")
|
|||
test ".$DLEXT2" = "." || AC_DEFINE_UNQUOTED(DLEXT2, ".$DLEXT2")
|
||||
AC_SUBST(DLEXT)
|
||||
|
||||
AS_IF([test "$with_dln_a_out" = yes], [
|
||||
STRIP=true
|
||||
], [
|
||||
: "strip" && {
|
||||
AC_MSG_CHECKING([for $STRIP flags])
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM], [AS_IF(
|
||||
["${STRIP}" -A -n conftest$ac_exeext 2>/dev/null], [
|
||||
|
@ -3140,8 +3107,7 @@ AS_IF([test "$with_dln_a_out" = yes], [
|
|||
AC_MSG_RESULT([none needed])
|
||||
])
|
||||
])
|
||||
])
|
||||
|
||||
}
|
||||
|
||||
AC_ARG_WITH(ext,
|
||||
AS_HELP_STRING([--with-ext=EXTS],
|
||||
|
|
5
dln.h
5
dln.h
|
@ -24,11 +24,6 @@ RUBY_SYMBOL_EXPORT_BEGIN
|
|||
|
||||
char *dln_find_exe_r(const char*,const char*,char*,size_t DLN_FIND_EXTRA_ARG_DECL);
|
||||
char *dln_find_file_r(const char*,const char*,char*,size_t DLN_FIND_EXTRA_ARG_DECL);
|
||||
|
||||
#ifdef USE_DLN_A_OUT
|
||||
extern char *dln_argv0;
|
||||
#endif
|
||||
|
||||
void *dln_load(const char*);
|
||||
|
||||
RUBY_SYMBOL_EXPORT_END
|
||||
|
|
|
@ -100,11 +100,6 @@ VALUE rb_require(const char*);
|
|||
|
||||
#include "ruby/intern.h"
|
||||
|
||||
#if defined(EXTLIB) && defined(USE_DLN_A_OUT)
|
||||
/* hook for external modules */
|
||||
static char *dln_libs_to_be_linked[] = { EXTLIB, 0 };
|
||||
#endif
|
||||
|
||||
#define RUBY_VM 1 /* YARV */
|
||||
#define HAVE_NATIVETHREAD
|
||||
int ruby_native_thread_p(void);
|
||||
|
|
9
ruby.c
9
ruby.c
|
@ -2554,12 +2554,6 @@ ruby_set_argv(int argc, char **argv)
|
|||
int i;
|
||||
VALUE av = rb_argv;
|
||||
|
||||
#if defined(USE_DLN_A_OUT)
|
||||
if (origarg.argc > 0 && origarg.argv)
|
||||
dln_argv0 = origarg.argv[0];
|
||||
else if (argc > 0 && argv)
|
||||
dln_argv0 = argv[0];
|
||||
#endif
|
||||
rb_ary_clear(av);
|
||||
for (i = 0; i < argc; i++) {
|
||||
VALUE arg = external_str_new_cstr(argv[i]);
|
||||
|
@ -2638,9 +2632,6 @@ ruby_sysinit(int *argc, char ***argv)
|
|||
if (*argc >= 0 && *argv) {
|
||||
origarg.argc = *argc;
|
||||
origarg.argv = *argv;
|
||||
#if defined(USE_DLN_A_OUT)
|
||||
dln_argv0 = origarg.argv[0];
|
||||
#endif
|
||||
}
|
||||
fill_standard_fds();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue