1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-12 18:59:50 +03:00

testing/ldc-stage0: upgrade to 1.41.0

This commit is contained in:
Celeste 2025-06-07 16:28:06 +00:00
parent 7b4cf56374
commit fa4ba3bf28
5 changed files with 12 additions and 164 deletions

View file

@ -1,7 +1,7 @@
# Maintainer: Celeste <cielesti@protonmail.com>
maintainer="Celeste <cielesti@protonmail.com>"
pkgname=ldc-stage0
pkgver=1.40.1
pkgver=1.41.0
pkgrel=0
_xrtrel=0
_llvmver=19
@ -32,10 +32,8 @@ makedepends="
zlib-dev
"
source="https://github.com/ldc-developers/ldc/releases/download/v$pkgver/ldc-$pkgver-src.tar.gz
cmake4.patch
no-redundant-rpath.patch
skip-debug-runtime.patch
druntime-loongarch64_patch
druntime-ppc64le_patch
druntime-riscv64_patch
@ -143,17 +141,15 @@ package() {
}
sha512sums="
5808dc46ccd26d7f5eff7fe3361eefc336136bea6afe94763629edbd2fe577e21ea1e327ecfebdbbd48456ddfe9f46ef5f613ec6427bbcac95acbce4f16ed639 ldc-1.40.1-src.tar.gz
250cca4f7e99560874d3bf93700f85bd6f665d2abac272ad986b8ae42213e1cc342d37f2cc3566ace902c4a8bb07465398f23861227be52f35b4fdd6e04bff1c cmake4.patch
75ec4fbe44bb20f66b0b299483faaa26ed01bfdc0df4abca92d5b421c1631bc1c6bbf6291bbe83c701078b47601afb0ac6f8fd393406c6403bf4d357666a6609 ldc-1.41.0-src.tar.gz
397212d0347ce676a5c5bf131cd973374dc072f4585b661ec21cd886553c293fc1cfbe7eec35089ba60c389a85c4700082177bf424f9d8dfd54ffada02808573 no-redundant-rpath.patch
f596602b30b0e8932ac3258d82ae352009cdebe6f714dd9d8b906b51ba31523393577102eeb8e88bd36e1dc7e6d4a1abf14224a6893bf76b3a204927fb8ce0d1 skip-debug-runtime.patch
fd47aea774817e40dc4f0b96d82899d748b5d553fe81bd2ca570e0fe5c9d1876995bec633242a63ed44f827edeef73f0079bd30de1e407d8f0225de514ca549d druntime-loongarch64_patch
d7d7907878ccb5931e13a6ed66a39260ce8dfc80221f6240ccd66a31ddaaf8ec4cbaabfa51e21029cf37b8fefb067c79ded555e2364aac0e258d5e0f80003673 druntime-ppc64le_patch
1acbf38c89a50a3476bff59e65b5b070bd68229404c4f88c213a2ed56b5647a29d5e83b48fd8cf427e7c175a2e1af5dd1245a76f41e611c86dbc7adc061cf781 skip-debug-runtime.patch
4a062eba5e8d47056f89b50f0e457b797710a5fd5e7ed8b14368c2e18e6dcb06790ff1ee0f62f92076b9f5048b7ccd24e523676c5c34558ef98677a593ae3881 druntime-ppc64le_patch
c1bb664dcdac37cb32536755d87d3380113f0b0688b4ea12010ad8afcfaa42d973a9570d884e05870a94c4cc93c6273ed47711744efc49c9f5d3baf58c0262c0 druntime-riscv64_patch
7fda582c3845ea663aa5eda21bb38ebcfb6c25bccf8944ea6cdf8b5be6946b5a874b36674a7f5db3e325abb9cca0dd9bc0727837fdceb71a8c947d96169a9b20 qemu-10.0.2.tar.xz
346f7fc6f5134e42c0a70b1fd05e9724d1e64d9346c9240a41309d85a5bcc61d4b559ff3a900cac9b4222424b323bca691dcfccec16a3155b5ffcaf9e5870ceb ldc2-1.40.1-alpine-x86_64.tar.xz
c7f5eaf882e4a7c5cc2e7e76e18b0b4aa1fa6015b7f187bbbb16d603d72f12069c526fe098bbbed899a97b7800aa5c94df3529c835bc9dc8f434cb96079cee15 ldc2-1.41.0-alpine-x86_64.tar.xz
cf3a9c43bcadf82ecf18248a3f5f4346fdd723d5db94efa7325c6d58f92e416f93e0462d51a84a7179dc273725ec1179d8012e9448a9f78000fa7e8590bfc2dd ldc2.conf.patch
1f0283ba6cc821c4e9c60ae89e37f7a8a37383a2abeace4b512a939ade95053645671bf005cfa203794cd2abea53024e849afb20085937c3a4dd5c61dcc02c6b ldmd-emu.sh.in
ca9a2265868a3a7522e346d87e50111a089ee3e8dd7341b60f7948798a27cbb481ea3505267cbba42eb1403ed84a48d21ee9cfeab0fcc8128da80c4a3b4aeb39 ldc-runtime-cross-ppc64le-1.40.1-r0.apk
ff9dbde60432fffe18efe5fb1f13b95759f2ae49d35954251b9d6f253eb66705f06e62a6d583c56bd6b14eb403731fd9dc2fbf13a9118de3d75343895c1f9bb7 ldc-runtime-cross-riscv64-1.40.1-r0.apk
7573cbe43861d3582b128559911f6292248f6d68750f946960ea6bedc8c85984359c55d977466457d5864b2f6cfd0a78f8ed15170f88dd8ca06c9f0c4d8c7d38 ldc-runtime-cross-ppc64le-1.41.0-r0.apk
761254e551b311c9a10d42e7a92b4f37858b340a61944536a80e821330569bdd97b3dbc223656790297b1e2bc4191b6c56a1e3156199d6fdec5c99908ae4d549 ldc-runtime-cross-riscv64-1.41.0-r0.apk
"

