summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNARUSE, Yui <naruse@airemix.jp>2023-01-25 13:26:25 +0900
committerNARUSE, Yui <naruse@airemix.jp>2023-01-25 13:26:25 +0900
commit4110137fcfd805de03a8f5569c3d6926959b9363 (patch)
tree0d59eee0a294c551ed160fc220c4b0e40680df1b
parent0090cb82b0bf477c29a659e34cf4427a3b1ceb27 (diff)
downloadruby-4110137fcfd805de03a8f5569c3d6926959b9363.tar.gz
merge revision(s) 6f3aff3961a4c5ce87e05096a1a9dcf1055b7647: [Backport #19289]
[Bug #19289] Retain `ruby_abi_version` function A few extension libraries, to hide all symbols except for necessary to load, hardcode the symbols to be exported in symbol list files for linker without even checking by `have_func`. As a workaround for such libraries, retain `ruby_abi_version` symbol always even in released versions for now. --- include/ruby/internal/abi.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
-rw-r--r--include/ruby/internal/abi.h7
-rw-r--r--version.h2
2 files changed, 6 insertions, 3 deletions
diff --git a/include/ruby/internal/abi.h b/include/ruby/internal/abi.h
index d67aa0d509..44111a0055 100644
--- a/include/ruby/internal/abi.h
+++ b/include/ruby/internal/abi.h
@@ -31,6 +31,7 @@
#if defined(HAVE_FUNC_WEAK) && !defined(_WIN32) && !defined(__MINGW32__) && !defined(__CYGWIN__)
# define RUBY_DLN_CHECK_ABI
#endif
+#endif /* RUBY_ABI_VERSION */
#ifdef RUBY_DLN_CHECK_ABI
@@ -41,7 +42,11 @@ extern "C" {
RUBY_FUNC_EXPORTED unsigned long long __attribute__((weak))
ruby_abi_version(void)
{
+# ifdef RUBY_ABI_VERSION
return RUBY_ABI_VERSION;
+# else
+ return 0;
+# endif
}
# ifdef __cplusplus
@@ -51,5 +56,3 @@ ruby_abi_version(void)
#endif
#endif
-
-#endif
diff --git a/version.h b/version.h
index 74eb7be93a..fb6a28ab79 100644
--- a/version.h
+++ b/version.h
@@ -11,7 +11,7 @@
# define RUBY_VERSION_MINOR RUBY_API_VERSION_MINOR
#define RUBY_VERSION_TEENY 0
#define RUBY_RELEASE_DATE RUBY_RELEASE_YEAR_STR"-"RUBY_RELEASE_MONTH_STR"-"RUBY_RELEASE_DAY_STR
-#define RUBY_PATCHLEVEL 19
+#define RUBY_PATCHLEVEL 20
#include "ruby/version.h"
#include "ruby/internal/abi.h"