From 0231399243644ce4349f2b5a9f3da38bffab8aaa Mon Sep 17 00:00:00 2001 From: tigro Date: Thu, 7 Dec 2023 17:56:18 +0300 Subject: [PATCH] - Fix re-declarations of builtin functions with clang 10 - Add missing constructor (fix build) - Fix runtime_id --- ...ons-of-builtin-functions-with-clang-.patch | 25 +++++++++++ SOURCES/0002-Add-missing-constructor.patch | 41 +++++++++++++++++++ SPECS/dotnet3.0.spec | 22 ++++++---- 3 files changed, 79 insertions(+), 9 deletions(-) create mode 100644 SOURCES/0001-Fix-re-declarations-of-builtin-functions-with-clang-.patch create mode 100644 SOURCES/0002-Add-missing-constructor.patch diff --git a/SOURCES/0001-Fix-re-declarations-of-builtin-functions-with-clang-.patch b/SOURCES/0001-Fix-re-declarations-of-builtin-functions-with-clang-.patch new file mode 100644 index 0000000..38af9d6 --- /dev/null +++ b/SOURCES/0001-Fix-re-declarations-of-builtin-functions-with-clang-.patch @@ -0,0 +1,25 @@ +From eefbe5773c60aa0c99b4be7defa8e7ed27644ec6 Mon Sep 17 00:00:00 2001 +From: tigro +Date: Thu, 7 Dec 2023 11:05:45 +0300 +Subject: [PATCH] Fix re-declarations of builtin functions with clang 10 + +--- + .../src/pal/inc/pal.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/coreclr.259ce7d4619478cfefe7b0c0f6fa765f765f7e37/src/pal/inc/pal.h b/src/coreclr.259ce7d4619478cfefe7b0c0f6fa765f765f7e37/src/pal/inc/pal.h +index 08a35c8f6..43eb648a1 100644 +--- a/src/coreclr.259ce7d4619478cfefe7b0c0f6fa765f765f7e37/src/pal/inc/pal.h ++++ b/src/coreclr.259ce7d4619478cfefe7b0c0f6fa765f765f7e37/src/pal/inc/pal.h +@@ -145,7 +145,7 @@ typedef PVOID NATIVE_LIBRARY_HANDLE; + + /******************* Compiler-specific glue *******************************/ + #ifndef THROW_DECL +-#if defined(_MSC_VER) || defined(__llvm__) || !defined(__cplusplus) ++#if defined(_MSC_VER) || !defined(__cplusplus) + #define THROW_DECL + #else + #define THROW_DECL throw() +-- +2.43.0 + diff --git a/SOURCES/0002-Add-missing-constructor.patch b/SOURCES/0002-Add-missing-constructor.patch new file mode 100644 index 0000000..3dbada2 --- /dev/null +++ b/SOURCES/0002-Add-missing-constructor.patch @@ -0,0 +1,41 @@ +From 0e973089c73b64dcb0423958e4f900e43a47d5a6 Mon Sep 17 00:00:00 2001 +From: tigro +Date: Thu, 7 Dec 2023 12:54:55 +0300 +Subject: [PATCH 2/2] Add missing constructor + +--- + .../src/inc/slist.h | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/coreclr.259ce7d4619478cfefe7b0c0f6fa765f765f7e37/src/inc/slist.h b/src/coreclr.259ce7d4619478cfefe7b0c0f6fa765f765f7e37/src/inc/slist.h +index f05d763dc..abebe04d4 100644 +--- a/src/coreclr.259ce7d4619478cfefe7b0c0f6fa765f765f7e37/src/inc/slist.h ++++ b/src/coreclr.259ce7d4619478cfefe7b0c0f6fa765f765f7e37/src/inc/slist.h +@@ -160,13 +160,13 @@ public: + void Init() + { + LIMITED_METHOD_CONTRACT; +- m_pHead = &m_link; ++ m_pHead = PTR_SLink(&m_link); + // NOTE :: fHead variable is template argument + // the following code is a compiled in, only if the fHead flag + // is set to false, + if (!fHead) + { +- m_pTail = &m_link; ++ m_pTail = PTR_SLink(&m_link); + } + } + +@@ -274,7 +274,7 @@ public: + SLink *ret = SLink::FindAndRemove(m_pHead, GetLink(pObj), &prior); + + if (ret == m_pTail) +- m_pTail = prior; ++ m_pTail = PTR_SLink(prior); + + return GetObject(ret); + } +-- +2.43.0 + diff --git a/SPECS/dotnet3.0.spec b/SPECS/dotnet3.0.spec index 106afa0..45d33f3 100644 --- a/SPECS/dotnet3.0.spec +++ b/SPECS/dotnet3.0.spec @@ -40,19 +40,11 @@ %global use_bundled_libunwind 1 %endif -%if 0%{?fedora} -%global runtime_id fedora.%{fedora}-x64 -%else -%if 0%{?centos} -%global runtime_id centos.%{centos}-x64 -%else %global runtime_id rhel.%{rhel}-x64 -%endif -%endif Name: dotnet3.0 Version: %{sdk_rpm_version} -Release: 1%{?dist} +Release: 1%{?dist}.inferit Summary: .NET Core CLI tools and runtime License: MIT and ASL 2.0 and BSD URL: https://github.com/dotnet/ @@ -71,6 +63,10 @@ Patch300: core-setup-do-not-strip.patch Patch500: cli-telemetry-optout.patch +# Fix build +Patch700: 0001-Fix-re-declarations-of-builtin-functions-with-clang-.patch +Patch701: 0002-Add-missing-constructor.patch + ExclusiveArch: x86_64 BuildRequires: clang @@ -309,6 +305,9 @@ pushd src/cli.* %patch500 -p1 popd +%patch700 -p1 +%patch701 -p1 + # If CLR_CMAKE_USE_SYSTEM_LIBUNWIND=TRUE is misisng, add it back grep CLR_CMAKE_USE_SYSTEM_LIBUNWIND repos/coreclr.proj || \ sed -i 's|\$(BuildArguments) |$(BuildArguments) cmakeargs -DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=TRUE|' repos/coreclr.proj @@ -446,6 +445,11 @@ echo "Testing build results for debug symbols..." %dir %{_libdir}/dotnet/packs %changelog +* Thu Dec 7 2023 Arkady L. Shane - 3.0.103-1.inferit +- Fix re-declarations of builtin functions with clang 10 +- Add missing constructor (fix build) +- Fix runtime_id + * Tue Jul 25 2023 MSVSphere Packaging Team - 3.0.103-1 - Rebuilt for MSVSphere 8.8