From: Jeremie Courreges-Anglas Subject: gnustep/libobjc2 and BTI (was: Re: x11/gnustep/libobjc2 failed to build) To: Sebastian Reitenbach Cc: Mark Kettenis , Theo Buehler , Stuart Henderson , Antoine Jacoutot , ports@openbsd.org Date: Wed, 6 Mar 2024 19:02:35 +0100 Le Wed, Mar 06, 2024 at 10:17:32AM +0100, Theo Buehler a écrit : > Could you please resend the endbr64 patches with Cc kettenis? They > should make release. Since I now have a laptop with BTI I figured I was going to give this a try. -current x11/gnustep/zipper was crashing with SIGILL on amd64. For the amd64 diff I'm deliberately not caring about the assembly for Windows. I can't test the arm64 part but it looks simple. ok? Sebastian, feel free to commit this if it matches your previous diff. Index: Makefile =================================================================== RCS file: /home/cvs/ports/x11/gnustep/libobjc2/Makefile,v diff -u -p -r1.37 Makefile --- Makefile 5 Mar 2024 16:11:15 -0000 1.37 +++ Makefile 6 Mar 2024 17:26:11 -0000 @@ -4,7 +4,7 @@ COMMENT = GNUstep libobjc2 objective-c r # note: this port does not use the gnustep module VERSION = 2.2 -REVISION = 3 +REVISION = 4 GH_ACCOUNT = gnustep GH_PROJECT = libobjc2 GH_TAGNAME = v${VERSION} Index: patches/patch-objc_msgSend_aarch64_S =================================================================== RCS file: patches/patch-objc_msgSend_aarch64_S diff -N patches/patch-objc_msgSend_aarch64_S --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-objc_msgSend_aarch64_S 6 Mar 2024 17:19:04 -0000 @@ -0,0 +1,11 @@ +Index: objc_msgSend.aarch64.S +--- objc_msgSend.aarch64.S.orig ++++ objc_msgSend.aarch64.S +@@ -73,6 +73,7 @@ CDECL(objc_msgSend): + CDECL(objc_msgSend_fpret): + CDECL(objc_msgSend_stret): + EH_START ++ bti c + + cbz x0, 4f // Skip everything if the receiver is nil + // Jump to 6: if this is a small object Index: patches/patch-objc_msgSend_x86-64_S =================================================================== RCS file: patches/patch-objc_msgSend_x86-64_S diff -N patches/patch-objc_msgSend_x86-64_S --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-objc_msgSend_x86-64_S 6 Mar 2024 17:18:56 -0000 @@ -0,0 +1,15 @@ +Index: objc_msgSend.x86-64.S +--- objc_msgSend.x86-64.S.orig ++++ objc_msgSend.x86-64.S +@@ -307,9 +307,11 @@ TYPE_DIRECTIVE(CDECL(objc_msgSend), @function) + TYPE_DIRECTIVE(CDECL(objc_msgSend_fpret), @function) + CDECL(objc_msgSend_fpret): + CDECL(objc_msgSend): ++ endbr64 + MSGSEND objc_msgSend, %rdi, %rsi + .globl CDECL(objc_msgSend_stret) + TYPE_DIRECTIVE(CDECL(objc_msgSend_stret), @function) + CDECL(objc_msgSend_stret): ++ endbr64 + MSGSEND objc_msgSend_stret, %rsi, %rdx + #endif -- jca