Wednesday, August 11, 2021

Re: lang/ruby and powerpc* __builtin_setjmp

On 08/08 10:37, Jeremy Evans wrote:
> On 08/08 12:45, George Koehler wrote:
> > If we disable the builtins on more archs, we might benefit from the
> > xor cookie (https://u22788749.ct.sendgrid.net/ls/click?upn=yGPgKxLt0dQzFpcLvHl2PFJWR3gvLEq8GplkUr5AtZw-2B6jOCYjkAQ63Xe0VXRkaSQfX-2FVACakuwm-2F0cS3wfJrYGt7Jzb7yMlo-2FRu7kFF4bM-3Dfbsd_7a8z5HXKglTa4iEppNBl7pmmyiLmNe-2BkBcvOJjbwgwQLXE4DPkfRh-2FCHp7E9xTznOfckQ-2FGg0ST8J1BuaWHZeFrWmwTqYB2V-2BCLOtIepuHS7Sy5yDAkOb2jC-2BWtPMEsbAEIgZheSgjlHTttKqkNQyI7SvbMFkWmmWXCS3wfqCnU3c36PheYwNt0WzgGePv5WHc2QWotbSsgUkC2C0XpkXA-3D-3D
> > I didn't think to disable the builtins on not powerpc*.
>
> I'll do some testing with builtin setjmp/longjmp
> disabled on amd64. If that works, we can switch to doing that by
> default. If any regressions are noticed, we still have time to switch
> back to only disabling the builtins on powerpc*.

From my testing on amd64, disabling the builtin setjmp did not cause
any regressions. I think it makes sense to test doing that by default.
There's still time before release to back it out if we need to. OKs?

Thanks,
Jeremy

Index: Makefile.inc
===================================================================
RCS file: /cvs/ports/lang/ruby/Makefile.inc,v
retrieving revision 1.25
diff -u -p -r1.25 Makefile.inc
--- Makefile.inc 9 Aug 2021 20:13:02 -0000 1.25
+++ Makefile.inc 11 Aug 2021 21:20:31 -0000
@@ -33,17 +33,11 @@ CONFIGURE_ARGS += --enable-shared \
--with-soname=ruby${BINREV} \
--with-ruby-version=minor \
--with-mantype=doc \
+ --with-setjmp-type=_setjmp \
--enable-pthread \
--enable-ipv6 \
--without-bundled-libffi \
--disable-option-checking
-
-.if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "powerpc64"
-# clang-11's __builtin_setjmp is broken, has chance of SIGSEGV during
-# "make build" on powerpc with ld.lld, or when passing a wrong option
-# (like "ruby -e" with no -e code) on powerpc64.
-CONFIGURE_ARGS += --with-setjmp-type=_setjmp
-.endif

CONFIGURE_ENV += LIBruby${BINREV}_VERSION=${LIBruby${BINREV}_VERSION} \
PREFIX="${PREFIX}" \
Index: 2.6/Makefile
===================================================================
RCS file: /cvs/ports/lang/ruby/2.6/Makefile,v
retrieving revision 1.16
diff -u -p -r1.16 Makefile
--- 2.6/Makefile 9 Aug 2021 20:13:02 -0000 1.16
+++ 2.6/Makefile 11 Aug 2021 21:20:31 -0000
@@ -1,7 +1,7 @@
# $OpenBSD: Makefile,v 1.16 2021/08/09 20:13:02 gkoehler Exp $

VERSION = 2.6.8
-REVISION-main = 0
+REVISION-main = 1
DISTNAME = ruby-${VERSION}
SHARED_LIBS = ruby26 0.0
NEXTVER = 2.7
Index: 2.7/Makefile
===================================================================
RCS file: /cvs/ports/lang/ruby/2.7/Makefile,v
retrieving revision 1.13
diff -u -p -r1.13 Makefile
--- 2.7/Makefile 9 Aug 2021 20:13:02 -0000 1.13
+++ 2.7/Makefile 11 Aug 2021 21:20:31 -0000
@@ -1,7 +1,7 @@
# $OpenBSD: Makefile,v 1.13 2021/08/09 20:13:02 gkoehler Exp $

VERSION = 2.7.4
-REVISION-main = 0
+REVISION-main = 1
DISTNAME = ruby-${VERSION}
SHARED_LIBS = ruby27 0.0
NEXTVER = 2.8
Index: 3.0/Makefile
===================================================================
RCS file: /cvs/ports/lang/ruby/3.0/Makefile,v
retrieving revision 1.5
diff -u -p -r1.5 Makefile
--- 3.0/Makefile 9 Aug 2021 20:13:02 -0000 1.5
+++ 3.0/Makefile 11 Aug 2021 21:20:31 -0000
@@ -1,7 +1,7 @@
# $OpenBSD: Makefile,v 1.5 2021/08/09 20:13:02 gkoehler Exp $

VERSION = 3.0.2
-REVISION-main = 0
+REVISION-main = 1
DISTNAME = ruby-${VERSION}
SHARED_LIBS = ruby30 0.0
NEXTVER = 3.1

No comments:

Post a Comment