Skip to content

ruby: add clangarm64 target #13115

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions mingw-w64-ruby/0009-windows-arm64.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
--- a/configure.ac 2022-09-17 20:44:42.375546800 +0200
+++ b/configure.ac 2022-09-17 20:49:48.224691700 +0200
@@ -2541,6 +2541,9 @@
[*86-mingw*], [
coroutine_type=win32
],
+ [aarch64-mingw*], [
+ coroutine_type=arm64
+ ],
[arm*-linux*], [
coroutine_type=arm32
],
--- a/vm_dump.c 2022-04-12 13:11:15.000000000 +0200
+++ b/vm_dump.c 2022-09-17 20:52:16.559409600 +0200
@@ -701,6 +701,14 @@
frame.AddrFrame.Offset = context.Rbp;
frame.AddrStack.Mode = AddrModeFlat;
frame.AddrStack.Offset = context.Rsp;
+#elif defined(__aarch64__)
+ mac = IMAGE_FILE_MACHINE_ARM64;
+ frame.AddrPC.Mode = AddrModeFlat;
+ frame.AddrPC.Offset = context.Pc;
+ frame.AddrFrame.Mode = AddrModeFlat;
+ frame.AddrFrame.Offset = context.Fp;
+ frame.AddrStack.Mode = AddrModeFlat;
+ frame.AddrStack.Offset = context.Sp;
Comment on lines +21 to +26
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#else /* i386 */
mac = IMAGE_FILE_MACHINE_I386;
frame.AddrPC.Mode = AddrModeFlat;
11 changes: 7 additions & 4 deletions mingw-w64-ruby/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pkgver=3.1.2
pkgrel=2
pkgdesc="An object-oriented language for quick and easy programming (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
url="https://www.ruby-lang.org/en"
license=("BSD, custom")
makedepends=("${MINGW_PACKAGE_PREFIX}-doxygen"
Expand All @@ -33,7 +33,8 @@ options=('staticlibs' 'strip')
source=("https://cache.ruby-lang.org/pub/ruby/${pkgver%.*}/${_realname}-${pkgver}.tar.gz"
0003-fix-check-types.patch
0007-nm-use-full-options.patch
0008-ucrt-32-win11-insns.patch)
0008-ucrt-32-win11-insns.patch
0009-windows-arm64.patch)
## Populated by the updpkgprovs script
provides=(
"${MINGW_PACKAGE_PREFIX}-ruby-debug=1.4.0"
Expand Down Expand Up @@ -127,7 +128,8 @@ provides=(
sha256sums=('61843112389f02b735428b53bb64cf988ad9fb81858b8248e22e57336f24a83e'
'e5d665cabac8b7fbb0dda9a556c2350190801aa07b3cb90a0d50097ab99272a0'
'b250c66bc8b372fb4c53902a6d56c01ad057416e3e368a5c5434d9a4ebdc3819'
'c9f816baf5b2803e017924c7eeef6a478beb76247d6d4b39a2424c8d34687b2b')
'c9f816baf5b2803e017924c7eeef6a478beb76247d6d4b39a2424c8d34687b2b'
'f3a61f6d600bb962f23e4ff1c0857120630541d8fcb542957dc0848b00a39690')
noextract=(${_realname}-${pkgver}.tar.gz)

apply_patch_with_msg() {
Expand Down Expand Up @@ -157,7 +159,8 @@ prepare() {
apply_patch_with_msg \
0003-fix-check-types.patch \
0007-nm-use-full-options.patch \
0008-ucrt-32-win11-insns.patch
0008-ucrt-32-win11-insns.patch \
0009-windows-arm64.patch

autoreconf -fi
}
Expand Down