View file

@ -1,84 +0,0 @@
Patch-Source: https://github.com/ldc-developers/ldc/commit/06b2e42a1b8436faae2b7976a1d41a635df116d5
--
From 06b2e42a1b8436faae2b7976a1d41a635df116d5 Mon Sep 17 00:00:00 2001
From: Martin Kinkelin <kinke@users.noreply.github.com>
Date: Wed, 2 Apr 2025 05:22:25 +0200
Subject: [PATCH] Bump min required CMake version from v3.4.3 to v3.16.0
(#4898)
New CMake 4 dropped support for < 3.5, breaking our CI (GHA at least).
LLVM 19 requires v3.20. Ubuntu 20 came with v3.16.
---
.github/workflows/main.yml | 4 ++++
CMakeLists.txt | 8 +-------
runtime/CMakeLists.txt | 3 ++-
3 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 099f9497fbd..b1577c195ff 100644
--- a/ldc/.github/workflows/main.yml
+++ b/ldc/.github/workflows/main.yml
@@ -95,6 +95,8 @@ jobs:
- job_name: Windows x64
os: windows-2025
arch: x64
+ base_cmake_flags: >-
+ -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded
extra_cmake_flags: >-
"-DD_COMPILER_FLAGS=-O -flto=full -defaultlib=phobos2-ldc-lto,druntime-ldc-lto"
-DEXTRA_CXXFLAGS=-flto=full
@@ -103,6 +105,8 @@ jobs:
- job_name: Windows x86
os: windows-2025
arch: x86
+ base_cmake_flags: >-
+ -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded
# `RT_CFLAGS=-m32` needed to make 64-bit clang-cl output 32-bit code for druntime integration tests
extra_cmake_flags: >-
-DRT_CFLAGS=-m32
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d471dc087df..5f05e1f80db 100644
--- a/ldc/CMakeLists.txt
+++ b/ldc/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.4.3)
+cmake_minimum_required(VERSION 3.16.0)
if(POLICY CMP0025)
cmake_policy(SET CMP0025 NEW)
endif()
@@ -207,17 +207,11 @@ if(MSVC)
append("-Llegacy_stdio_definitions.lib" DFLAGS_BASE)
endif()
- # Link against the static MSVC runtime; CMake's C(++) flags apparently default to the dynamic one.
- # Host DMD/LDMD already defaults to linking against the static MSVC runtime.
- if(${LLVM_CXXFLAGS} MATCHES "(^| )/MDd?( |$)")
- message(FATAL_ERROR "LLVM must be built with CMake option LLVM_USE_CRT_<CMAKE_BUILD_TYPE>=MT[d]")
- endif()
set(llvm_ob_flag)
string(REGEX MATCH "/Ob[0-2]" llvm_ob_flag "${LLVM_CXXFLAGS}")
foreach(flag_var
CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO
CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO)
- string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}")
# CMake defaults to /W3, LLVM uses /W4 => MS compiler warns about overridden option.
# Simply replace with /W4.
string(REGEX REPLACE "/W[0-3]" "/W4" ${flag_var} "${${flag_var}}")
diff --git a/runtime/CMakeLists.txt b/runtime/CMakeLists.txt
index b486a514bbb..d30c2c25d21 100644
--- a/ldc/runtime/CMakeLists.txt
+++ b/ldc/runtime/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.4.3)
+cmake_minimum_required(VERSION 3.16.0)
project(runtime C ASM)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR})
@@ -593,6 +593,7 @@ function(set_common_library_properties target name output_dir c_flags ld_flags i
COMPILE_DEFINITIONS "LDC=1"
COMPILE_FLAGS "${c_flags}"
LINK_FLAGS "${full_ldflags}"
+ MSVC_RUNTIME_LIBRARY "" # see reasoning for `/MT /Zl` above
VERSION ${DMDFE_MINOR_VERSION}.${DMDFE_PATCH_VERSION}
SOVERSION ${DMDFE_MINOR_VERSION}
LINKER_LANGUAGE C

View file

@ -1,64 +0,0 @@
Patch-Source: https://github.com/dlang/dmd/commit/cd4cf9cde2593d12ad0daa3f3d8eb7100075f05d
--
From cd4cf9cde2593d12ad0daa3f3d8eb7100075f05d Mon Sep 17 00:00:00 2001
From: Xin Wang <wangxin03@loongson.cn>
Date: Mon, 2 Sep 2024 17:44:08 +0800
Subject: [PATCH] druntime: add support for LoongArch64 on musl and libunwind
Co-authored-by: Celeste <cielesti@protonmail.com>
---
druntime/src/core/internal/backtrace/libunwind.d | 5 +++++
druntime/src/core/stdc/fenv.d | 8 ++++++++
druntime/src/core/sys/posix/signal.d | 5 +++++
3 files changed, 18 insertions(+)
diff --git a/runtime/druntime/src/core/internal/backtrace/libunwind.d b/runtime/druntime/src/core/internal/backtrace/libunwind.d
index 3378763eee63..b72858ab79cf 100644
--- a/runtime/druntime/src/core/internal/backtrace/libunwind.d
+++ b/runtime/druntime/src/core/internal/backtrace/libunwind.d
@@ -163,5 +163,10 @@ else version (RISCV64) // 32 is not supported
enum _LIBUNWIND_CONTEXT_SIZE = 64;
enum _LIBUNWIND_CURSOR_SIZE = 76;
}
+else version (LoongArch64)
+{
+ enum _LIBUNWIND_CONTEXT_SIZE = 65;
+ enum _LIBUNWIND_CURSOR_SIZE = 77;
+}
else
static assert(0, "Platform not supported");
diff --git a/runtime/druntime/src/core/stdc/fenv.d b/runtime/druntime/src/core/stdc/fenv.d
index b9b10aae3d93..ce77d5c1e6b2 100644
--- a/runtime/druntime/src/core/stdc/fenv.d
+++ b/runtime/druntime/src/core/stdc/fenv.d
@@ -432,6 +432,14 @@ else version (CRuntime_Musl)
}
alias ushort fexcept_t;
}
+ else version (LoongArch64)
+ {
+ struct fenv_t
+ {
+ uint __cw;
+ }
+ alias uint fexcept_t;
+ }
else
{
static assert(false, "Architecture not supported.");
diff --git a/runtime/druntime/src/core/sys/posix/signal.d b/runtime/druntime/src/core/sys/posix/signal.d
index ed4ec1270d90..e3d80fb02180 100644
--- a/runtime/druntime/src/core/sys/posix/signal.d
+++ b/runtime/druntime/src/core/sys/posix/signal.d
@@ -2758,6 +2758,11 @@ else version (CRuntime_Musl)
enum MINSIGSTKSZ = 2048;
enum SIGSTKSZ = 8192;
}
+ else version (LoongArch64)
+ {
+ enum MINSIGSTKSZ = 4096;
+ enum SIGSTKSZ = 16384;
+ }
else
static assert(0, "unimplemented");

