Compare commits
2 Commits
c10s
...
c8-bootstr
| Author | SHA1 | Date | |
|---|---|---|---|
| a772f1c431 | |||
| 2d0aff9f82 |
5
.dotnet10.0.metadata
Normal file
5
.dotnet10.0.metadata
Normal file
@ -0,0 +1,5 @@
|
||||
ee1a56716978a3c41a44e3443000f707b07933c7 SOURCES/dotnet-10.0.100-rc.1.25451.107.tar.gz
|
||||
62d6dafc4b1ce51f68320ed821b6e3b373392b95 SOURCES/dotnet-prebuilts-10.0.100-rc.1.25420.111-arm64.tar.gz
|
||||
3ac146f7938cba5e13e302fed264d292b5a0d5eb SOURCES/dotnet-prebuilts-10.0.100-rc.1.25420.111-x64.tar.gz
|
||||
85fda17f8a358b46070d1edbb798fe99e358d132 SOURCES/dotnet-prebuilts-10.0.100-rc.1.25451.107-ppc64le.tar.gz
|
||||
813d4b3b93f64462efc3ce9b41aaa98f54c1cbe8 SOURCES/dotnet-prebuilts-10.0.100-rc.1.25451.107-s390x.tar.gz
|
||||
@ -1 +0,0 @@
|
||||
1
|
||||
95
.gitignore
vendored
95
.gitignore
vendored
@ -1,90 +1,5 @@
|
||||
/dotnet-v3.1.101-SDK.tar.gz
|
||||
/dotnet-v3.1.102-SDK.tar.gz
|
||||
/dotnet-v3.1.103.2-SDK.tar.gz
|
||||
/dotnet-v5.0.102-SDK-arm64-bootstrap.tar.gz
|
||||
/dotnet-v5.0.102-SDK-x64-bootstrap.tar.gz
|
||||
/dotnet-v5.0.102-SDK.tar.gz
|
||||
/dotnet-v5.0.103-SDK.tar.gz
|
||||
/dotnet-v5.0.104-SDK.tar.gz
|
||||
/dotnet-v5.0.202-SDK.tar.gz
|
||||
/dotnet-v5.0.203-SDK.tar.gz
|
||||
/dotnet-v5.0.204-SDK.tar.gz
|
||||
/dotnet-9e8b04bbff820c93c142f99a507a46b976f5c14c-x64-bootstrap.tar.xz
|
||||
/dotnet-arm64-prebuilts-2021-10-29.tar.gz
|
||||
/dotnet-s390x-prebuilts-2021-10-29.tar.gz
|
||||
/dotnet-9e8b04bbff820c93c142f99a507a46b976f5c14c.tar.gz
|
||||
/dotnet-v6.0.101.tar.gz
|
||||
/dotnet-v6.0.102.tar.gz
|
||||
/dotnet-v6.0.103.tar.gz
|
||||
/dotnet-v6.0.104.tar.gz
|
||||
/dotnet-v6.0.105.tar.gz
|
||||
/dotnet-v7.0.100-rc.2.22477.23-x64-bootstrap.tar.xz
|
||||
/dotnet-arm64-prebuilts-2022-10-12.tar.gz
|
||||
/dotnet-ppc64le-prebuilts-2022-10-21.tar.gz
|
||||
/dotnet-s390x-prebuilts-2022-10-12.tar.gz
|
||||
/dotnet-v7.0.100.tar.gz
|
||||
/dotnet-v7.0.101.tar.gz
|
||||
/dotnet-v7.0.102.tar.gz
|
||||
/dotnet-v8.0.0-rc.1.23419.4-x64-bootstrap.tar.xz
|
||||
/dotnet-prebuilts-8.0.100-rc.1.23410.12-arm64.tar.gz
|
||||
/dotnet-prebuilts-8.0.100-rc.1.23410.12-ppc64le.tar.gz
|
||||
/dotnet-prebuilts-8.0.100-rc.1.23410.12-s390x.tar.gz
|
||||
/dotnet-v8.0.0-rc.2.23479.6.tar.gz
|
||||
/dotnet-8.0.0.tar.gz
|
||||
/dotnet-8.0.0.tar.gz.sig
|
||||
/dotnet-8.0.1.tar.gz
|
||||
/dotnet-8.0.1.tar.gz.sig
|
||||
/dotnet-8.0.2.tar.gz
|
||||
/8.0.2.tar.gz.sig
|
||||
/dotnet-v9.0.0-rc.1.24431.7-x64-bootstrap.tar.gz
|
||||
/dotnet-sdk-9.0.100-preview.7.24407.12-linux-arm64.tar.gz
|
||||
/dotnet-prebuilts-9.0.100-preview.7.24407.1-ppc64le.tar.gz
|
||||
/dotnet-prebuilts-9.0.100-preview.7.24407.1-s390x.tar.gz
|
||||
/dotnet-9.0.0-rc.1.24431.7.tar.gz
|
||||
/dotnet-9.0.0-rc.1.24431.7.tar.gz.sig
|
||||
/dotnet-v9.0.0-rc.2.24473.5-x64-bootstrap.tar.gz
|
||||
/dotnet-sdk-9.0.100-rc.1.24452.12-linux-arm64.tar.gz
|
||||
/dotnet-prebuilts-9.0.100-rc.1.24452.1-ppc64le.tar.gz
|
||||
/dotnet-prebuilts-9.0.100-rc.1.24452.1-s390x.tar.gz
|
||||
/dotnet-9.0.0-rc.2.24473.5.tar.gz
|
||||
/dotnet-9.0.0-rc.2.24473.5.tar.gz.sig
|
||||
/dotnet-9.0.0.tar.gz
|
||||
/dotnet-9.0.0.tar.gz.sig
|
||||
/dotnet-9.0.101.tar.gz
|
||||
/dotnet-9.0.101.tar.gz.sig
|
||||
/dotnet-10.0.0-preview.6.25358.103.tar.gz
|
||||
/dotnet-10.0.0-preview.6.25358.103.tar.gz.sig
|
||||
/dotnet-prebuilts-10.0.100-preview.6.25302.104-arm64.tar.gz
|
||||
/dotnet-prebuilts-10.0.100-preview.6.25302.104-x64.tar.gz
|
||||
/dotnet-prebuilts-10.0.100-preview.6.25358.103-ppc64le.tar.gz
|
||||
/dotnet-prebuilts-10.0.100-preview.6.25358.103-s390x.tar.gz
|
||||
/dotnet-10.0.100-preview.7.25380.108.tar.gz
|
||||
/dotnet-10.0.100-preview.7.25380.108.tar.gz.sig
|
||||
/dotnet-prebuilts-10.0.100-preview.7.25322.101-arm64.tar.gz
|
||||
/dotnet-prebuilts-10.0.100-preview.7.25322.101-x64.tar.gz
|
||||
/dotnet-prebuilts-10.0.100-preview.7.25380.108-ppc64le.tar.gz
|
||||
/dotnet-prebuilts-10.0.100-preview.7.25380.108-s390x.tar.gz
|
||||
/dotnet-10.0.100-rc.1.25451.107.tar.gz
|
||||
/dotnet-10.0.100-rc.1.25451.107.tar.gz.sig
|
||||
/dotnet-prebuilts-10.0.100-rc.1.25420.111-x64.tar.gz
|
||||
/dotnet-prebuilts-10.0.100-rc.1.25420.111-arm64.tar.gz
|
||||
/dotnet-prebuilts-10.0.100-rc.1.25451.107-ppc64le.tar.gz
|
||||
/dotnet-prebuilts-10.0.100-rc.1.25451.107-s390x.tar.gz
|
||||
/dotnet-source-10.0.100-rc.2.25502.107.tar.gz
|
||||
/dotnet-source-10.0.100-rc.2.25502.107.tar.gz.sig
|
||||
/dotnet-10.0.100.tar.gz
|
||||
/dotnet-10.0.100.tar.gz.sig
|
||||
/dotnet-10.0.101.tar.gz
|
||||
/dotnet-10.0.101.tar.gz.sig
|
||||
/dotnet-10.0.102.tar.gz
|
||||
/dotnet-10.0.102.tar.gz.sig
|
||||
/dotnet-10.0.103.tar.gz
|
||||
/dotnet-10.0.103.tar.gz.sig
|
||||
/dotnet-10.0.104.tar.gz
|
||||
/dotnet-10.0.104.tar.gz.sig
|
||||
/dotnet-10.0.106.tar.gz
|
||||
/dotnet-10.0.106.tar.gz.sig
|
||||
/dotnet-10.0.108.tar.gz
|
||||
/dotnet-10.0.108.tar.gz.sig
|
||||
/dotnet-10.0.109.tar.gz
|
||||
/dotnet-10.0.109.tar.gz.sig
|
||||
SOURCES/dotnet-10.0.100-rc.1.25451.107.tar.gz
|
||||
SOURCES/dotnet-prebuilts-10.0.100-rc.1.25420.111-arm64.tar.gz
|
||||
SOURCES/dotnet-prebuilts-10.0.100-rc.1.25420.111-x64.tar.gz
|
||||
SOURCES/dotnet-prebuilts-10.0.100-rc.1.25451.107-ppc64le.tar.gz
|
||||
SOURCES/dotnet-prebuilts-10.0.100-rc.1.25451.107-s390x.tar.gz
|
||||
|
||||
27
README.md
27
README.md
@ -1,27 +0,0 @@
|
||||
# dotnet10.0
|
||||
|
||||
The dotnet10.0 package
|
||||
|
||||
This is the .NET 10.0 package for CentOS Stream/RHEL 10.
|
||||
|
||||
# Specification
|
||||
|
||||
This package follows [package naming and contents suggested by
|
||||
upstream](https://docs.microsoft.com/en-us/dotnet/core/build/distribution-packaging),
|
||||
with one exception. It installs dotnet to `/usr/lib64/dotnet` (aka
|
||||
`%{_libdir}`).
|
||||
|
||||
# Contributing
|
||||
|
||||
Please open merge requests in dotnet10.0 repository in CentOS Stream.
|
||||
|
||||
# Testing
|
||||
|
||||
This package uses CI tests as defined in `tests/ci.fmf`. You can run them using
|
||||
[tmt](https://tmt.readthedocs.io/en/stable/overview.html). Creating a
|
||||
merge-request or running an official build will fire off tests and flag any
|
||||
issues. We have enabled gating (via `gating.yaml`) on the tests. That prevents
|
||||
a build that fails any test from being released until the failures are waived.
|
||||
|
||||
The tests themselves are contained in this external repository:
|
||||
https://github.com/redhat-developer/dotnet-regular-tests/
|
||||
17
SOURCES/dotnet-10.0.100-rc.1.25451.107.tar.gz.sig
Normal file
17
SOURCES/dotnet-10.0.100-rc.1.25451.107.tar.gz.sig
Normal file
@ -0,0 +1,17 @@
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
Version: BSN Pgp v1.0.0.0
|
||||
|
||||
iQIcBAABCAAGBQJowLIWAAoJEP2/U8JNtIcu4pgP/2SWmbDSU9AigTTQw7ENur4R
|
||||
e87kPGnwGqosGiN/in5GhZsrRy2D0ETu9QvyscB1yCpXof3fsrpoBVCfuWwSyv0+
|
||||
bRDUChXEMqOO6iwZmQc+fmZ/Kbymos1WWqFqBmOtNqcfs7L0gKZnTkEA/XRDVsSV
|
||||
l8ZTUuEL5XKZnY1DmeTYrsOeHTtmxSVEzH1DsWP/2rjBXN4eBCa9neXIQCGqoOZE
|
||||
xebrlitT9N2/LwZ6NyeRYK0ZaVHS0SNIaFfQf/OpCG5ytYItL1sGZYkmnMXLQBhd
|
||||
3lgGGpv9bKr/5XZP1A/nWXLPH3nKKGF/6sqEAkEcQ6kjQsDBkGbJgsWJgGes1ked
|
||||
CUagzbXtnYyuQcFoT6pEmZ3e2u3E/XjnFy0bqRWUaaUhnLQnuC8zC3r/CvTy8JTv
|
||||
+ncB9BFuzgrtZD94zlmqWvich6QbQDDRngwSA6XZRH90l+i9PrhWt4RddnLa+joY
|
||||
QyuvmGftQrFnmJXBPjQdAg5Fz96zVRQq7crwpgCgpZE2gPvl8CSxzHuHQ6oRVZW/
|
||||
yoQC+XJDkZDjclatsv3a9dRBMnLH4hkGyXwsdX7dBDOpZ0iMCKDy+HF7sDV4pxGU
|
||||
FZicVmAddHXhZCrKZAQGpSLkjWYacOjYVLdNmUNwC3CRzN8Ncbam6psKzI6AJizJ
|
||||
Ites5ZZ9uBm2i6z/179f
|
||||
=uhIK
|
||||
-----END PGP SIGNATURE-----
|
||||
11
SOURCES/release.json
Normal file
11
SOURCES/release.json
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
"release": "10.0.0-rc.1",
|
||||
"channel": "10.0",
|
||||
"tag": "v10.0.100-rc.1.25451.107",
|
||||
"sdkVersion": "10.0.100-rc.1.25451.107",
|
||||
"runtimeVersion": "10.0.0-rc.1.25451.107",
|
||||
"aspNetCoreVersion": "10.0.0-rc.1.25451.107",
|
||||
"sourceRepository": "https://github.com/dotnet/dotnet",
|
||||
"sourceVersion": "2db1f5ee2bdda2e8d873769325fabede32e420e0",
|
||||
"officialBuildId": "20250901.7"
|
||||
}
|
||||
657
SOURCES/runtime-118376-z13-simd.patch
Normal file
657
SOURCES/runtime-118376-z13-simd.patch
Normal file
@ -0,0 +1,657 @@
|
||||
From 97f2fb6ab2988c03917a937cc1552356ff5f7069 Mon Sep 17 00:00:00 2001
|
||||
From: saitama951 <sanjamkumar360@gmail.com>
|
||||
Date: Tue, 5 Aug 2025 07:12:13 +0000
|
||||
Subject: [PATCH 1/4] [S390X] Add simd fallback support for unsupported s390x
|
||||
architectures
|
||||
|
||||
Vector facility was introduced in the z13, which majorly
|
||||
introduces vector int/short/long/double variants of the
|
||||
vector instructions. with the release of z14 we introduced
|
||||
vector float variant as part of vector enhancement facility 1.
|
||||
This patch majorly supports z13 and previous generations.
|
||||
---
|
||||
src/mono/mono/mini/simd-intrinsics.c | 113 +++++++++++++++++++++++--
|
||||
src/mono/mono/utils/mono-hwcap-s390x.c | 1 +
|
||||
src/mono/mono/utils/mono-hwcap-vars.h | 1 +
|
||||
3 files changed, 109 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/src/runtime/src/mono/mono/mini/simd-intrinsics.c b/src/runtime/src/mono/mono/mini/simd-intrinsics.c
|
||||
index 88143637310ef9..b8f78487cd85e6 100644
|
||||
--- a/src/runtime/src/mono/mono/mini/simd-intrinsics.c
|
||||
+++ b/src/runtime/src/mono/mono/mini/simd-intrinsics.c
|
||||
@@ -2112,6 +2112,8 @@ emit_sri_vector (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *fsi
|
||||
}
|
||||
#elif defined(TARGET_S390X)
|
||||
if (type_enum_is_float(arg0_type)) {
|
||||
+ if (!mono_hwcap_s390x_has_ve1 && (arg0_type == MONO_TYPE_R4))
|
||||
+ return NULL;
|
||||
return emit_simd_ins_for_sig (cfg, klass, arg0_type == MONO_TYPE_R8 ? OP_S390_VFLPDB : OP_S390_VFLPSB, -1, arg0_type, fsig, args);
|
||||
} else {
|
||||
return emit_simd_ins_for_sig (cfg, klass, OP_VECTOR_IABS, -1, arg0_type, fsig, args);
|
||||
@@ -2135,11 +2137,17 @@ emit_sri_vector (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *fsi
|
||||
if (!is_element_type_primitive (fsig->params [0]) || !is_element_type_primitive (fsig->params [1]))
|
||||
return NULL;
|
||||
|
||||
+#if defined(TARGET_S390X)
|
||||
+ if (!mono_hwcap_s390x_has_ve1 && ((id == SN_Max) || (id == SN_Min) || (id == SN_MaxNative) || (id == SN_MinNative) || (id !=SN_Xor) || (id != SN_BitwiseAnd) || (id != SN_BitwiseOr)) && arg0_type == MONO_TYPE_R4)
|
||||
+ return NULL;
|
||||
+#endif
|
||||
+
|
||||
#if !defined(TARGET_ARM64) && !defined(TARGET_S390X)
|
||||
if (((id == SN_Max) || (id == SN_Min)) && type_enum_is_float(arg0_type))
|
||||
return NULL;
|
||||
#endif
|
||||
|
||||
+
|
||||
return emit_simd_ins_for_binary_op (cfg, klass, fsig, args, arg0_type, id);
|
||||
}
|
||||
case SN_Divide: {
|
||||
@@ -2149,7 +2157,10 @@ emit_sri_vector (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *fsi
|
||||
if (!is_element_type_primitive (fsig->params [0]) ||
|
||||
!(MONO_TYPE_IS_VECTOR_PRIMITIVE (fsig->params [1]) || is_element_type_primitive (fsig->params [1])))
|
||||
return NULL;
|
||||
-
|
||||
+#if defined(TARGET_S390X)
|
||||
+ if (!mono_hwcap_s390x_has_ve1 && (arg0_type == MONO_TYPE_R4))
|
||||
+ return NULL;
|
||||
+#endif
|
||||
return emit_simd_ins_for_binary_op (cfg, klass, fsig, args, arg0_type, id);
|
||||
}
|
||||
case SN_Multiply: {
|
||||
@@ -2170,7 +2181,10 @@ emit_sri_vector (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *fsi
|
||||
return NULL;
|
||||
} else if (!(is_element_type_primitive (fsig->params [0]) && is_element_type_primitive (fsig->params [1])))
|
||||
return NULL;
|
||||
-
|
||||
+#if defined(TARGET_S390X)
|
||||
+ if (!mono_hwcap_s390x_has_ve1 && (vector_inner_type == MONO_TYPE_R4))
|
||||
+ return NULL;
|
||||
+#endif
|
||||
return emit_simd_ins_for_binary_op (cfg, klass, fsig, args, vector_inner_type, id);
|
||||
}
|
||||
case SN_AndNot: {
|
||||
@@ -2198,13 +2212,17 @@ emit_sri_vector (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *fsi
|
||||
int add_op;
|
||||
|
||||
if (type_enum_is_float (arg0_type)) {
|
||||
+#if defined(TARGET_S390X)
|
||||
+ if (!mono_hwcap_s390x_has_ve1 && (arg0_type == MONO_TYPE_R4))
|
||||
+ return NULL;
|
||||
+#endif
|
||||
mul_op = OP_FMUL;
|
||||
add_op = OP_FADD;
|
||||
} else {
|
||||
mul_op = OP_IMUL;
|
||||
add_op = OP_IADD;
|
||||
|
||||
-#ifdef TARGET_ARM64
|
||||
+#if defined(TARGET_ARM64) || defined(TARGET_S390X)
|
||||
if (!COMPILE_LLVM (cfg) && (arg0_type == MONO_TYPE_I8 || arg0_type == MONO_TYPE_U8 || arg0_type == MONO_TYPE_I || arg0_type == MONO_TYPE_U))
|
||||
return NULL;
|
||||
#endif
|
||||
@@ -2274,6 +2292,8 @@ emit_sri_vector (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *fsi
|
||||
int ceil_or_floor = id == SN_Ceiling ? 10 : 9;
|
||||
return emit_simd_ins_for_sig (cfg, klass, OP_SSE41_ROUNDP, ceil_or_floor, arg0_type, fsig, args);
|
||||
#elif defined(TARGET_S390X)
|
||||
+ if (!mono_hwcap_s390x_has_ve1 && (arg0_type == MONO_TYPE_R4))
|
||||
+ return NULL;
|
||||
int ceil_or_floor = id == SN_Ceiling ? 6 : 7;
|
||||
switch (arg0_type){
|
||||
case MONO_TYPE_R4:
|
||||
@@ -2464,6 +2484,10 @@ emit_sri_vector (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *fsi
|
||||
return emit_vector_create_scalar (cfg, vklass, etype, args [0], is_unsafe);
|
||||
}
|
||||
case SN_Dot: {
|
||||
+#if defined(TARGET_S390X)
|
||||
+ if (!mono_hwcap_s390x_has_ve1 && (arg0_type == MONO_TYPE_R4))
|
||||
+ return NULL;
|
||||
+#endif
|
||||
return emit_dot (cfg, klass, fsig->params [0], arg0_type, args [0]->dreg, args [1]->dreg);
|
||||
}
|
||||
case SN_Equals:
|
||||
@@ -2472,6 +2496,10 @@ emit_sri_vector (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *fsi
|
||||
if (!is_element_type_primitive (fsig->params [0]))
|
||||
return NULL;
|
||||
MonoClass *arg_class = mono_class_from_mono_type_internal (fsig->params [0]);
|
||||
+#ifdef TARGET_S390X
|
||||
+ if (!mono_hwcap_s390x_has_ve1 && (arg0_type == MONO_TYPE_R4))
|
||||
+ return NULL;
|
||||
+#endif
|
||||
if (id == SN_Equals)
|
||||
return emit_xcompare (cfg, klass, arg0_type, args [0], args [1]);
|
||||
|
||||
@@ -2733,7 +2761,10 @@ emit_sri_vector (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *fsi
|
||||
case SN_LessThanOrEqual: {
|
||||
if (!is_element_type_primitive (fsig->params [0]))
|
||||
return NULL;
|
||||
-
|
||||
+#ifdef TARGET_S390X
|
||||
+ if (!mono_hwcap_s390x_has_ve1 && (arg0_type == MONO_TYPE_R4))
|
||||
+ return NULL;
|
||||
+#endif
|
||||
return emit_xcompare_for_intrinsic (cfg, klass, id, arg0_type, args [0], args [1]);
|
||||
}
|
||||
case SN_GreaterThanAll:
|
||||
@@ -2750,7 +2781,10 @@ emit_sri_vector (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *fsi
|
||||
g_assert (fsig->param_count == 2 &&
|
||||
fsig->ret->type == MONO_TYPE_BOOLEAN &&
|
||||
mono_metadata_type_equal (fsig->params [0], fsig->params [1]));
|
||||
-
|
||||
+#ifdef TARGET_S390X
|
||||
+ if (!mono_hwcap_s390x_has_ve1 && (arg0_type == MONO_TYPE_R4))
|
||||
+ return NULL;
|
||||
+#endif
|
||||
gboolean is_all = FALSE;
|
||||
switch (id) {
|
||||
case SN_GreaterThanAll:
|
||||
@@ -2857,6 +2891,10 @@ emit_sri_vector (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *fsi
|
||||
return NULL;
|
||||
if (!type_enum_is_float(arg0_type))
|
||||
return emit_xzero (cfg, klass);
|
||||
+#ifdef TARGET_S390X
|
||||
+ if (!mono_hwcap_s390x_has_ve1 && (arg0_type == MONO_TYPE_R4))
|
||||
+ return NULL;
|
||||
+#endif
|
||||
int op = -1;
|
||||
#if defined(TARGET_ARM64) || defined(TARGET_AMD64) || defined(TARGET_WASM) || defined(TARGET_S390X)
|
||||
op = OP_ONES_COMPLEMENT;
|
||||
@@ -2879,7 +2917,10 @@ emit_sri_vector (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *fsi
|
||||
return emit_xones (cfg, klass);
|
||||
}
|
||||
}
|
||||
-
|
||||
+#ifdef TARGET_S390X
|
||||
+ if (!mono_hwcap_s390x_has_ve1 && (arg0_type == MONO_TYPE_R4))
|
||||
+ return NULL;
|
||||
+#endif
|
||||
MonoInst *arg0 = args [0];
|
||||
MonoClass *op_klass = klass;
|
||||
|
||||
@@ -2907,6 +2948,10 @@ emit_sri_vector (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *fsi
|
||||
case SN_IsPositiveInfinity: {
|
||||
if (!is_element_type_primitive (fsig->params [0]))
|
||||
return NULL;
|
||||
+#ifdef TARGET_S390X
|
||||
+ if (!mono_hwcap_s390x_has_ve1 && (arg0_type == MONO_TYPE_R4))
|
||||
+ return NULL;
|
||||
+#endif
|
||||
if (arg0_type == MONO_TYPE_R4) {
|
||||
guint32 value[4];
|
||||
|
||||
@@ -2984,6 +3029,10 @@ emit_sri_vector (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *fsi
|
||||
case SN_IsZero: {
|
||||
if (!is_element_type_primitive (fsig->params [0]))
|
||||
return NULL;
|
||||
+#ifdef TARGET_S390X
|
||||
+ if (!mono_hwcap_s390x_has_ve1 && (arg0_type == MONO_TYPE_R4))
|
||||
+ return NULL;
|
||||
+#endif
|
||||
return emit_xcompare (cfg, klass, arg0_type, args [0], emit_xzero (cfg, klass));
|
||||
}
|
||||
case SN_Narrow: {
|
||||
@@ -3129,7 +3178,10 @@ emit_sri_vector (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *fsi
|
||||
case SN_OnesComplement: {
|
||||
if (!is_element_type_primitive (fsig->params [0]))
|
||||
return NULL;
|
||||
+#ifdef TARGET_S390X
|
||||
+ if (!mono_hwcap_s390x_has_ve1 && (id == SN_Negate) && (arg0_type == MONO_TYPE_R4))
|
||||
return emit_simd_ins_for_unary_op (cfg, klass, fsig, args, arg0_type, id);
|
||||
+#endif
|
||||
}
|
||||
case SN_Shuffle: {
|
||||
MonoType *etype = get_vector_t_elem_type (fsig->ret);
|
||||
@@ -3295,6 +3347,9 @@ emit_sri_vector (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *fsi
|
||||
|
||||
return emit_simd_ins_for_sig (cfg, klass, OP_XOP_X_X, instc0, arg0_type, fsig, args);
|
||||
#elif defined(TARGET_S390X)
|
||||
+ if (!mono_hwcap_s390x_has_ve1 && (arg0_type == MONO_TYPE_R4))
|
||||
+ return NULL;
|
||||
+
|
||||
int instc0 = arg0_type == MONO_TYPE_R4 ? OP_S390_VFSQSB : OP_S390_VFSQDB;
|
||||
return emit_simd_ins_for_sig (cfg, klass, instc0, 0, arg0_type, fsig, args);
|
||||
#else
|
||||
@@ -3792,6 +3847,10 @@ emit_sri_vector_t (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *f
|
||||
if (fsig->param_count != 2 )
|
||||
return NULL;
|
||||
arg0_type = fsig->param_count > 0 ? get_underlying_type (fsig->params [0]) : MONO_TYPE_VOID;
|
||||
+#ifdef TARGET_S390X
|
||||
+ if (!mono_hwcap_s390x_has_ve1 && ((id !=SN_op_ExclusiveOr) || (id != SN_op_BitwiseAnd) || (id != SN_op_BitwiseOr)) && arg0_type == MONO_TYPE_R4)
|
||||
+ return NULL;
|
||||
+#endif
|
||||
return emit_simd_ins_for_binary_op (cfg, klass, fsig, args, arg0_type, id);
|
||||
|
||||
}
|
||||
@@ -3800,6 +3859,10 @@ emit_sri_vector_t (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *f
|
||||
if (fsig->param_count != 2 )
|
||||
return NULL;
|
||||
MonoClass *arg_class = mono_class_from_mono_type_internal (fsig->params [0]);
|
||||
+#ifdef TARGET_S390X
|
||||
+ if (!mono_hwcap_s390x_has_ve1 && (arg0_type == MONO_TYPE_R4))
|
||||
+ return NULL;
|
||||
+#endif
|
||||
switch (id) {
|
||||
case SN_op_Equality: return emit_xequal (cfg, arg_class, arg0_type, args [0], args [1]);
|
||||
case SN_op_Inequality: return emit_not_xequal (cfg, arg_class, arg0_type, args [0], args [1]);
|
||||
@@ -3810,6 +3873,10 @@ emit_sri_vector_t (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *f
|
||||
case SN_op_UnaryNegation:
|
||||
if (fsig->param_count != 1 )
|
||||
return NULL;
|
||||
+#if defined(TARGET_S390X)
|
||||
+ if (!mono_hwcap_s390x_has_ve1 && (id == SN_op_UnaryNegation) && (arg0_type == MONO_TYPE_R4))
|
||||
+ return NULL;
|
||||
+#endif
|
||||
return emit_simd_ins_for_unary_op (cfg, klass, fsig, args, arg0_type, id);
|
||||
case SN_op_UnaryPlus:
|
||||
if (fsig->param_count != 1)
|
||||
@@ -4150,10 +4217,18 @@ emit_vector_2_3_4 (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *f
|
||||
#ifndef TARGET_ARM64
|
||||
if ((id == SN_Max) || (id == SN_Min))
|
||||
return NULL;
|
||||
+#endif
|
||||
+#ifdef TARGET_S390X
|
||||
+ if (!mono_hwcap_s390x_has_ve1 && ((id == SN_Max) || (id == SN_Min) || (id == SN_MaxNative) || (id == SN_MinNative)))
|
||||
+ return NULL;
|
||||
#endif
|
||||
return emit_simd_ins_for_binary_op (cfg, klass, fsig, args, MONO_TYPE_R4, id);
|
||||
}
|
||||
case SN_Dot: {
|
||||
+#ifdef TARGET_S390X
|
||||
+ if (!mono_hwcap_s390x_has_ve1)
|
||||
+ return NULL;
|
||||
+#endif
|
||||
return emit_dot (cfg, klass, fsig->params [0], MONO_TYPE_R4, args [0]->dreg, args [1]->dreg);
|
||||
}
|
||||
case SN_Negate:
|
||||
@@ -4172,6 +4247,10 @@ emit_vector_2_3_4 (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *f
|
||||
return emit_simd_ins_for_sig (cfg, cmethod->klass, OP_XOP_OVR_X_X, INTRINS_AARCH64_ADV_SIMD_FABS, MONO_TYPE_R4, fsig, args);
|
||||
#endif
|
||||
}
|
||||
+#ifdef TARGET_S390X
|
||||
+ if (!mono_hwcap_s390x_has_ve1)
|
||||
+ return NULL;
|
||||
+#endif
|
||||
// MAX(x,0-x)
|
||||
MonoInst *zero = emit_xzero (cfg, klass);
|
||||
MonoInst *neg = emit_simd_ins (cfg, klass, OP_XBINOP, zero->dreg, args [0]->dreg);
|
||||
@@ -4185,12 +4264,20 @@ emit_vector_2_3_4 (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *f
|
||||
case SN_op_Equality: {
|
||||
if (!(fsig->param_count == 2 && mono_metadata_type_equal (fsig->params [0], type) && mono_metadata_type_equal (fsig->params [1], type)))
|
||||
return NULL;
|
||||
+#ifdef TARGET_S390X
|
||||
+ if (!mono_hwcap_s390x_has_ve1)
|
||||
+ return NULL;
|
||||
+#endif
|
||||
MonoClass *arg_class = mono_class_from_mono_type_internal (fsig->params [0]);
|
||||
return emit_xequal (cfg, arg_class, MONO_TYPE_R4, args [0], args [1]);
|
||||
}
|
||||
case SN_op_Inequality: {
|
||||
if (!(fsig->param_count == 2 && mono_metadata_type_equal (fsig->params [0], type) && mono_metadata_type_equal (fsig->params [1], type)))
|
||||
return NULL;
|
||||
+#ifdef TARGET_S390X
|
||||
+ if (!mono_hwcap_s390x_has_ve1)
|
||||
+ return NULL;
|
||||
+#endif
|
||||
MonoClass *arg_class = mono_class_from_mono_type_internal (fsig->params [0]);
|
||||
return emit_not_xequal (cfg, arg_class, MONO_TYPE_R4, args [0], args [1]);
|
||||
}
|
||||
@@ -4201,6 +4288,11 @@ emit_vector_2_3_4 (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *f
|
||||
ins = emit_simd_ins (cfg, klass, OP_XOP_X_X, args [0]->dreg, -1);
|
||||
ins->inst_c0 = (IntrinsicId)INTRINS_SIMD_SQRT_R4;
|
||||
return ins;
|
||||
+#elif defined(TARGET_S390X)
|
||||
+ if (!mono_hwcap_s390x_has_ve1)
|
||||
+ return NULL;
|
||||
+ ins = emit_simd_ins (cfg, klass, OP_S390_VFSQSB, args [0]->dreg, -1);
|
||||
+ return ins;
|
||||
#else
|
||||
return NULL;
|
||||
#endif
|
||||
@@ -4215,6 +4307,10 @@ emit_vector_2_3_4 (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *f
|
||||
if (id == SN_Clamp)
|
||||
return NULL;
|
||||
#endif
|
||||
+#ifdef TARGET_S390X
|
||||
+ if (!mono_hwcap_s390x_has_ve1)
|
||||
+ return NULL;
|
||||
+#endif
|
||||
|
||||
MonoInst *max = emit_simd_ins (cfg, klass, OP_XBINOP, args[0]->dreg, args[1]->dreg);
|
||||
max->inst_c0 = OP_FMAX;
|
||||
@@ -6865,6 +6961,11 @@ static MonoInst*
|
||||
emit_simd_intrinsics (const char *class_ns, const char *class_name, MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *fsig, MonoInst **args)
|
||||
{
|
||||
MonoInst *ins;
|
||||
+#ifdef TARGET_S390X
|
||||
+ /* vector facility was introduced in z13 */
|
||||
+ if (!mono_hwcap_s390x_has_vec)
|
||||
+ return NULL;
|
||||
+#endif
|
||||
|
||||
if (cfg->opt & MONO_OPT_SIMD) {
|
||||
ins = arch_emit_simd_intrinsics (class_ns, class_name, cfg, cmethod, fsig, args);
|
||||
diff --git a/src/runtime/src/mono/mono/utils/mono-hwcap-s390x.c b/src/runtime/src/mono/mono/utils/mono-hwcap-s390x.c
|
||||
index ddc828bbc046a0..7f735066e238b8 100644
|
||||
--- a/src/runtime/src/mono/mono/utils/mono-hwcap-s390x.c
|
||||
+++ b/src/runtime/src/mono/mono/utils/mono-hwcap-s390x.c
|
||||
@@ -157,6 +157,7 @@ mono_hwcap_arch_init (void)
|
||||
|
||||
mono_hwcap_s390x_has_fpe = facs.fpe;
|
||||
mono_hwcap_s390x_has_vec = facs.vec;
|
||||
+ mono_hwcap_s390x_has_ve1 = facs.ve1;
|
||||
mono_hwcap_s390x_has_mlt = facs.multi;
|
||||
mono_hwcap_s390x_has_ia = facs.ia;
|
||||
mono_hwcap_s390x_has_gie = facs.gie;
|
||||
diff --git a/src/runtime/src/mono/mono/utils/mono-hwcap-vars.h b/src/runtime/src/mono/mono/utils/mono-hwcap-vars.h
|
||||
index 98f4eb29115e83..391910a919c76e 100644
|
||||
--- a/src/runtime/src/mono/mono/utils/mono-hwcap-vars.h
|
||||
+++ b/src/runtime/src/mono/mono/utils/mono-hwcap-vars.h
|
||||
@@ -54,6 +54,7 @@ MONO_HWCAP_VAR(riscv_has_stdext_v)
|
||||
#elif defined (TARGET_S390X)
|
||||
|
||||
MONO_HWCAP_VAR(s390x_has_fpe)
|
||||
+MONO_HWCAP_VAR(s390x_has_ve1)
|
||||
MONO_HWCAP_VAR(s390x_has_vec)
|
||||
MONO_HWCAP_VAR(s390x_has_mlt)
|
||||
MONO_HWCAP_VAR(s390x_has_ia)
|
||||
|
||||
From f5e4c47373482aedd36b7f9c579739f3e8160432 Mon Sep 17 00:00:00 2001
|
||||
From: Sanjam Panda <36253777+saitama951@users.noreply.github.com>
|
||||
Date: Tue, 5 Aug 2025 14:45:51 +0530
|
||||
Subject: [PATCH 2/4] Apply suggestions from code review
|
||||
|
||||
fix code style
|
||||
|
||||
Co-authored-by: kasperk81 <83082615+kasperk81@users.noreply.github.com>
|
||||
---
|
||||
src/mono/mono/mini/simd-intrinsics.c | 14 +++++++-------
|
||||
1 file changed, 7 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/src/runtime/src/mono/mono/mini/simd-intrinsics.c b/src/runtime/src/mono/mono/mini/simd-intrinsics.c
|
||||
index b8f78487cd85e6..0b33399d8634b5 100644
|
||||
--- a/src/runtime/src/mono/mono/mini/simd-intrinsics.c
|
||||
+++ b/src/runtime/src/mono/mono/mini/simd-intrinsics.c
|
||||
@@ -2183,7 +2183,7 @@ emit_sri_vector (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *fsi
|
||||
return NULL;
|
||||
#if defined(TARGET_S390X)
|
||||
if (!mono_hwcap_s390x_has_ve1 && (vector_inner_type == MONO_TYPE_R4))
|
||||
- return NULL;
|
||||
+ return NULL;
|
||||
#endif
|
||||
return emit_simd_ins_for_binary_op (cfg, klass, fsig, args, vector_inner_type, id);
|
||||
}
|
||||
@@ -2783,7 +2783,7 @@ emit_sri_vector (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *fsi
|
||||
mono_metadata_type_equal (fsig->params [0], fsig->params [1]));
|
||||
#ifdef TARGET_S390X
|
||||
if (!mono_hwcap_s390x_has_ve1 && (arg0_type == MONO_TYPE_R4))
|
||||
- return NULL;
|
||||
+ return NULL;
|
||||
#endif
|
||||
gboolean is_all = FALSE;
|
||||
switch (id) {
|
||||
@@ -4227,7 +4227,7 @@ emit_vector_2_3_4 (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *f
|
||||
case SN_Dot: {
|
||||
#ifdef TARGET_S390X
|
||||
if (!mono_hwcap_s390x_has_ve1)
|
||||
- return NULL;
|
||||
+ return NULL;
|
||||
#endif
|
||||
return emit_dot (cfg, klass, fsig->params [0], MONO_TYPE_R4, args [0]->dreg, args [1]->dreg);
|
||||
}
|
||||
@@ -4249,7 +4249,7 @@ emit_vector_2_3_4 (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *f
|
||||
}
|
||||
#ifdef TARGET_S390X
|
||||
if (!mono_hwcap_s390x_has_ve1)
|
||||
- return NULL;
|
||||
+ return NULL;
|
||||
#endif
|
||||
// MAX(x,0-x)
|
||||
MonoInst *zero = emit_xzero (cfg, klass);
|
||||
@@ -4266,7 +4266,7 @@ emit_vector_2_3_4 (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *f
|
||||
return NULL;
|
||||
#ifdef TARGET_S390X
|
||||
if (!mono_hwcap_s390x_has_ve1)
|
||||
- return NULL;
|
||||
+ return NULL;
|
||||
#endif
|
||||
MonoClass *arg_class = mono_class_from_mono_type_internal (fsig->params [0]);
|
||||
return emit_xequal (cfg, arg_class, MONO_TYPE_R4, args [0], args [1]);
|
||||
@@ -4276,7 +4276,7 @@ emit_vector_2_3_4 (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *f
|
||||
return NULL;
|
||||
#ifdef TARGET_S390X
|
||||
if (!mono_hwcap_s390x_has_ve1)
|
||||
- return NULL;
|
||||
+ return NULL;
|
||||
#endif
|
||||
MonoClass *arg_class = mono_class_from_mono_type_internal (fsig->params [0]);
|
||||
return emit_not_xequal (cfg, arg_class, MONO_TYPE_R4, args [0], args [1]);
|
||||
@@ -4309,7 +4309,7 @@ emit_vector_2_3_4 (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *f
|
||||
#endif
|
||||
#ifdef TARGET_S390X
|
||||
if (!mono_hwcap_s390x_has_ve1)
|
||||
- return NULL;
|
||||
+ return NULL;
|
||||
#endif
|
||||
|
||||
MonoInst *max = emit_simd_ins (cfg, klass, OP_XBINOP, args[0]->dreg, args[1]->dreg);
|
||||
|
||||
From 579eda9bc245938bbb2a932064ba552528b7457d Mon Sep 17 00:00:00 2001
|
||||
From: saitama951 <sanjamkumar360@gmail.com>
|
||||
Date: Wed, 6 Aug 2025 04:35:56 +0000
|
||||
Subject: [PATCH 3/4] fix errors * fix test case failures on arm64 * fix more
|
||||
code style reviews
|
||||
|
||||
---
|
||||
src/mono/mono/mini/simd-intrinsics.c | 9 +++++----
|
||||
1 file changed, 5 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/runtime/src/mono/mono/mini/simd-intrinsics.c b/src/runtime/src/mono/mono/mini/simd-intrinsics.c
|
||||
index 0b33399d8634b5..fab77158e8bdf5 100644
|
||||
--- a/src/runtime/src/mono/mono/mini/simd-intrinsics.c
|
||||
+++ b/src/runtime/src/mono/mono/mini/simd-intrinsics.c
|
||||
@@ -2782,7 +2782,7 @@ emit_sri_vector (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *fsi
|
||||
fsig->ret->type == MONO_TYPE_BOOLEAN &&
|
||||
mono_metadata_type_equal (fsig->params [0], fsig->params [1]));
|
||||
#ifdef TARGET_S390X
|
||||
- if (!mono_hwcap_s390x_has_ve1 && (arg0_type == MONO_TYPE_R4))
|
||||
+ if (!mono_hwcap_s390x_has_ve1 && (arg0_type == MONO_TYPE_R4))
|
||||
return NULL;
|
||||
#endif
|
||||
gboolean is_all = FALSE;
|
||||
@@ -3180,8 +3180,9 @@ emit_sri_vector (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *fsi
|
||||
return NULL;
|
||||
#ifdef TARGET_S390X
|
||||
if (!mono_hwcap_s390x_has_ve1 && (id == SN_Negate) && (arg0_type == MONO_TYPE_R4))
|
||||
- return emit_simd_ins_for_unary_op (cfg, klass, fsig, args, arg0_type, id);
|
||||
+ return NULL;
|
||||
#endif
|
||||
+ return emit_simd_ins_for_unary_op (cfg, klass, fsig, args, arg0_type, id);
|
||||
}
|
||||
case SN_Shuffle: {
|
||||
MonoType *etype = get_vector_t_elem_type (fsig->ret);
|
||||
@@ -3849,7 +3850,7 @@ emit_sri_vector_t (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *f
|
||||
arg0_type = fsig->param_count > 0 ? get_underlying_type (fsig->params [0]) : MONO_TYPE_VOID;
|
||||
#ifdef TARGET_S390X
|
||||
if (!mono_hwcap_s390x_has_ve1 && ((id !=SN_op_ExclusiveOr) || (id != SN_op_BitwiseAnd) || (id != SN_op_BitwiseOr)) && arg0_type == MONO_TYPE_R4)
|
||||
- return NULL;
|
||||
+ return NULL;
|
||||
#endif
|
||||
return emit_simd_ins_for_binary_op (cfg, klass, fsig, args, arg0_type, id);
|
||||
|
||||
@@ -4220,7 +4221,7 @@ emit_vector_2_3_4 (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *f
|
||||
#endif
|
||||
#ifdef TARGET_S390X
|
||||
if (!mono_hwcap_s390x_has_ve1 && ((id == SN_Max) || (id == SN_Min) || (id == SN_MaxNative) || (id == SN_MinNative)))
|
||||
- return NULL;
|
||||
+ return NULL;
|
||||
#endif
|
||||
return emit_simd_ins_for_binary_op (cfg, klass, fsig, args, MONO_TYPE_R4, id);
|
||||
}
|
||||
|
||||
From 9f2dad96c5bf08f462577f11100249fdb3f060a6 Mon Sep 17 00:00:00 2001
|
||||
From: saitama951 <sanjamkumar360@gmail.com>
|
||||
Date: Thu, 14 Aug 2025 12:51:00 +0000
|
||||
Subject: [PATCH 4/4] address review comments
|
||||
|
||||
---
|
||||
src/mono/mono/mini/mini-s390x.h | 2 +-
|
||||
src/mono/mono/mini/mini.h | 11 ++++++++
|
||||
src/mono/mono/mini/simd-intrinsics.c | 38 +++++++---------------------
|
||||
3 files changed, 21 insertions(+), 30 deletions(-)
|
||||
|
||||
diff --git a/src/runtime/src/mono/mono/mini/mini-s390x.h b/src/runtime/src/mono/mono/mini/mini-s390x.h
|
||||
index 6e680ba9c6374b..82b2f411f4d439 100644
|
||||
--- a/src/runtime/src/mono/mono/mini/mini-s390x.h
|
||||
+++ b/src/runtime/src/mono/mono/mini/mini-s390x.h
|
||||
@@ -83,7 +83,7 @@ struct SeqPointInfo {
|
||||
#define MONO_ARCH_HAVE_SETUP_RESUME_FROM_SIGNAL_HANDLER_CTX 1
|
||||
#define MONO_ARCH_HAVE_UNWIND_BACKTRACE 1
|
||||
#define MONO_ARCH_FLOAT32_SUPPORTED 1
|
||||
-#define MONO_ARCH_SIMD_INTRINSICS mono_hwcap_s390x_has_vec
|
||||
+#define MONO_ARCH_SIMD_INTRINSICS 1
|
||||
#define MONO_ARCH_NEED_SIMD_BANK 1
|
||||
#define MONO_ARCH_USE_SHARED_FP_SIMD_BANK 1
|
||||
#define S390_STACK_ALIGNMENT 8
|
||||
diff --git a/src/runtime/src/mono/mono/mini/mini.h b/src/runtime/src/mono/mono/mini/mini.h
|
||||
index 30e5f5c4728811..65b38b751e8c45 100644
|
||||
--- a/src/runtime/src/mono/mono/mini/mini.h
|
||||
+++ b/src/runtime/src/mono/mono/mini/mini.h
|
||||
@@ -64,6 +64,12 @@ typedef struct SeqPointInfo SeqPointInfo;
|
||||
#include "mono/metadata/callspec.h"
|
||||
#include "mono/metadata/icall-signatures.h"
|
||||
|
||||
+/* we use runtime checks to fallback to scalar ops for/
|
||||
+ * older z/Architectures
|
||||
+ */
|
||||
+#ifdef TARGET_S390X
|
||||
+#include <mono/utils/mono-hwcap.h>
|
||||
+#endif
|
||||
/*
|
||||
* The mini code should not have any compile time dependencies on the GC being used, so the same object file from mini/
|
||||
* can be linked into both mono and mono-sgen.
|
||||
@@ -3015,6 +3021,11 @@ mini_safepoints_enabled (void)
|
||||
static inline gboolean
|
||||
mini_class_is_simd (MonoCompile *cfg, MonoClass *klass)
|
||||
{
|
||||
+#ifdef TARGET_S390X
|
||||
+ /* vector facility was introduced in z13 */
|
||||
+ if (!mono_hwcap_s390x_has_vec)
|
||||
+ return FALSE;
|
||||
+#endif
|
||||
#ifdef MONO_ARCH_SIMD_INTRINSICS
|
||||
if (!(((cfg)->opt & MONO_OPT_SIMD) && m_class_is_simd_type (klass)))
|
||||
return FALSE;
|
||||
diff --git a/src/runtime/src/mono/mono/mini/simd-intrinsics.c b/src/runtime/src/mono/mono/mini/simd-intrinsics.c
|
||||
index fab77158e8bdf5..ebe0637605fe5a 100644
|
||||
--- a/src/runtime/src/mono/mono/mini/simd-intrinsics.c
|
||||
+++ b/src/runtime/src/mono/mono/mini/simd-intrinsics.c
|
||||
@@ -2138,7 +2138,9 @@ emit_sri_vector (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *fsi
|
||||
return NULL;
|
||||
|
||||
#if defined(TARGET_S390X)
|
||||
- if (!mono_hwcap_s390x_has_ve1 && ((id == SN_Max) || (id == SN_Min) || (id == SN_MaxNative) || (id == SN_MinNative) || (id !=SN_Xor) || (id != SN_BitwiseAnd) || (id != SN_BitwiseOr)) && arg0_type == MONO_TYPE_R4)
|
||||
+ if (!mono_hwcap_s390x_has_ve1 && arg0_type == MONO_TYPE_R4)
|
||||
+ return NULL;
|
||||
+ if (!mono_hwcap_s390x_has_ve1 && ((id == SN_Max) || (id == SN_Min) || (id == SN_MaxNative) || (id == SN_MinNative)) && (arg0_type == MONO_TYPE_R8))
|
||||
return NULL;
|
||||
#endif
|
||||
|
||||
@@ -2147,7 +2149,6 @@ emit_sri_vector (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *fsi
|
||||
return NULL;
|
||||
#endif
|
||||
|
||||
-
|
||||
return emit_simd_ins_for_binary_op (cfg, klass, fsig, args, arg0_type, id);
|
||||
}
|
||||
case SN_Divide: {
|
||||
@@ -3849,7 +3850,7 @@ emit_sri_vector_t (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *f
|
||||
return NULL;
|
||||
arg0_type = fsig->param_count > 0 ? get_underlying_type (fsig->params [0]) : MONO_TYPE_VOID;
|
||||
#ifdef TARGET_S390X
|
||||
- if (!mono_hwcap_s390x_has_ve1 && ((id !=SN_op_ExclusiveOr) || (id != SN_op_BitwiseAnd) || (id != SN_op_BitwiseOr)) && arg0_type == MONO_TYPE_R4)
|
||||
+ if (!mono_hwcap_s390x_has_ve1 && arg0_type == MONO_TYPE_R4)
|
||||
return NULL;
|
||||
#endif
|
||||
return emit_simd_ins_for_binary_op (cfg, klass, fsig, args, arg0_type, id);
|
||||
@@ -3968,6 +3969,11 @@ emit_vector_2_3_4 (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *f
|
||||
return NULL;
|
||||
#endif
|
||||
|
||||
+#ifdef TARGET_S390X
|
||||
+ if (!mono_hwcap_s390x_has_ve1)
|
||||
+ return NULL;
|
||||
+#endif
|
||||
+
|
||||
if (!(cfg->opt & MONO_OPT_SIMD))
|
||||
return NULL;
|
||||
|
||||
@@ -4218,18 +4224,10 @@ emit_vector_2_3_4 (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *f
|
||||
#ifndef TARGET_ARM64
|
||||
if ((id == SN_Max) || (id == SN_Min))
|
||||
return NULL;
|
||||
-#endif
|
||||
-#ifdef TARGET_S390X
|
||||
- if (!mono_hwcap_s390x_has_ve1 && ((id == SN_Max) || (id == SN_Min) || (id == SN_MaxNative) || (id == SN_MinNative)))
|
||||
- return NULL;
|
||||
#endif
|
||||
return emit_simd_ins_for_binary_op (cfg, klass, fsig, args, MONO_TYPE_R4, id);
|
||||
}
|
||||
case SN_Dot: {
|
||||
-#ifdef TARGET_S390X
|
||||
- if (!mono_hwcap_s390x_has_ve1)
|
||||
- return NULL;
|
||||
-#endif
|
||||
return emit_dot (cfg, klass, fsig->params [0], MONO_TYPE_R4, args [0]->dreg, args [1]->dreg);
|
||||
}
|
||||
case SN_Negate:
|
||||
@@ -4248,10 +4246,6 @@ emit_vector_2_3_4 (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *f
|
||||
return emit_simd_ins_for_sig (cfg, cmethod->klass, OP_XOP_OVR_X_X, INTRINS_AARCH64_ADV_SIMD_FABS, MONO_TYPE_R4, fsig, args);
|
||||
#endif
|
||||
}
|
||||
-#ifdef TARGET_S390X
|
||||
- if (!mono_hwcap_s390x_has_ve1)
|
||||
- return NULL;
|
||||
-#endif
|
||||
// MAX(x,0-x)
|
||||
MonoInst *zero = emit_xzero (cfg, klass);
|
||||
MonoInst *neg = emit_simd_ins (cfg, klass, OP_XBINOP, zero->dreg, args [0]->dreg);
|
||||
@@ -4265,20 +4259,12 @@ emit_vector_2_3_4 (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *f
|
||||
case SN_op_Equality: {
|
||||
if (!(fsig->param_count == 2 && mono_metadata_type_equal (fsig->params [0], type) && mono_metadata_type_equal (fsig->params [1], type)))
|
||||
return NULL;
|
||||
-#ifdef TARGET_S390X
|
||||
- if (!mono_hwcap_s390x_has_ve1)
|
||||
- return NULL;
|
||||
-#endif
|
||||
MonoClass *arg_class = mono_class_from_mono_type_internal (fsig->params [0]);
|
||||
return emit_xequal (cfg, arg_class, MONO_TYPE_R4, args [0], args [1]);
|
||||
}
|
||||
case SN_op_Inequality: {
|
||||
if (!(fsig->param_count == 2 && mono_metadata_type_equal (fsig->params [0], type) && mono_metadata_type_equal (fsig->params [1], type)))
|
||||
return NULL;
|
||||
-#ifdef TARGET_S390X
|
||||
- if (!mono_hwcap_s390x_has_ve1)
|
||||
- return NULL;
|
||||
-#endif
|
||||
MonoClass *arg_class = mono_class_from_mono_type_internal (fsig->params [0]);
|
||||
return emit_not_xequal (cfg, arg_class, MONO_TYPE_R4, args [0], args [1]);
|
||||
}
|
||||
@@ -4290,8 +4276,6 @@ emit_vector_2_3_4 (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *f
|
||||
ins->inst_c0 = (IntrinsicId)INTRINS_SIMD_SQRT_R4;
|
||||
return ins;
|
||||
#elif defined(TARGET_S390X)
|
||||
- if (!mono_hwcap_s390x_has_ve1)
|
||||
- return NULL;
|
||||
ins = emit_simd_ins (cfg, klass, OP_S390_VFSQSB, args [0]->dreg, -1);
|
||||
return ins;
|
||||
#else
|
||||
@@ -4308,10 +4292,6 @@ emit_vector_2_3_4 (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *f
|
||||
if (id == SN_Clamp)
|
||||
return NULL;
|
||||
#endif
|
||||
-#ifdef TARGET_S390X
|
||||
- if (!mono_hwcap_s390x_has_ve1)
|
||||
- return NULL;
|
||||
-#endif
|
||||
|
||||
MonoInst *max = emit_simd_ins (cfg, klass, OP_XBINOP, args[0]->dreg, args[1]->dreg);
|
||||
max->inst_c0 = OP_FMAX;
|
||||
@ -1,4 +1,4 @@
|
||||
%bcond_with bootstrap
|
||||
%bcond_without bootstrap
|
||||
|
||||
# LTO triggers a compilation error for a source level issue. Given that LTO should not
|
||||
# change the validity of any given source and the nature of the error (undefined enum), I
|
||||
@ -14,20 +14,20 @@
|
||||
|
||||
# upstream can produce releases with a different tag than the SDK version
|
||||
#%%global upstream_tag v%%{runtime_version}
|
||||
%global upstream_tag v10.0.109
|
||||
%global upstream_tag v10.0.100-rc.1.25451.107
|
||||
%global upstream_tag_without_v %(echo %{upstream_tag} | sed -e 's|^v||')
|
||||
|
||||
%global hostfxr_version %{runtime_version}
|
||||
%global runtime_version 10.0.9
|
||||
%global aspnetcore_runtime_version 10.0.9
|
||||
%global sdk_version 10.0.109
|
||||
%global runtime_version 10.0.0-rc.1.25451.107
|
||||
%global aspnetcore_runtime_version 10.0.0-rc.1.25451.107
|
||||
%global sdk_version 10.0.100-rc.1.25451.107
|
||||
%global sdk_feature_band_version %(echo %{sdk_version} | cut -d '-' -f 1 | sed -e 's|[[:digit:]][[:digit:]]$|00|')
|
||||
%global templates_version %{aspnetcore_runtime_version}
|
||||
#%%global templates_version %%(echo %%{runtime_version} | awk 'BEGIN { FS="."; OFS="." } {print $1, $2, $3+1 }')
|
||||
|
||||
%global runtime_rpm_version %{runtime_version}
|
||||
%global aspnetcore_runtime_rpm_version %{aspnetcore_runtime_version}
|
||||
%global sdk_rpm_version %{sdk_version}
|
||||
%global runtime_rpm_version 10.0.0~rc.1.25451.107
|
||||
%global aspnetcore_runtime_rpm_version 10.0.0~rc.1.25451.107
|
||||
%global sdk_rpm_version 10.0.100~rc.1.25451.107
|
||||
|
||||
%global use_bundled_brotli 0
|
||||
%global use_bundled_libunwind 1
|
||||
@ -77,7 +77,7 @@
|
||||
|
||||
Name: dotnet%{dotnetver}
|
||||
Version: %{sdk_rpm_version}
|
||||
Release: 3%{?dist}
|
||||
Release: 0.8%{?dist}
|
||||
Summary: .NET Runtime and SDK
|
||||
License: 0BSD AND Apache-2.0 AND (Apache-2.0 WITH LLVM-exception) AND APSL-2.0 AND BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause AND BSL-1.0 AND bzip2-1.0.6 AND CC0-1.0 AND CC-BY-3.0 AND CC-BY-4.0 AND CC-PDDC AND CNRI-Python AND EPL-1.0 AND GPL-2.0-only AND (GPL-2.0-only WITH GCC-exception-2.0) AND GPL-2.0-or-later AND GPL-3.0-only AND ICU AND ISC AND LGPL-2.1-only AND LGPL-2.1-or-later AND LicenseRef-Fedora-Public-Domain AND LicenseRef-ISO-8879 AND MIT AND MIT-Wu AND MS-PL AND MS-RL AND NCSA AND OFL-1.1 AND OpenSSL AND Unicode-DFS-2015 AND Unicode-DFS-2016 AND W3C-19980720 AND X11 AND Zlib
|
||||
|
||||
@ -115,6 +115,8 @@ Patch0: runtime-re-enable-implicit-rejection.patch
|
||||
Patch1: runtime-openssl-sha1.patch
|
||||
# fix an error caused by combining Fedora's CFLAGS with how .NET builds some assembly files
|
||||
Patch2: runtime-disable-fortify-on-ilasm-parser.patch
|
||||
# Add SIMD fallback paths for z13
|
||||
Patch3: runtime-118376-z13-simd.patch
|
||||
|
||||
|
||||
ExclusiveArch: aarch64 ppc64le s390x x86_64
|
||||
@ -158,7 +160,6 @@ BuildRequires: lttng-ust-devel
|
||||
%endif
|
||||
BuildRequires: make
|
||||
BuildRequires: openssl-devel
|
||||
BuildRequires: procps-ng
|
||||
BuildRequires: python3
|
||||
%if ! %{use_bundled_rapidjson}
|
||||
BuildRequires: rapidjson-devel
|
||||
@ -437,7 +438,7 @@ applications using the .NET SDK.
|
||||
}
|
||||
|
||||
%dotnet_targeting_pack dotnet-apphost-pack-%{dotnetver} %{runtime_rpm_version} Microsoft.NETCore.App %{dotnetver} Microsoft.NETCore.App.Host.%{runtime_id}
|
||||
%dotnet_targeting_pack dotnet-targeting-pack-%{dotnetver} %{runtime_rpm_version} Microsoft.NETCore.App %{dotnetver} Microsoft.NETCore.App.Ref
|
||||
%dotnet_targeting_pack dotnet-targeting-pack-%{dotnetver} %{runtime_rpm_version} Microsoft.NETCore.App.Ref %{dotnetver} Microsoft.NETCore.App.Ref
|
||||
%dotnet_targeting_pack aspnetcore-targeting-pack-%{dotnetver} %{aspnetcore_runtime_rpm_version} Microsoft.AspNetCore.App %{dotnetver} Microsoft.AspNetCore.App.Ref
|
||||
|
||||
|
||||
@ -535,8 +536,6 @@ rm -rf prereqs/packages/archive/dotnet-sdk*.tar.gz
|
||||
|
||||
%autopatch -p1 -M 999
|
||||
|
||||
sed -i -E 's/trap.*tempDir.*EXIT//' eng/source-build-toolset-init.sh
|
||||
|
||||
%if ! %{use_bundled_brotli}
|
||||
rm -r src/runtime/src/native/external/brotli/
|
||||
%endif
|
||||
@ -560,14 +559,12 @@ rm -r src/runtime/src/native/external/zlib-ng
|
||||
|
||||
|
||||
%build
|
||||
cat /proc/cpuinfo
|
||||
cat /proc/meminfo
|
||||
cat /etc/os-release
|
||||
|
||||
%if %{without bootstrap}
|
||||
# We need to create a copy because build scripts will mutate this
|
||||
cp -a %{_libdir}/dotnet previously-built-dotnet
|
||||
#find previously-built-dotnet
|
||||
find previously-built-dotnet
|
||||
%endif
|
||||
|
||||
%if 0%{?fedora} || 0%{?rhel} >= 9
|
||||
@ -602,36 +599,14 @@ CXXFLAGS=$(echo $CXXFLAGS | sed -e 's/ -march=z13//')
|
||||
CXXFLAGS=$(echo $CXXFLAGS | sed -e 's/ -mtune=z14//')
|
||||
%endif
|
||||
|
||||
%if 0%{?rhel} >= 10
|
||||
# This *seems* to avoid https://github.com/dotnet/runtime/issues/119070
|
||||
# FIXME: Re-test this, and/or replace with upstream fix
|
||||
CFLAGS=$(echo $CFLAGS | sed -e 's/-march=x86-64-v3 //')
|
||||
CXXFLAGS=$(echo $CXXFLAGS | sed -e 's/-march=x86-64-v3 //')
|
||||
LDFLAGS=$(echo $LDFLAGS | sed -e 's/-march=x86-64-v3 //')
|
||||
%endif
|
||||
|
||||
# Enabling fortify-source and "-Wall -Weverything" produces new warnings from libc. Turn them off.
|
||||
CFLAGS="$CFLAGS -Wno-used-but-marked-unused"
|
||||
CXXFLAGS="$CXXFLAGS -Wno-used-but-marked-unused"
|
||||
|
||||
%if 0%{?fedora} >= 43 || 0%{?rhel} > 10
|
||||
# -Wall includes Wjump-misses-init in newer clang versions
|
||||
CFLAGS="$CFLAGS -Wno-jump-misses-init"
|
||||
CXXFLAGS="$CXXFLAGS -Wno-jump-misses-init"
|
||||
%endif
|
||||
|
||||
export EXTRA_CFLAGS="$CFLAGS"
|
||||
export EXTRA_CXXFLAGS="$CXXFLAGS"
|
||||
export EXTRA_LDFLAGS="$LDFLAGS"
|
||||
|
||||
# In some build environments, the build environment is shared across multiple
|
||||
# packages. We need to be careful not to consume all the resources of the
|
||||
# entire system. If we do, we might get killed by OOM killer.
|
||||
%ifarch ppc64le s390x # TODO: conditionalize on konflux too
|
||||
export DOTNET_PROCESSOR_COUNT=4
|
||||
export DOTNET_GCHeapHardLimit=0x400000000
|
||||
%endif
|
||||
|
||||
# Disable tracing, which is incompatible with certain versions of
|
||||
# lttng See https://github.com/dotnet/runtime/issues/57784. The
|
||||
# suggested compile-time change doesn't work, unfortunately.
|
||||
@ -662,9 +637,9 @@ system_libs=
|
||||
%endif
|
||||
|
||||
%ifarch ppc64le s390x
|
||||
max_attempts=5
|
||||
%else
|
||||
max_attempts=3
|
||||
%else
|
||||
max_attempts=1
|
||||
%endif
|
||||
|
||||
function retry_until_success {
|
||||
@ -674,8 +649,6 @@ function retry_until_success {
|
||||
set +e
|
||||
while [[ $exit_code != 0 ]] && [[ $tries != 0 ]]; do
|
||||
(( tries = tries - 1 ))
|
||||
# Clean stale build state so retries start fresh.
|
||||
rm -rf .packages $(find . -name artifacts -type d)
|
||||
"$@"
|
||||
exit_code=$?
|
||||
done
|
||||
@ -683,66 +656,6 @@ function retry_until_success {
|
||||
return $exit_code
|
||||
}
|
||||
|
||||
# Runs a command and kills it if it produces no output.
|
||||
# Use a longer timeout on machines with fewer cores since builds are slower.
|
||||
function output_timeout {
|
||||
# 30m on machines with more than 4 cores, 60m on smaller machines where builds are slower.
|
||||
# The aarch64 Neoverse N1 CI machines have 4 cores and need the longer timeout.
|
||||
local nprocs=$(nproc)
|
||||
local idle_timeout=1800
|
||||
if (( nprocs <= 4 )); then
|
||||
idle_timeout=3600
|
||||
fi
|
||||
|
||||
# Create a pipe we'll read the output from for timeout detection.
|
||||
local fifo=$(mktemp -u)
|
||||
mkfifo "$fifo"
|
||||
|
||||
# Create a process group so we can kill every process including children.
|
||||
# And use a long timeout (5h) in (the unlikely) case output timeout detection continues to be triggered.
|
||||
setsid timeout --foreground 5h "$@" &> "$fifo" &
|
||||
local cmd_pid=$!
|
||||
|
||||
# Read lines from the output with a timeout.
|
||||
# Disable tracing to avoid 'set -x' noise from the read loop appearing in the output.
|
||||
local timed_out=false
|
||||
local traceflags=$-
|
||||
set +x
|
||||
while true; do
|
||||
local rc=0
|
||||
IFS= read -t $idle_timeout -r line || rc=$?
|
||||
if (( rc == 0 )); then
|
||||
printf '%s\n' "$line"
|
||||
elif (( rc > 128 )); then
|
||||
echo "output_timeout: no output for ${idle_timeout}s" >&2
|
||||
timed_out=true
|
||||
break
|
||||
else
|
||||
[[ -z $line ]] || printf '%s\n' "$line"
|
||||
break
|
||||
fi
|
||||
done < "$fifo"
|
||||
[[ $traceflags != *x* ]] || set -x
|
||||
|
||||
if $timed_out; then
|
||||
# Hang detected: kill the process group, then collect the exit code.
|
||||
kill -9 -- -$cmd_pid 2>/dev/null || true
|
||||
wait $cmd_pid 2>/dev/null
|
||||
local exit_code=$?
|
||||
else
|
||||
# Normal exit: collect the real exit code, then clean up any orphaned processes.
|
||||
wait $cmd_pid 2>/dev/null
|
||||
local exit_code=$?
|
||||
kill -9 -- -$cmd_pid 2>/dev/null || true
|
||||
fi
|
||||
|
||||
# Cleanup.
|
||||
rm -f "$fifo"
|
||||
|
||||
return $exit_code
|
||||
}
|
||||
|
||||
|
||||
|
||||
cat >dotnet-rpm-build.sh <<EOF
|
||||
#!/bin/bash
|
||||
@ -755,43 +668,39 @@ find -depth -name 'artifacts' -type d -print -exec rm -rf {} \;
|
||||
./build.sh \
|
||||
--source-only \
|
||||
--release-manifest %{SOURCE3} \
|
||||
--branding default \
|
||||
%if %{without bootstrap}
|
||||
--with-sdk previously-built-dotnet \
|
||||
%endif
|
||||
%ifarch %{mono_archs}
|
||||
--use-mono-runtime \
|
||||
%endif
|
||||
--clean-while-building \
|
||||
-- \
|
||||
/p:UseSystemLibs=${system_libs} \
|
||||
/p:TargetRid=%{runtime_id} \
|
||||
/p:OfficialBuilder="$vendor" \
|
||||
/p:MinimalConsoleLogOutput=false \
|
||||
/p:ContinueOnPrebuiltBaselineError=true \
|
||||
#/v:n \
|
||||
#/p:LogVerbosity=n \
|
||||
#/p:MinimalConsoleLogOutput=false \
|
||||
|
||||
|
||||
/v:n \
|
||||
/p:LogVerbosity=n
|
||||
EOF
|
||||
|
||||
chmod +x dotnet-rpm-build.sh
|
||||
|
||||
VERBOSE=1 retry_until_success $max_attempts \
|
||||
output_timeout \
|
||||
./dotnet-rpm-build.sh || { cat /proc/cpuinfo; cat /proc/meminfo; env; exit 1; }
|
||||
timeout 5h \
|
||||
./dotnet-rpm-build.sh
|
||||
|
||||
|
||||
sed -e 's|[@]LIBDIR[@]|%{_libdir}|g' %{SOURCE102} > dotnet.sh
|
||||
|
||||
env
|
||||
ps aux
|
||||
|
||||
|
||||
%install
|
||||
install -dm 0755 %{buildroot}%{_libdir}/dotnet
|
||||
find artifacts/assets/Release/
|
||||
ls artifacts/assets/Release/
|
||||
mkdir -p built-sdk
|
||||
tar xf artifacts/assets/Release/dotnet-sdk-%{sdk_version}*-%{runtime_id}.tar.gz -C %{buildroot}%{_libdir}/dotnet/
|
||||
tar xf artifacts/assets/Release/Sdk/%{sdk_version}/dotnet-sdk-%{sdk_version}*-%{runtime_id}.tar.gz -C %{buildroot}%{_libdir}/dotnet/
|
||||
|
||||
# Delete bundled certificates: we want to use the system store only,
|
||||
# except for when we have no other choice and ca-certificates doesn't
|
||||
@ -884,7 +793,6 @@ find %{buildroot}%{_libdir}/dotnet/sdk -type f -name '*.pdb' | sed -E 's|%{buil
|
||||
# delete files, we will not have everything we need to self-test in %%check.
|
||||
%{buildroot}%{_libdir}/dotnet/dotnet --info
|
||||
%{buildroot}%{_libdir}/dotnet/dotnet --version
|
||||
ps aux
|
||||
|
||||
# Provided by dotnet-host from another SRPM
|
||||
rm %{buildroot}%{_libdir}/dotnet/LICENSE.txt
|
||||
@ -892,6 +800,10 @@ rm %{buildroot}%{_libdir}/dotnet/ThirdPartyNotices.txt
|
||||
rm %{buildroot}%{_libdir}/dotnet/dotnet
|
||||
%endif
|
||||
|
||||
# Removed by upstream in .NET 10 RC 2
|
||||
rm -r %{buildroot}%{_libdir}/dotnet/packs/NETStandard.Library.Ref/2.1.0
|
||||
rmdir %{buildroot}%{_libdir}/dotnet/packs/NETStandard.Library.Ref
|
||||
|
||||
|
||||
|
||||
%check
|
||||
@ -903,7 +815,6 @@ export COMPlus_LTTng=0
|
||||
%if %{is_latest_dotnet}
|
||||
%{buildroot}%{_libdir}/dotnet/dotnet --info
|
||||
%{buildroot}%{_libdir}/dotnet/dotnet --version
|
||||
ps aux
|
||||
%endif
|
||||
|
||||
|
||||
@ -993,74 +904,18 @@ ps aux
|
||||
|
||||
|
||||
%changelog
|
||||
* Thu Jul 02 2026 Tom Deseyn <tdeseyn@redhat.com> - 10.0.109-3
|
||||
- Reduce time to detect hanging builds
|
||||
- Resolves: RHEL-183875
|
||||
|
||||
* Wed Jun 10 2026 Tom Deseyn <tdeseyn@redhat.com> - 10.0.109-2
|
||||
- Update to .NET SDK 10.0.109 and Runtime 10.0.9
|
||||
- Resolves: RHEL-181557
|
||||
|
||||
* Thu May 28 2026 Omair Majid <omajid@redhat.com> - 10.0.108-2
|
||||
- Update to .NET SDK 10.0.108 and Runtime 10.0.8
|
||||
- Resolves: RHEL-173908
|
||||
|
||||
* Wed Apr 22 2026 Omair Majid <omajid@redhat.com> - 10.0.106-3
|
||||
- Adjust build limits
|
||||
- Resolves: RHEL-169518
|
||||
|
||||
* Fri Apr 17 2026 Omair Majid <omajid@redhat.com> - 10.0.106-2
|
||||
- Update to .NET SDK 10.0.106 and Runtime 10.0.6
|
||||
- Resolves: RHEL-163387
|
||||
|
||||
* Thu Mar 26 2026 Dominik Rehák <drehak@redhat.com> - 10.0.104-2
|
||||
- Update to .NET SDK 10.0.104 and Runtime 10.0.4
|
||||
- Resolves: RHEL-152955
|
||||
|
||||
* Wed Feb 11 2026 Omair Majid <omajid@redhat.com> - 10.0.103-2
|
||||
- Update to .NET SDK 10.0.103 and Runtime 10.0.3
|
||||
- Resolves: RHEL-144975
|
||||
|
||||
* Wed Jan 14 2026 Omair Majid <omajid@redhat.com> - 10.0.102-2
|
||||
- Update to .NET SDK 10.0.102 and Runtime 10.0.2
|
||||
- Resolves: RHEL-138641
|
||||
|
||||
* Tue Dec 09 2025 Omair Majid <omajid@redhat.com> - 10.0.101-2
|
||||
- Update to .NET SDK 10.0.101 and Runtime 10.0.1
|
||||
- Resolves: RHEL-130939
|
||||
|
||||
* Wed Nov 12 2025 Omair Majid <omajid@redhat.com> - 10.0.100-2
|
||||
- Update to .NET SDK 10.0.100 and Runtime 10.0.0
|
||||
- Resolves: RHEL-125749
|
||||
|
||||
* Wed Oct 15 2025 Omair Majid <omajid@redhat.com> - 10.0.100~rc.2.25502.107-0.12
|
||||
- Update to .NET SDK 10.0.100-rc.2.25502.107 and Runtime 10.0.0-rc.2.25502.107
|
||||
- Resolves: RHEL-121558
|
||||
|
||||
* Tue Sep 30 2025 Omair Majid <omajid@redhat.com> - 10.0.100~rc.1.25451.107-0.11
|
||||
- Disable bootstrap
|
||||
- Related: RHEL-114571
|
||||
|
||||
* Sun Sep 14 2025 Omair Majid <omajid@redhat.com> - 10.0.100~rc.1.25451.107-0.10
|
||||
* Sun Sep 14 2025 Omair Majid <omajid@redhat.com> - 10.0.100~preview.6.25358.103-0.8
|
||||
- Update to .NET 10 RC 1
|
||||
- Resolves: RHEL-114571
|
||||
- Resolves: RHEL-114568
|
||||
|
||||
* Tue Sep 09 2025 Omair Majid <omajid@redhat.com> - 10.0.100~preview.7.25380.108-0.9
|
||||
* Thu Sep 04 2025 Omair Majid <omajid@redhat.com> - 10.0.100~preview.6.25358.103-0.7
|
||||
- Drop netstandard-targeting-pack-2.1, it's being removed by upstream in RC 1
|
||||
- Related: RHEL-98673
|
||||
|
||||
* Wed Aug 06 2025 Omair Majid <omajid@redhat.com> - 10.0.100~preview.6.25358.103-0.6
|
||||
- Disable bootstrap
|
||||
- Related: RHEL-98678
|
||||
|
||||
* Thu Sep 04 2025 Omair Majid <omajid@redhat.com> - 10.0.100~preview.7.25380.108-0.8
|
||||
- Drop netstandard-targeting-pack-2.1
|
||||
- Related: RHEL-98678
|
||||
|
||||
* Sat Aug 23 2025 Omair Majid <omajid@redhat.com> - 10.0.100~preview.7.25380.108-0.7
|
||||
- Update to .NET 10 Preview 7
|
||||
- Related: RHEL-98678
|
||||
|
||||
* Tue Aug 19 2025 Omair Majid <omajid@redhat.com> - 10.0.100~preview.6.25358.103-0.6
|
||||
- Rebuild to try and get rid of random errors
|
||||
- Related: RHEL-98678
|
||||
- Resolves: RHEL-98673
|
||||
|
||||
* Fri Aug 01 2025 Omair Majid <omajid@redhat.com> - 10.0.100~preview.6.25358.103-0.5
|
||||
- Initial commit on c10s
|
||||
- Resolves: RHEL-98678
|
||||
- Initial commit on c9s
|
||||
- Resolves: RHEL-98673
|
||||
@ -1,123 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Usage:
|
||||
# build-dotnet-bootstrap-tarball <tag-or-commit-from-dotnet>
|
||||
#
|
||||
# Creates a source archive suitable for bootstrapping
|
||||
# https://github.com/dotnet/dotnet.
|
||||
#
|
||||
# Requires a tarball with the name "${dotnet}-${tag}.tar.gz" in current
|
||||
# directory.
|
||||
|
||||
set -euo pipefail
|
||||
IFS=$'\n\t'
|
||||
|
||||
function print_usage {
|
||||
echo "Usage:"
|
||||
echo "$0 <tag-from-dotnet>|<commit-sha-from-dotnet>"
|
||||
echo
|
||||
echo "Creates a $arch bootstrap source archive from an archive of https://github.com/dotnet/dotnet"
|
||||
}
|
||||
|
||||
function clean_dotnet_cache {
|
||||
rm -rf ~/.aspnet ~/.dotnet/ ~/.nuget/ ~/.local/share/NuGet ~/.templateengine
|
||||
rm -rf /tmp/NuGet /tmp/NuGetScratch /tmp/.NETCore* /tmp/.NETStandard* /tmp/.dotnet /tmp/dotnet.* /tmp/clr-debug-pipe* /tmp/Razor-Server /tmp/CoreFxPipe* /tmp/VBCSCompiler /tmp/.NETFramework*
|
||||
rm -rf ~/.npm/
|
||||
}
|
||||
|
||||
function check_bootstrap_environment {
|
||||
if rpm -qa | grep dotnet ; then
|
||||
echo "error: dotnet is installed. Not a good idea for bootstrapping."
|
||||
exit 1
|
||||
fi
|
||||
if [ -d /usr/lib/dotnet ] || [ -d /usr/lib64/dotnet ] || [ -d /usr/share/dotnet ] ; then
|
||||
echo "error: one of /usr/lib/dotnet /usr/lib64/dotnet or /usr/share/dotnet/ exists. Not a good idea for bootstrapping."
|
||||
exit 1
|
||||
fi
|
||||
if command -v dotnet ; then
|
||||
echo "error: dotnet is in $PATH. Not a good idea for bootstrapping."
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
positional_args=()
|
||||
while [[ "$#" -gt 0 ]]; do
|
||||
arg="${1}"
|
||||
case "${arg}" in
|
||||
-h|--help)
|
||||
print_usage
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
positional_args+=("$1")
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
check_bootstrap_environment
|
||||
|
||||
tag=${positional_args[0]:-}
|
||||
if [[ -z ${tag} ]]; then
|
||||
echo "error: missing tag to build"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
set -x
|
||||
|
||||
tag_without_v=$(echo "${tag}" | sed -e 's|^v||')
|
||||
tarball_name="dotnet-${tag_without_v}"
|
||||
tarball_suffix=.tar.gz
|
||||
|
||||
if [ -f "dotnet-prebuilts-${tag}-x64${tarball_suffix}" ]; then
|
||||
echo "error: dotnet-prebuilts-${tag}-x64${tarball_suffix} already exists"
|
||||
exit 1
|
||||
fi
|
||||
if [ -f "dotnet-prebuilts-${tag}-arm64${tarball_suffix}" ]; then
|
||||
echo "error: dotnet-prebuilts-${tag}-arm64${tarball_suffix} already exists"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
for arch in arm64 x64; do
|
||||
rm -rf "${tarball_name}"
|
||||
tar xf "${tarball_name}${tarball_suffix}"
|
||||
|
||||
pushd "${tarball_name}"
|
||||
|
||||
if [[ $arch == arm64 ]]; then
|
||||
./prep-source-build.sh --bootstrap-rid linux-arm64
|
||||
else
|
||||
./prep-source-build.sh
|
||||
fi
|
||||
|
||||
# Remove files with funny licenses and crypto implementations and
|
||||
# other not-very-useful artifacts. We MUST NOT ship any files that
|
||||
# have unapproved licenses and unexpected cryptographic
|
||||
# implementations.
|
||||
#
|
||||
# We use rm -r (no -f) to make sure the operation fails if the files
|
||||
# are not at the expected locations. If the files are not at the
|
||||
# expected location, we need to find the new location of the files and
|
||||
# delete them, or verify that upstream has already removed the files.
|
||||
|
||||
# rm -r $FILE_TO_REMOVE
|
||||
|
||||
sdk_version=$(jq -r .tools.dotnet "global.json")
|
||||
|
||||
mkdir -p "../dotnet-prebuilts-${sdk_version}-${arch}"
|
||||
pushd "../dotnet-prebuilts-${sdk_version}-${arch}"
|
||||
mv "../${tarball_name}/prereqs/packages/archive/Private.SourceBuilt.Artifacts.Bootstrap.tar.gz" .
|
||||
wget https://builds.dotnet.microsoft.com/dotnet/Sdk/${sdk_version}/dotnet-sdk-${sdk_version}-linux-${arch}.tar.gz || \
|
||||
wget https://ci.dot.net/public/Sdk/${sdk_version}/dotnet-sdk-${sdk_version}-linux-${arch}.tar.gz
|
||||
popd
|
||||
|
||||
popd
|
||||
|
||||
tar czf "dotnet-prebuilts-${sdk_version}-${arch}${tarball_suffix}" "dotnet-prebuilts-${sdk_version}-${arch}"
|
||||
rm -rf "dotnet-prebuilts-${sdk_version}-${arch}"
|
||||
done
|
||||
|
||||
if [ -f rpm-crosscompile-all ] ; then
|
||||
./rpm-crosscompile-all "${tag}"
|
||||
fi
|
||||
|
||||
@ -1,62 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Usage:
|
||||
# build-prebuilt-archive architecture vmr-directory
|
||||
#
|
||||
# Creates an archive containing necessary bootstrapping binaries for ppc64le or
|
||||
# s390x architectures from a VMR build.
|
||||
#
|
||||
# You need to have cloned the VMR (https://github.com/dotnet/dotnet) and
|
||||
# cross-compiled it for the target architecture already.
|
||||
|
||||
set -euo pipefail
|
||||
IFS=$'\n\t'
|
||||
set -x
|
||||
|
||||
function print_usage {
|
||||
echo "Usage:"
|
||||
echo "$0 <architecture> <vmr directory>"
|
||||
echo
|
||||
echo "Creates a ppc64le or s390x bootstrap archive from a VMR build."
|
||||
echo
|
||||
echo "You need to have cloned the VMR (https://github.com/dotnet/dotnet) and"
|
||||
echo "cross-compiled it for the target architecture already."
|
||||
|
||||
}
|
||||
|
||||
positional_args=()
|
||||
while [[ "$#" -gt 0 ]]; do
|
||||
arg="${1}"
|
||||
case "${arg}" in
|
||||
-h|--help)
|
||||
print_usage
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
positional_args+=("$1")
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
arch=${positional_args[0]} # Name of the architecture. Eg, s390x or ppc64le
|
||||
dir=${positional_args[1]} # Checkout of the VMR with the cross-build for the target architecture
|
||||
dir=$(readlink -f "$dir")
|
||||
|
||||
sdk_tarball=$(readlink -f $(find "$dir" -iname 'dotnet-sdk*'"$arch"'*tar.gz' | head -1))
|
||||
|
||||
# SDK is at VMR/artifacts/assets/Release/dotnet-sdk-9.0.100-preview.3.24165.1-linux-$arch.tar.gz. Extract the SDK version from the name.
|
||||
sdk_version=$(echo "$(basename "${sdk_tarball}")" | sed -E -e 's/dotnet-sdk-//' -e "s/-linux-$arch.tar.gz//")
|
||||
echo $sdk_version
|
||||
|
||||
archive_name=dotnet-prebuilts-${sdk_version}-${arch}
|
||||
|
||||
mkdir -p $archive_name
|
||||
pushd $archive_name
|
||||
|
||||
cp -av $sdk_tarball .
|
||||
cp $dir/artifacts/assets/Release/Private.SourceBuilt.Artifacts.*.tar.gz .
|
||||
|
||||
popd
|
||||
|
||||
tar cvzf $archive_name.tar.gz $archive_name
|
||||
18
copr-build
18
copr-build
@ -1,18 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
set -x
|
||||
|
||||
function fedora_release {
|
||||
source /etc/os-release
|
||||
echo $VERSION_ID
|
||||
}
|
||||
|
||||
fedpkg --release f$(fedora_release) srpm 2>&1 | tee fedpkg.output
|
||||
|
||||
srpm_name=$(grep 'Wrote: ' fedpkg.output | cut -d' ' -f 2)
|
||||
|
||||
ls -alh "${srpm_name}"
|
||||
|
||||
copr-cli --debug build @dotnet-sig/dotnet-preview "${srpm_name}" --timeout 36000
|
||||
22
gating.yaml
22
gating.yaml
@ -1,22 +0,0 @@
|
||||
--- !Policy
|
||||
product_versions:
|
||||
- fedora-*
|
||||
decision_context: bodhi_update_push_testing
|
||||
subject_type: koji_build
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
|
||||
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.rpminspect.static-analysis}
|
||||
--- !Policy
|
||||
product_versions:
|
||||
- fedora-*
|
||||
decision_context: bodhi_update_push_stable
|
||||
subject_type: koji_build
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
|
||||
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.rpminspect.static-analysis}
|
||||
--- !Policy
|
||||
product_versions:
|
||||
- rhel-*
|
||||
decision_context: osci_compose_gate
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}
|
||||
11
release.json
11
release.json
@ -1,11 +0,0 @@
|
||||
{
|
||||
"release": "10.0.9",
|
||||
"channel": "10.0",
|
||||
"tag": "v10.0.109",
|
||||
"sdkVersion": "10.0.109",
|
||||
"runtimeVersion": "10.0.9",
|
||||
"aspNetCoreVersion": "10.0.9",
|
||||
"sourceRepository": "https://github.com/dotnet/dotnet",
|
||||
"sourceVersion": "901ca941248413c79832d2fdbd709da0c4386353",
|
||||
"officialBuildId": "20260520.13"
|
||||
}
|
||||
@ -1,20 +0,0 @@
|
||||
---
|
||||
inspections:
|
||||
# We patch upstream a lot, no need to reject patches
|
||||
patches: off
|
||||
badfuncs:
|
||||
allowed:
|
||||
# The Mono runtime (used on s390x, for example), uses inet_addr for
|
||||
# debugging (such as sending the control flow graph to a remote process).
|
||||
# See runtime/src/mono/mono/mini/cfgdump.c. This isn't part of any
|
||||
# standard networking facility; networking APIs are implemented/used in
|
||||
# libSystem*so.
|
||||
/usr/lib64/dotnet/shared/Microsoft.NETCore.App/*/libcoreclr.so:
|
||||
- inet_addr
|
||||
/usr/lib64/dotnet/packs/Microsoft.NETCore.App.Runtime.*/*/runtimes/*/native/libcoreclr.so:
|
||||
- inet_addr
|
||||
runpath:
|
||||
# Upstream explicitly sets $ORIGIN/netcoredeps as an RPATH
|
||||
# See https://github.com/dotnet/core/blob/main/Documentation/self-contained-linux-apps.md
|
||||
allowed_origin_paths:
|
||||
- /netcoredeps
|
||||
2
sources
2
sources
@ -1,2 +0,0 @@
|
||||
SHA512 (dotnet-10.0.109.tar.gz) = e4050699b782126604aae41e8cfc0366741c0d3e03255e72fcb22560bceae4e503d8f12dfad58d88826b233e0f2843d125efd1f86d6ab18f7a356d6350dc18a2
|
||||
SHA512 (dotnet-10.0.109.tar.gz.sig) = 2fd6d5c6eef1a510125b8480ad4a83de098cb1acbcd54094b2f7b21771fa671f3ea94d9926bb14441abb553dd154477a59f636fe3cfeb03408b025649a1ac4b7
|
||||
45
tests/ci.fmf
45
tests/ci.fmf
@ -1,45 +0,0 @@
|
||||
summary: Basic smoke test
|
||||
provision:
|
||||
hardware:
|
||||
disk:
|
||||
- size: ">= 20 GiB"
|
||||
memory: ">= 5120 MiB"
|
||||
prepare:
|
||||
how: install
|
||||
package:
|
||||
- aspnetcore-runtime-10.0
|
||||
- bash-completion
|
||||
- bc
|
||||
- binutils
|
||||
- dotnet-runtime-10.0
|
||||
- dotnet-sdk-10.0
|
||||
- expect
|
||||
- file
|
||||
- findutils
|
||||
- gcc-c++
|
||||
- git
|
||||
- jq
|
||||
- libstdc++-devel
|
||||
- lldb
|
||||
- npm
|
||||
- postgresql-odbc
|
||||
- postgresql-server
|
||||
- procps-ng
|
||||
- python3
|
||||
- strace
|
||||
- util-linux
|
||||
- wget
|
||||
- which
|
||||
- zlib-devel
|
||||
execute:
|
||||
script:
|
||||
- dotnet --info
|
||||
- wget --no-verbose https://github.com/redhat-developer/dotnet-bunny/releases/latest/download/turkey.tar.gz
|
||||
- tar xf turkey.tar.gz
|
||||
- dotnet turkey/Turkey.dll --version
|
||||
- git clone "https://github.com/redhat-developer/dotnet-regular-tests.git"
|
||||
- dotnet turkey/Turkey.dll -l="$TMT_TEST_DATA" dotnet-regular-tests --timeout=1200
|
||||
- dnf remove -yq 'dotnet*'
|
||||
- set -x; if command -v dotnet ; then exit 1; fi
|
||||
- set -x; if [ -d /usr/lib64/dotnet ]; then exit 1; fi
|
||||
- set -x; if man dotnet; then exit 1; fi
|
||||
327
update-release
327
update-release
@ -1,327 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
IFS=$'\n\t'
|
||||
|
||||
# Notes: this only works with 1xx sdks, the versions shipped in Fedora/RHEL/CentOS Stream.
|
||||
|
||||
print_usage() {
|
||||
echo " Usage:"
|
||||
echo " ./update-release [VERSION] [--bootstrap] [--bug bug-id] [--tarball tarball-name] [--release-json release-json] [--larger-rpm-release]"
|
||||
echo ""
|
||||
echo "VERSION can be:"
|
||||
echo " - latest-release: latest release for this major.minor version of .NET (default unless --release-json and --tarball are used)"
|
||||
echo " - exact version (SDK or runtime, eg, 9.0.5 or 10.0.124)"
|
||||
echo " - omitted if --release-json and --tarball are used (uses local mode)"
|
||||
echo " - latest-commit: the latest commit for this major.minor version of .NET"
|
||||
echo ""
|
||||
echo "If not specified, 'latest-release' is the default."
|
||||
echo ""
|
||||
echo "When done, it creates the following files:"
|
||||
echo " - release.json"
|
||||
echo " - git-commit-message: commit message to use with the git commit for the update"
|
||||
echo ""
|
||||
echo ""
|
||||
echo "Options:"
|
||||
echo " --bootstrap Build binary bootstrap artifacts for this release."
|
||||
echo " --bug bug-id Add the named bug/issue identifier to the changelog and commit message."
|
||||
echo " --tarball tarball-name Use the supplied tarball. Use with --release-json."
|
||||
echo " --release-json release-json Use the supplied release.json. Use with --tarball."
|
||||
echo " --larger-rpm-release Set the release to 2."
|
||||
echo ""
|
||||
}
|
||||
|
||||
download_release_json() {
|
||||
version=$1
|
||||
if [[ "$version" =~ ^[0-9]+\.[0-9]+$ ]]; then
|
||||
# major.minor format. intentionally filter to major.minor.1xx.
|
||||
cat > query <<'EOF'
|
||||
[ .[] | select(.name | test("\\.NET .*\($v)(\\.1\\d{2}| (Preview|RC) \\d+)")) ]
|
||||
| first
|
||||
| { tag_name: .tag_name,
|
||||
tarball: .tarball_url,
|
||||
signature: .assets[].browser_download_url | select(. | endswith("tar.gz.sig")),
|
||||
release_manifest: .assets[] | select(.name == "release.json") | .browser_download_url }
|
||||
EOF
|
||||
elif [[ "$version" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
||||
# major.minor.patch. Might be the SDK version or Runtime version
|
||||
cat > query <<'EOF'
|
||||
[ .[] | select(.name | test("\\.NET .*\($v)")) ]
|
||||
| first
|
||||
| { tag_name: .tag_name,
|
||||
tarball: .tarball_url,
|
||||
signature: .assets[].browser_download_url | select(. | endswith("tar.gz.sig")),
|
||||
release_manifest: .assets[] | select(.name == "release.json") | .browser_download_url }
|
||||
EOF
|
||||
else
|
||||
echo "error: unable to parse $version"
|
||||
exit 1
|
||||
fi
|
||||
curl https://api.github.com/repos/dotnet/dotnet/releases \
|
||||
| jq --arg v "$version" --from-file query > release.metadata.github
|
||||
curl -L "$(jq -r .release_manifest release.metadata.github)" -o release.json
|
||||
}
|
||||
|
||||
assert_file_exists() {
|
||||
file=$1
|
||||
if [[ ! -f "${file}" ]]; then
|
||||
echo "error: ${file} not found"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
user_provided_tarball_name=""
|
||||
|
||||
rpm_release=1
|
||||
positional_args=()
|
||||
bug_ids=()
|
||||
bootstrap=0
|
||||
while [[ "$#" -gt 0 ]]; do
|
||||
arg="$1"
|
||||
case "${arg}" in
|
||||
--bootstrap)
|
||||
bootstrap=1
|
||||
shift;
|
||||
;;
|
||||
--bug)
|
||||
bug_ids+=("$2")
|
||||
shift;
|
||||
shift;
|
||||
;;
|
||||
-h|--help)
|
||||
print_usage
|
||||
exit 0
|
||||
;;
|
||||
--release-json)
|
||||
release_json="$2"
|
||||
assert_file_exists "${release_json}"
|
||||
shift;
|
||||
shift;
|
||||
;;
|
||||
--tarball)
|
||||
user_provided_tarball_name="$2"
|
||||
assert_file_exists "${user_provided_tarball_name}"
|
||||
shift;
|
||||
shift;
|
||||
;;
|
||||
--larger-rpm-release)
|
||||
rpm_release="2"
|
||||
shift;
|
||||
;;
|
||||
*)
|
||||
positional_args+=("$1")
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
set -x
|
||||
|
||||
spec_files=( ./*.spec )
|
||||
spec_file="${spec_files[0]}"
|
||||
assert_file_exists "$spec_file"
|
||||
|
||||
dotnet_major_minor_version=$spec_file
|
||||
dotnet_major_minor_version=${dotnet_major_minor_version#./dotnet}
|
||||
dotnet_major_minor_version=${dotnet_major_minor_version%.spec}
|
||||
if ! [[ "$dotnet_major_minor_version" =~ ^[0-9]+\.[0-9]+$ ]]; then
|
||||
echo "error: Unable to guess the current .NET major.minor version. Expected to get a two-digit .NET version, but got $dotnet_major_minor_version";
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Updating .NET $dotnet_major_minor_version"
|
||||
|
||||
version=${positional_args[0]:-}
|
||||
sdk_version=""
|
||||
created_release_json=0
|
||||
|
||||
if [[ ${version} == "" ]]; then
|
||||
if [[ -n "${release_json:-}" ]] || [[ -n "${user_provided_tarball_name:-}" ]]; then
|
||||
if [[ -n "${release_json:-}" ]] && [[ -n "${user_provided_tarball_name:-}" ]]; then
|
||||
version=local
|
||||
else
|
||||
echo "error: please provide both --release-json and --tarball for local-only mode"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
version=latest-release
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ ${version} == latest-release ]]; then
|
||||
if [[ -n "${release_json:-}" ]]; then
|
||||
echo "error: don't know how to combine upstream latest release's release.json with the locally supplied one"
|
||||
exit 1
|
||||
fi
|
||||
download_release_json "${dotnet_major_minor_version}"
|
||||
elif [[ "$version" =~ ^[0-9]+\.[0-9]+\.[0-9]+ ]]; then # matches x.y.z (and x.y.z-preview.N, etc.)
|
||||
if [[ -n "${release_json:-}" ]] && [[ -n "${user_provided_tarball_name:-}" ]] ; then
|
||||
echo "error: don't know how to combine explicit upstream version with release.json and tarball"
|
||||
exit 1
|
||||
fi
|
||||
download_release_json "${version}"
|
||||
elif [[ ${version} == latest-commit ]]; then
|
||||
branch=release/${dotnet_major_minor_version}.1xx
|
||||
if [[ ${dotnet_major_minor_version} == 11.0 ]]; then
|
||||
branch=main
|
||||
fi
|
||||
|
||||
cat > query <<EOF
|
||||
[ .[] | select(.name == "$branch") ]
|
||||
| first
|
||||
EOF
|
||||
curl https://api.github.com/repos/dotnet/dotnet/branches \
|
||||
| jq --from-file query > release.metadata.github
|
||||
commit=$(jq -r .commit.sha release.metadata.github)
|
||||
jq >release.json <<EOF
|
||||
{
|
||||
"release": "$dotnet_major_minor_version",
|
||||
"channel": "$dotnet_major_minor_version",
|
||||
"tag": "$commit",
|
||||
"sdkVersion": "$dotnet_major_minor_version",
|
||||
"runtimeVersion": "$dotnet_major_minor_version",
|
||||
"aspNetCoreVersion": "$dotnet_major_minor_version",
|
||||
"sourceRepository": "https://github.com/dotnet/dotnet",
|
||||
"sourceVersion": "$commit"
|
||||
}
|
||||
EOF
|
||||
cat release.json
|
||||
created_release_json=1
|
||||
elif [[ "${version}" == local ]]; then
|
||||
cp -a "${release_json}" release.json
|
||||
else
|
||||
echo "error: don't know what to do"
|
||||
echo ""
|
||||
print_usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cat release.json
|
||||
|
||||
aspnetcore_runtime_version=$(jq -r .aspNetCoreVersion release.json)
|
||||
runtime_version=$(jq -r .runtimeVersion release.json)
|
||||
sdk_version=$(jq -r .sdkVersion release.json)
|
||||
tag=$(jq -r .tag release.json)
|
||||
tag_without_v=${tag#v}
|
||||
|
||||
echo "Updating .NET $dotnet_major_minor_version to SDK ${sdk_version} and Runtime ${runtime_version}"
|
||||
|
||||
if [[ $bootstrap == 0 ]]; then
|
||||
sed -i -E "s|^%bcond_with.*bootstrap$|%bcond_with bootstrap|" "$spec_file"
|
||||
else
|
||||
sed -i -E "s|^%bcond_with.*bootstrap$|%bcond_without bootstrap|" "$spec_file"
|
||||
fi
|
||||
|
||||
sed -i -E "s|^%global upstream_tag .*$|%global upstream_tag ${tag}|" "$spec_file"
|
||||
|
||||
if [[ "$dotnet_major_minor_version" == "8.0" ]]; then
|
||||
sed -i -E "s|^%global host_version .*$|%global host_version ${runtime_version}|" "$spec_file"
|
||||
# other major versions set/define host_version as a variable based on runtime_version.
|
||||
fi
|
||||
sed -i -E "s|^%global runtime_version .*$|%global runtime_version ${runtime_version}|" "$spec_file"
|
||||
sed -i -E "s|^%global aspnetcore_runtime_version .*$|%global aspnetcore_runtime_version ${aspnetcore_runtime_version}|" "$spec_file"
|
||||
sed -i -E "s|^%global sdk_version .*$|%global sdk_version ${sdk_version}|" "$spec_file"
|
||||
|
||||
if [[ $runtime_version = *preview* ]] || [[ $runtime_version = *rc* ]]; then
|
||||
# For Preview/RC releases, convert x.y.z-preview.a.b to x.y.z~preview.a.b (replace - with ~)
|
||||
# https://docs.fedoraproject.org/en-US/packaging-guidelines/Versioning/#_handling_non_sorting_versions_with_tilde_dot_and_caret
|
||||
runtime_rpm_version=${runtime_version/-/\~}
|
||||
aspnetcore_runtime_rpm_version=${aspnetcore_runtime_version/-/\~}
|
||||
sdk_rpm_version=${sdk_version/-/\~}
|
||||
sed -i -E "s|^(%global runtime_rpm_version) .*$|\1 ${runtime_rpm_version}|" "$spec_file"
|
||||
sed -i -E "s|^(%global aspnetcore_runtime_rpm_version) .*$|\1 ${aspnetcore_runtime_rpm_version}|" "$spec_file"
|
||||
sed -i -E "s|^(%global sdk_rpm_version) .*$|\1 ${sdk_rpm_version}|" "$spec_file"
|
||||
else
|
||||
# For GA releases replace rpm versions with rpm macros for the actual version
|
||||
sed -i -E "s|^(%global runtime_rpm_version) .*$|\1 %{runtime_version}|" "$spec_file"
|
||||
sed -i -E "s|^(%global aspnetcore_runtime_rpm_version) .*$|\1 %{aspnetcore_runtime_version}|" "$spec_file"
|
||||
sed -i -E "s|^(%global sdk_rpm_version) .*$|\1 %{sdk_version}|" "$spec_file"
|
||||
fi
|
||||
|
||||
if [[ -f "dotnet-${tag_without_v}.tar.gz" ]]; then
|
||||
echo "dotnet-${tag_without_v}.tar.gz already exists, not rebuilding tarball"
|
||||
elif [[ -n ${user_provided_tarball_name} ]]; then
|
||||
cp -a "${user_provided_tarball_name}" "dotnet-${tag_without_v}.tar.gz"
|
||||
# signature file can be located anywhere under the directory tree, so find it.
|
||||
signature_name=$(basename "${user_provided_tarball_name}.sig")
|
||||
user_tarball_dir=$(dirname "${user_provided_tarball_name}" )
|
||||
# intentionally unquoted, since it can be blank
|
||||
# shellcheck disable=SC2116,SC2086
|
||||
signature_path=$(find $user_tarball_dir -iname "${signature_name}")
|
||||
if [[ "${signature_path}" == "" ]]; then
|
||||
echo "error: unable to find signature file for ${user_provided_tarball_name}"
|
||||
exit 1
|
||||
fi
|
||||
cp -a "${signature_path}" "dotnet-${tag_without_v}.tar.gz.sig"
|
||||
else # Download the original/pristine bits from upstream
|
||||
if [[ $created_release_json == 0 ]]; then
|
||||
# If we didn't create the release.json, then delete it so spectool -g can download a fresh copy
|
||||
rm -f release.json
|
||||
fi
|
||||
spectool -g "$spec_file"
|
||||
fi
|
||||
|
||||
# TODO add optional gpg signature verification
|
||||
|
||||
if [[ $bootstrap == 1 ]]; then
|
||||
if [[ $dotnet_major_minor_version == 8.0 ]]; then
|
||||
# TODO: create generic bootstrap support for 8.0
|
||||
echo "--bootstrap not implemented for .NET 8.0"
|
||||
exit 1
|
||||
elif [[ $dotnet_major_minor_version == 9.0 ]]; then
|
||||
# For .NET 9, we bootstrap x64 and aarch64 using Microsoft binaries, and ppc64le and s390x using custom binaries
|
||||
./build-dotnet-bootstrap-tarball "$tag"
|
||||
tar xf "dotnet-$tag-x64-bootstrap.tar.gz" "dotnet-$tag-x64-bootstrap/global.json"
|
||||
bootstrap_sdk_version=$(jq -r .tools.dotnet "dotnet-$tag-x64-bootstrap/global.json")
|
||||
sed -i -E "s|^(%global bootstrap_sdk_version) .*$|\1 ${bootstrap_sdk_version}|" "$spec_file"
|
||||
spectool -g "$spec_file"
|
||||
|
||||
if [ -f re-build-all-bootstrap ]; then
|
||||
./re-build-all-bootstrap "${tag}"
|
||||
fi
|
||||
else
|
||||
# For .NET 10 and later, defer all bootstrapping to build-dotnet-bootstrap-tarball script
|
||||
tar xf "dotnet-${tag_without_v}.tar.gz" "dotnet-${tag_without_v}/global.json"
|
||||
bootstrap_sdk_version=$(jq -r .tools.dotnet "dotnet-${tag_without_v}/global.json")
|
||||
sed -i -E "s|^(%global bootstrap_sdk_version) .*$|\1 ${bootstrap_sdk_version}|" "$spec_file"
|
||||
|
||||
./build-dotnet-bootstrap-tarball "${tag_without_v}"
|
||||
|
||||
if [ -f dotnet-prebuilts*ppc64le*tar.gz ]; then
|
||||
file_name=$(ls -1 -t dotnet-prebuilts-*-ppc64le.tar.gz | head -1)
|
||||
bootstrap_sdk_version_ppc64le_s390x=$(basename "$file_name" | sed -E -e 's/dotnet-prebuilts-//' -e 's/-ppc64le.tar.gz//')
|
||||
|
||||
sed -E -i "s|^%global bootstrap_sdk_version_ppc64le_s390x .*$|%global bootstrap_sdk_version_ppc64le_s390x $bootstrap_sdk_version_ppc64le_s390x|" "$spec_file"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
comment="Update to .NET SDK ${sdk_version} and Runtime ${runtime_version}"
|
||||
commit_message="$comment
|
||||
"
|
||||
for bug_id in "${bug_ids[@]}"; do
|
||||
if [[ "$bug_id" =~ ^[[:digit:]]+$ ]]; then
|
||||
comment="$comment
|
||||
- Resolves: RHBZ#$bug_id"
|
||||
commit_message="$commit_message
|
||||
Resolves: RHBZ#$bug_id"
|
||||
else
|
||||
comment="$comment
|
||||
- Resolves: $bug_id"
|
||||
commit_message="$commit_message
|
||||
Resolves: $bug_id"
|
||||
fi
|
||||
done
|
||||
|
||||
echo "$commit_message" > git-commit-message
|
||||
|
||||
rpmdev-bumpspec --comment="$comment" "$spec_file"
|
||||
|
||||
# Reset release in 'Release' tag
|
||||
sed -i -E 's|^Release: [[:digit:]]+%|Release: '"$rpm_release"'%|' "$spec_file"
|
||||
# Reset Release in changelog comment
|
||||
# See https://stackoverflow.com/questions/18620153/find-matching-text-and-replace-next-line
|
||||
sed -i -E '/^%changelog$/!b;n;s/-[[:digit:]]+$/-'"$rpm_release"'/' "$spec_file"
|
||||
|
||||
echo "Done updating sources. Commit message in ./git-commit-message"
|
||||
Loading…
Reference in New Issue
Block a user