Skip to content

Commit

Permalink
Ruby-head: Add support for arm64
Browse files Browse the repository at this point in the history
The compiler options were taken from msys2/mingw-packages.
The dependecies already existed, but are usually preinstalled on x86/x86_64.
  • Loading branch information
larskanis committed Dec 14, 2024
1 parent e702eb8 commit a74b637
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
- MINGW_ARCH: "mingw32"
- MINGW_ARCH: "mingw64"
- MINGW_ARCH: "ucrt64"
- MINGW_ARCH: "clangarm64"

runs-on: windows-latest
env:
Expand Down
17 changes: 12 additions & 5 deletions mingw-w64-ruby-head/PKGBUILD
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
_realname=ruby
pkgbase=mingw-w64-ruby-head
pkgname="${MINGW_PACKAGE_PREFIX}-ruby-head"
pkgver=r20240520
pkgver=r20241214
pkgver() {
echo r`date +%Y%m%d`
}
pkgrel=1
pkgdesc="An object-oriented language for quick and easy programming (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clangarm64')
url="https://www.ruby-lang.org/en"
license=("BSD, custom")
makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config" autoconf automake libtool)
makedepends=("${MINGW_PACKAGE_PREFIX}-cc"
"${MINGW_PACKAGE_PREFIX}-pkgconf"
autoconf automake libtool patch make)
depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs"
"${MINGW_PACKAGE_PREFIX}-gmp"
"${MINGW_PACKAGE_PREFIX}-libffi"
Expand Down Expand Up @@ -46,9 +48,13 @@ prepare() {

build() {

CPPFLAGS+=" -DFD_SETSIZE=2048"
CFLAGS="-O3 -fno-fast-math -fstack-protector-strong"
CFLAGS="-O3 -fstack-protector-strong"
LDFLAGS="-pipe -s -fstack-protector-strong"
if [[ ${MSYSTEM} == CLANG* ]]; then
CFLAGS+=" -Wno-dll-attribute-on-redeclaration"
else
CFLAGS+=" -Wno-incompatible-pointer-types"
fi

[[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}"
mkdir -p "${srcdir}/build-${MINGW_CHOST}" && cd "${srcdir}/build-${MINGW_CHOST}"
Expand All @@ -60,6 +66,7 @@ build() {
--build=${MINGW_CHOST} \
--host=${MINGW_CHOST} \
--target=${MINGW_CHOST} \
--disable-werror \
--with-out-ext=readline,pty,syslog

make showflags main
Expand Down

0 comments on commit a74b637

Please sign in to comment.