From 1f382f39cf39cb10af08469a5e8e5ae2feda98ec Mon Sep 17 00:00:00 2001 From: Lars Kanis Date: Sat, 14 Dec 2024 16:12:14 +0100 Subject: [PATCH] Ruby-head: Add support for arm64 The compiler options were taken from msys2/mingw-packages. The dependecies already existed, but are usually preinstalled on x86/x86_64. --- .github/workflows/ci.yml | 1 + mingw-w64-ruby-head/PKGBUILD | 16 +++++++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 773f2d7..8f9c4bc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,6 +14,7 @@ jobs: - MINGW_ARCH: "mingw32" - MINGW_ARCH: "mingw64" - MINGW_ARCH: "ucrt64" + - MINGW_ARCH: "clangarm64" runs-on: windows-latest env: diff --git a/mingw-w64-ruby-head/PKGBUILD b/mingw-w64-ruby-head/PKGBUILD index 2a38834..1c2a7a5 100644 --- a/mingw-w64-ruby-head/PKGBUILD +++ b/mingw-w64-ruby-head/PKGBUILD @@ -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" @@ -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}"