* [ANNOUNCE] mwrap 2.3.0
@ 2022-09-03 10:02 6% Eric Wong
0 siblings, 0 replies; 3+ results
From: Eric Wong @ 2022-09-03 10:02 UTC (permalink / raw)
To: mwrap-public; +Cc: Sam Saffron
This release now supports --enable-shared builds of Ruby which
is the common setting for GNU/Linux distros. FreeBSD 12.3
support remains broken, but the code is somewhat revised so it
can be more easily fixed and maintained in the future.
`mwrap --help' and and `mwrap --version' are now supported,
and an RDoc error which only happens during `gem install'
is fixed.
* support --enabled-shared builds of Ruby
* extconf.rb: avoid RDoc errors during gem install
* add --version and --help args
* cleanup some FreeBSD-related workarounds
Available via RubyGems and https://80x24.org/mwrap/
* mail archives: https://80x24.org/mwrap-public/
* git clone https://80x24.org/mwrap.git
^ permalink raw reply [relevance 6%]
* Re: [PATCH] support --enabled-shared builds of Ruby
2022-08-23 9:14 6% [PATCH] support --enabled-shared builds of Ruby Eric Wong
@ 2022-08-23 9:16 7% ` Eric Wong
0 siblings, 0 replies; 3+ results
From: Eric Wong @ 2022-08-23 9:16 UTC (permalink / raw)
To: mwrap-public; +Cc: Sam Saffron
+cc sam
https://80x24.org/mwrap-public/20220823091453.31338-1-e@80x24.org/
Pushed to rubygems.org as mwrap-2.2.0.1.g867b.gem
^ permalink raw reply [relevance 7%]
* [PATCH] support --enabled-shared builds of Ruby
@ 2022-08-23 9:14 6% Eric Wong
2022-08-23 9:16 7% ` Eric Wong
0 siblings, 1 reply; 3+ results
From: Eric Wong @ 2022-08-23 9:14 UTC (permalink / raw)
To: mwrap-public
Most GNU/Linux distros build Ruby with --enable-shared, so
it makes sense to support it properly even if it's not the
default favored by ruby-core.
__attribute__((weak)) on a local function is not weak enough
for the shared library, so we add the extra check for the
function's existence to have_ec_p(), instead.
Tested with ruby 2.7.4p191 (2021-07-07 revision a21a3b7d23) [x86_64-linux-gnu]
on Debian 11 (bullseye) as well as default builds w/o
--enable-shared.
Note: FreeBSD 12.3 appears broken with mwrap and I no longer
have older FreeBSD systems handy.
---
ext/mwrap/mwrap.c | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/ext/mwrap/mwrap.c b/ext/mwrap/mwrap.c
index 85b847b..9d90298 100644
--- a/ext/mwrap/mwrap.c
+++ b/ext/mwrap/mwrap.c
@@ -32,7 +32,6 @@
static ID id_uminus;
const char *rb_source_location_cstr(int *line); /* requires 2.6.0dev */
-extern int __attribute__((weak)) ruby_thread_has_gvl_p(void);
#ifdef HAVE_RUBY_RACTOR_H /* Ruby 3.0+ */
extern MWRAP_TSD void * __attribute__((weak)) ruby_current_ec;
@@ -45,6 +44,7 @@ extern size_t __attribute__((weak)) rb_gc_count(void);
extern VALUE __attribute__((weak)) rb_cObject;
extern VALUE __attribute__((weak)) rb_eTypeError;
extern VALUE __attribute__((weak)) rb_yield(VALUE);
+int __attribute__((weak)) ruby_thread_has_gvl_p(void);
static size_t total_bytes_inc, total_bytes_dec;
@@ -64,11 +64,6 @@ enum {
#define IS_HEAP_PAGE_BODY ((struct src_loc *)-1)
-int __attribute__((weak)) ruby_thread_has_gvl_p(void)
-{
- return 0;
-}
-
#ifdef __FreeBSD__
void *__malloc(size_t);
void __free(void *);
@@ -238,8 +233,8 @@ static char *int2str(int num, char *dst, size_t * size)
*/
static int has_ec_p(void)
{
- return (ruby_thread_has_gvl_p() && ruby_current_vm_ptr &&
- ruby_current_ec);
+ return ruby_thread_has_gvl_p && ruby_thread_has_gvl_p() &&
+ ruby_current_vm_ptr && ruby_current_ec;
}
struct acc {
^ permalink raw reply related [relevance 6%]
Results 1-3 of 3 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2022-08-23 9:14 6% [PATCH] support --enabled-shared builds of Ruby Eric Wong
2022-08-23 9:16 7% ` Eric Wong
2022-09-03 10:02 6% [ANNOUNCE] mwrap 2.3.0 Eric Wong
Code repositories for project(s) associated with this public inbox
https://80x24.org/mwrap.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).