View file

@ -1,6 +1,6 @@
--- a/runtime/druntime/src/rt/sections_elf_shared.d
+++ b/runtime/druntime/src/rt/sections_elf_shared.d
@@ -1165,14 +1165,16 @@ else
@@ -1173,14 +1173,16 @@ else
version (LDC)
{

View file

@ -3,7 +3,7 @@ and debug runtimes will be built in community/ldc as usual.
--- a/ldc/runtime/CMakeLists.txt
+++ b/ldc/runtime/CMakeLists.txt
@@ -818,17 +818,6 @@ macro(build_runtime_variants d_flags c_flags ld_flags path_suffix outlist_target
@@ -803,17 +803,6 @@ macro(build_runtime_variants d_flags c_flags ld_flags path_suffix outlist_target
"${COMPILE_ALL_D_FILES_AT_ONCE}"
${outlist_targets}
)
@ -21,7 +21,7 @@ and debug runtimes will be built in community/ldc as usual.
endmacro()
# Setup the build of jit runtime
@@ -1068,7 +1057,6 @@ endfunction()
@@ -1044,7 +1033,6 @@ endfunction()
# Generates targets for static and/or shared debug+release druntime/Phobos test runners.
function(build_test_runner_variants path_suffix d_flags c_flags)
build_test_runner_variant("" "${path_suffix}" "${D_FLAGS_RELEASE};${d_flags}" "${c_flags}")
@ -29,7 +29,7 @@ and debug runtimes will be built in community/ldc as usual.
endfunction()
set(TESTLIB_SUFFIX "${LIB_SUFFIX}")
@@ -1130,11 +1118,9 @@ endfunction()
@@ -1102,11 +1090,9 @@ endfunction()
function(add_runtime_tests_variants path_suffix)
if(NOT ${BUILD_SHARED_LIBS} STREQUAL "ON")
add_runtime_tests("" "${path_suffix}")
@ -41,7 +41,7 @@ and debug runtimes will be built in community/ldc as usual.
endif()
endfunction()
@@ -1143,4 +1129,3 @@ if(MULTILIB AND ${HOST_BITNESS} EQUAL 64)
@@ -1115,4 +1101,3 @@ if(MULTILIB AND ${HOST_BITNESS} EQUAL 64)
add_runtime_tests_variants("${MULTILIB_SUFFIX}")
endif()