Compare commits

...

No commits in common. "imports/c8-beta/dotnet3.1-3.1.112-2.el8" and "c8" have entirely different histories.

9 changed files with 189 additions and 485 deletions

View File

@ -1 +1 @@
3b7c4b8f2ddc39468c490ce35bf1dc3dc60934ea SOURCES/dotnet-v3.1.112-SDK.tar.gz
12090bf3fa9d16f96a49119818246d432ec5e1e1 SOURCES/dotnet-v3.1.426-SDK.tar.gz

2
.gitignore vendored
View File

@ -1 +1 @@
SOURCES/dotnet-v3.1.112-SDK.tar.gz
SOURCES/dotnet-v3.1.426-SDK.tar.gz

View File

@ -1,23 +0,0 @@
diff --git a/src/settings.cmake b/src/settings.cmake
--- a/src/settings.cmake
+++ b/src/settings.cmake
@@ -218,6 +218,8 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Xlinker -Bsymbolic -Bsymbolic-functions")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--build-id=sha1")
+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -pie")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--build-id=sha1")
+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pie")
add_compile_options(-fstack-protector-strong)
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
add_compile_options(-fstack-protector)
--- a/src/corehost/cli/apphost/CMakeLists.txt
+++ b/src/corehost/cli/apphost/CMakeLists.txt
@@ -50,6 +50,8 @@
add_definitions(-DFEATURE_APPHOST=1)
+set_target_properties("apphost" PROPERTIES LINK_FLAGS -pie)
+
# Disable manifest generation into the file .exe on Windows
if(WIN32)
set_property(TARGET ${PROJECT_NAME} PROPERTY

View File

@ -0,0 +1,27 @@
From e900fff68af76d51a59ac085b35ace76939bc007 Mon Sep 17 00:00:00 2001
From: Omair Majid <omajid@redhat.com>
Date: Tue, 18 Jan 2022 21:45:52 -0500
Subject: [PATCH] Disable Werror
This is so late in the release cycle that fixing warnings is just not
really worth it. The general approach is to fix the issues in the
development branches and disable warnings in the older release branches.
---
src/settings.cmake | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/settings.cmake b/src/settings.cmake
index ff1e04f9..5cc9b3ef 100644
--- a/src/settings.cmake
+++ b/src/settings.cmake
@@ -201,7 +201,6 @@ else()
# compiling with -std=c++11.
# add_compile_options(-Weverything)
endif()
- add_compile_options(-Werror)
add_compile_options(-Wno-missing-field-initializers)
add_compile_options(-Wno-unused-function)
add_compile_options(-Wno-unused-local-typedef)
--
2.34.1

View File

@ -1,22 +0,0 @@
--- a/src/debug/createdump/CMakeLists.txt
+++ b/src/debug/createdump/CMakeLists.txt
@@ -38,6 +38,8 @@
add_dependencies(createdump pal_redefines_file)
+SET_TARGET_PROPERTIES(createdump PROPERTIES LINK_FLAGS -pie)
+
target_link_libraries(createdump
createdump_lib
# share the PAL/corguids in the dac module
--- a/src/corefx/System.Globalization.Native/CMakeLists.txt
+++ b/src/corefx/System.Globalization.Native/CMakeLists.txt
@@ -71,6 +71,8 @@
set_target_properties(System.Globalization.Native_Static PROPERTIES PREFIX "")
set_target_properties(System.Globalization.Native_Static PROPERTIES OUTPUT_NAME System.Globalization.Native)
+set_target_properties(System.Globalization.Native PROPERTIES LINK_FLAGS -pie)
+
if(NOT CLR_CMAKE_PLATFORM_DARWIN)
if (NOT CMAKE_SYSTEM_NAME STREQUAL FreeBSD AND NOT CMAKE_SYSTEM_NAME STREQUAL NetBSD)
target_link_libraries(System.Globalization.Native

View File

@ -1,402 +0,0 @@
From 29e17d8d2ccbca07c423e3089a6d5ae8a1c9cb6e Mon Sep 17 00:00:00 2001
From: Yichao Yu <yyc1992@gmail.com>
Date: Tue, 31 Mar 2020 00:43:32 -0400
Subject: [PATCH] Fix compilation with -fno-common.
Making all other archs consistent with IA64 which should not have this problem.
Also move the FIXME to the correct place.
Also add some minimum comments about this...
---
src/aarch64/Ginit.c | 15 +++++++--------
src/arm/Ginit.c | 15 +++++++--------
src/coredump/_UPT_get_dyn_info_list_addr.c | 5 +++++
src/hppa/Ginit.c | 15 +++++++--------
src/ia64/Ginit.c | 1 +
src/mi/Gfind_dynamic_proc_info.c | 1 +
src/mips/Ginit.c | 15 +++++++--------
src/ppc32/Ginit.c | 11 +++++++----
src/ppc64/Ginit.c | 11 +++++++----
src/ptrace/_UPT_get_dyn_info_list_addr.c | 5 +++++
src/s390x/Ginit.c | 15 +++++++--------
src/sh/Ginit.c | 15 +++++++--------
src/tilegx/Ginit.c | 15 +++++++--------
src/x86/Ginit.c | 15 +++++++--------
src/x86_64/Ginit.c | 15 +++++++--------
15 files changed, 89 insertions(+), 80 deletions(-)
diff --git a/src/pal/src/libunwind/src/aarch64/Ginit.c b/src/pal/src/libunwind/src/aarch64/Ginit.c
index dec235c82..35389762f 100644
--- a/src/pal/src/libunwind/src/aarch64/Ginit.c
+++ b/src/pal/src/libunwind/src/aarch64/Ginit.c
@@ -61,13 +61,6 @@ tdep_uc_addr (unw_tdep_context_t *uc, int reg)
# endif /* UNW_LOCAL_ONLY */
-HIDDEN unw_dyn_info_list_t _U_dyn_info_list;
-
-/* XXX fix me: there is currently no way to locate the dyn-info list
- by a remote unwinder. On ia64, this is done via a special
- unwind-table entry. Perhaps something similar can be done with
- DWARF2 unwind info. */
-
static void
put_unwind_info (unw_addr_space_t as, unw_proc_info_t *proc_info, void *arg)
{
@@ -78,7 +71,13 @@ static int
get_dyn_info_list_addr (unw_addr_space_t as, unw_word_t *dyn_info_list_addr,
void *arg)
{
- *dyn_info_list_addr = (unw_word_t) &_U_dyn_info_list;
+#ifndef UNW_LOCAL_ONLY
+# pragma weak _U_dyn_info_list_addr
+ if (!_U_dyn_info_list_addr)
+ return -UNW_ENOINFO;
+#endif
+ // Access the `_U_dyn_info_list` from `LOCAL_ONLY` library, i.e. libunwind.so.
+ *dyn_info_list_addr = _U_dyn_info_list_addr ();
return 0;
}
diff --git a/src/pal/src/libunwind/src/arm/Ginit.c b/ssrc/pal/src/libunwind/src/arm/Ginit.c
index 2720d063a..0bac0d72d 100644
--- a/src/pal/src/libunwind/src/arm/Ginit.c
+++ b/src/pal/src/libunwind/src/arm/Ginit.c
@@ -57,18 +57,17 @@ tdep_uc_addr (unw_tdep_context_t *uc, int reg)
# endif /* UNW_LOCAL_ONLY */
-HIDDEN unw_dyn_info_list_t _U_dyn_info_list;
-
-/* XXX fix me: there is currently no way to locate the dyn-info list
- by a remote unwinder. On ia64, this is done via a special
- unwind-table entry. Perhaps something similar can be done with
- DWARF2 unwind info. */
-
static int
get_dyn_info_list_addr (unw_addr_space_t as, unw_word_t *dyn_info_list_addr,
void *arg)
{
- *dyn_info_list_addr = (unw_word_t) &_U_dyn_info_list;
+#ifndef UNW_LOCAL_ONLY
+# pragma weak _U_dyn_info_list_addr
+ if (!_U_dyn_info_list_addr)
+ return -UNW_ENOINFO;
+#endif
+ // Access the `_U_dyn_info_list` from `LOCAL_ONLY` library, i.e. libunwind.so.
+ *dyn_info_list_addr = _U_dyn_info_list_addr ();
return 0;
}
diff --git a/src/pal/src/libunwind/src/coredump/_UPT_get_dyn_info_list_addr.c b/src/pal/src/libunwind/src/coredump/_UPT_get_dyn_info_list_addr.c
index 0d1190556..739ed0569 100644
--- a/src/pal/src/libunwind/src/coredump/_UPT_get_dyn_info_list_addr.c
+++ b/src/pal/src/libunwind/src/coredump/_UPT_get_dyn_info_list_addr.c
@@ -74,6 +74,11 @@ get_list_addr (unw_addr_space_t as, unw_word_t *dil_addr, void *arg,
#else
+/* XXX fix me: there is currently no way to locate the dyn-info list
+ by a remote unwinder. On ia64, this is done via a special
+ unwind-table entry. Perhaps something similar can be done with
+ DWARF2 unwind info. */
+
static inline int
get_list_addr (unw_addr_space_t as, unw_word_t *dil_addr, void *arg,
int *countp)
diff --git a/src/pal/src/libunwind/src/hppa/Ginit.c b/src/pal/src/libunwind/src/hppa/Ginit.c
index 461e4b93d..265455a68 100644
--- a/src/pal/src/libunwind/src/hppa/Ginit.c
+++ b/src/pal/src/libunwind/src/hppa/Ginit.c
@@ -64,13 +64,6 @@ _Uhppa_uc_addr (ucontext_t *uc, int reg)
# endif /* UNW_LOCAL_ONLY */
-HIDDEN unw_dyn_info_list_t _U_dyn_info_list;
-
-/* XXX fix me: there is currently no way to locate the dyn-info list
- by a remote unwinder. On ia64, this is done via a special
- unwind-table entry. Perhaps something similar can be done with
- DWARF2 unwind info. */
-
static void
put_unwind_info (unw_addr_space_t as, unw_proc_info_t *proc_info, void *arg)
{
@@ -81,7 +74,13 @@ static int
get_dyn_info_list_addr (unw_addr_space_t as, unw_word_t *dyn_info_list_addr,
void *arg)
{
- *dyn_info_list_addr = (unw_word_t) &_U_dyn_info_list;
+#ifndef UNW_LOCAL_ONLY
+# pragma weak _U_dyn_info_list_addr
+ if (!_U_dyn_info_list_addr)
+ return -UNW_ENOINFO;
+#endif
+ // Access the `_U_dyn_info_list` from `LOCAL_ONLY` library, i.e. libunwind.so.
+ *dyn_info_list_addr = _U_dyn_info_list_addr ();
return 0;
}
diff --git a/src/pal/src/libunwind/src/ia64/Ginit.c b/src/pal/src/libunwind/src/ia64/Ginit.c
index b09a2ad57..8601bb3ca 100644
--- a/src/pal/src/libunwind/src/ia64/Ginit.c
+++ b/src/pal/src/libunwind/src/ia64/Ginit.c
@@ -68,6 +68,7 @@ get_dyn_info_list_addr (unw_addr_space_t as, unw_word_t *dyn_info_list_addr,
if (!_U_dyn_info_list_addr)
return -UNW_ENOINFO;
#endif
+ // Access the `_U_dyn_info_list` from `LOCAL_ONLY` library, i.e. libunwind.so.
*dyn_info_list_addr = _U_dyn_info_list_addr ();
return 0;
}
diff --git a/src/pal/src/libunwind/src/mi/Gfind_dynamic_proc_info.c b/src/pal/src/libunwind/src/mi/Gfind_dynamic_proc_info.c
index 98d350128..2e7c62e5e 100644
--- a/src/pal/src/libunwind/src/mi/Gfind_dynamic_proc_info.c
+++ b/src/pal/src/libunwind/src/mi/Gfind_dynamic_proc_info.c
@@ -49,6 +49,7 @@ local_find_proc_info (unw_addr_space_t as, unw_word_t ip, unw_proc_info_t *pi,
return -UNW_ENOINFO;
#endif
+ // Access the `_U_dyn_info_list` from `LOCAL_ONLY` library, i.e. libunwind.so.
list = (unw_dyn_info_list_t *) (uintptr_t) _U_dyn_info_list_addr ();
for (di = list->first; di; di = di->next)
if (ip >= di->start_ip && ip < di->end_ip)
diff --git a/src/pal/src/libunwind/src/mips/Ginit.c b/src/pal/src/libunwind/src/mips/Ginit.c
index 3df170c75..bf7a8f5a8 100644
--- a/src/pal/src/libunwind/src/mips/Ginit.c
+++ b/src/pal/src/libunwind/src/mips/Ginit.c
@@ -69,13 +69,6 @@ tdep_uc_addr (ucontext_t *uc, int reg)
# endif /* UNW_LOCAL_ONLY */
-HIDDEN unw_dyn_info_list_t _U_dyn_info_list;
-
-/* XXX fix me: there is currently no way to locate the dyn-info list
- by a remote unwinder. On ia64, this is done via a special
- unwind-table entry. Perhaps something similar can be done with
- DWARF2 unwind info. */
-
static void
put_unwind_info (unw_addr_space_t as, unw_proc_info_t *proc_info, void *arg)
{
@@ -86,7 +79,13 @@ static int
get_dyn_info_list_addr (unw_addr_space_t as, unw_word_t *dyn_info_list_addr,
void *arg)
{
- *dyn_info_list_addr = (unw_word_t) (intptr_t) &_U_dyn_info_list;
+#ifndef UNW_LOCAL_ONLY
+# pragma weak _U_dyn_info_list_addr
+ if (!_U_dyn_info_list_addr)
+ return -UNW_ENOINFO;
+#endif
+ // Access the `_U_dyn_info_list` from `LOCAL_ONLY` library, i.e. libunwind.so.
+ *dyn_info_list_addr = _U_dyn_info_list_addr ();
return 0;
}
diff --git a/src/pal/src/libunwind/src/ppc32/Ginit.c b/src/pal/src/libunwind/src/ppc32/Ginit.c
index ba302448a..7b4545580 100644
--- a/src/pal/src/libunwind/src/ppc32/Ginit.c
+++ b/src/pal/src/libunwind/src/ppc32/Ginit.c
@@ -91,9 +91,6 @@ tdep_uc_addr (ucontext_t *uc, int reg)
# endif /* UNW_LOCAL_ONLY */
-HIDDEN unw_dyn_info_list_t _U_dyn_info_list;
-
-
static void
put_unwind_info (unw_addr_space_t as, unw_proc_info_t *proc_info, void *arg)
{
@@ -104,7 +101,13 @@ static int
get_dyn_info_list_addr (unw_addr_space_t as, unw_word_t *dyn_info_list_addr,
void *arg)
{
- *dyn_info_list_addr = (unw_word_t) &_U_dyn_info_list;
+#ifndef UNW_LOCAL_ONLY
+# pragma weak _U_dyn_info_list_addr
+ if (!_U_dyn_info_list_addr)
+ return -UNW_ENOINFO;
+#endif
+ // Access the `_U_dyn_info_list` from `LOCAL_ONLY` library, i.e. libunwind.so.
+ *dyn_info_list_addr = _U_dyn_info_list_addr ();
return 0;
}
diff --git a/src/pal/src/libunwind/src/ppc64/Ginit.c b/src/pal/src/libunwind/src/ppc64/Ginit.c
index 4c88cd6e7..7bfb395a7 100644
--- a/src/pal/src/libunwind/src/ppc64/Ginit.c
+++ b/src/pal/src/libunwind/src/ppc64/Ginit.c
@@ -95,9 +95,6 @@ tdep_uc_addr (ucontext_t *uc, int reg)
# endif /* UNW_LOCAL_ONLY */
-HIDDEN unw_dyn_info_list_t _U_dyn_info_list;
-
-
static void
put_unwind_info (unw_addr_space_t as, unw_proc_info_t *proc_info, void *arg)
{
@@ -108,7 +105,13 @@ static int
get_dyn_info_list_addr (unw_addr_space_t as, unw_word_t *dyn_info_list_addr,
void *arg)
{
- *dyn_info_list_addr = (unw_word_t) &_U_dyn_info_list;
+#ifndef UNW_LOCAL_ONLY
+# pragma weak _U_dyn_info_list_addr
+ if (!_U_dyn_info_list_addr)
+ return -UNW_ENOINFO;
+#endif
+ // Access the `_U_dyn_info_list` from `LOCAL_ONLY` library, i.e. libunwind.so.
+ *dyn_info_list_addr = _U_dyn_info_list_addr ();
return 0;
}
diff --git a/src/pal/src/libunwind/src/ptrace/_UPT_get_dyn_info_list_addr.c b/src/pal/src/libunwind/src/ptrace/_UPT_get_dyn_info_list_addr.c
index cc5ed0441..16671d453 100644
--- a/src/pal/src/libunwind/src/ptrace/_UPT_get_dyn_info_list_addr.c
+++ b/src/pal/src/libunwind/src/ptrace/_UPT_get_dyn_info_list_addr.c
@@ -71,6 +71,11 @@ get_list_addr (unw_addr_space_t as, unw_word_t *dil_addr, void *arg,
#else
+/* XXX fix me: there is currently no way to locate the dyn-info list
+ by a remote unwinder. On ia64, this is done via a special
+ unwind-table entry. Perhaps something similar can be done with
+ DWARF2 unwind info. */
+
static inline int
get_list_addr (unw_addr_space_t as, unw_word_t *dil_addr, void *arg,
int *countp)
diff --git a/src/pal/src/libunwind/src/sh/Ginit.c b/src/pal/src/libunwind/src/sh/Ginit.c
index 52988a721..9fe96d2bd 100644
--- a/src/pal/src/libunwind/src/sh/Ginit.c
+++ b/src/pal/src/libunwind/src/sh/Ginit.c
@@ -58,13 +58,6 @@ tdep_uc_addr (ucontext_t *uc, int reg)
# endif /* UNW_LOCAL_ONLY */
-HIDDEN unw_dyn_info_list_t _U_dyn_info_list;
-
-/* XXX fix me: there is currently no way to locate the dyn-info list
- by a remote unwinder. On ia64, this is done via a special
- unwind-table entry. Perhaps something similar can be done with
- DWARF2 unwind info. */
-
static void
put_unwind_info (unw_addr_space_t as, unw_proc_info_t *proc_info, void *arg)
{
@@ -75,7 +68,13 @@ static int
get_dyn_info_list_addr (unw_addr_space_t as, unw_word_t *dyn_info_list_addr,
void *arg)
{
- *dyn_info_list_addr = (unw_word_t) &_U_dyn_info_list;
+#ifndef UNW_LOCAL_ONLY
+# pragma weak _U_dyn_info_list_addr
+ if (!_U_dyn_info_list_addr)
+ return -UNW_ENOINFO;
+#endif
+ // Access the `_U_dyn_info_list` from `LOCAL_ONLY` library, i.e. libunwind.so.
+ *dyn_info_list_addr = _U_dyn_info_list_addr ();
return 0;
}
diff --git a/src/pal/src/libunwind/src/tilegx/Ginit.c b/src/pal/src/libunwind/src/tilegx/Ginit.c
index 7564a558b..925e64132 100644
--- a/src/pal/src/libunwind/src/tilegx/Ginit.c
+++ b/src/pal/src/libunwind/src/tilegx/Ginit.c
@@ -64,13 +64,6 @@ tdep_uc_addr (ucontext_t *uc, int reg)
# endif /* UNW_LOCAL_ONLY */
-HIDDEN unw_dyn_info_list_t _U_dyn_info_list;
-
-/* XXX fix me: there is currently no way to locate the dyn-info list
- by a remote unwinder. On ia64, this is done via a special
- unwind-table entry. Perhaps something similar can be done with
- DWARF2 unwind info. */
-
static void
put_unwind_info (unw_addr_space_t as, unw_proc_info_t *proc_info, void *arg)
{
@@ -81,7 +74,13 @@ static int
get_dyn_info_list_addr (unw_addr_space_t as, unw_word_t *dyn_info_list_addr,
void *arg)
{
- *dyn_info_list_addr = (unw_word_t) (intptr_t) &_U_dyn_info_list;
+#ifndef UNW_LOCAL_ONLY
+# pragma weak _U_dyn_info_list_addr
+ if (!_U_dyn_info_list_addr)
+ return -UNW_ENOINFO;
+#endif
+ // Access the `_U_dyn_info_list` from `LOCAL_ONLY` library, i.e. libunwind.so.
+ *dyn_info_list_addr = _U_dyn_info_list_addr ();
return 0;
}
diff --git a/src/pal/src/libunwind/src/x86/Ginit.c b/src/pal/src/libunwind/src/x86/Ginit.c
index f6b8dc27d..3cec74a21 100644
--- a/src/pal/src/libunwind/src/x86/Ginit.c
+++ b/src/pal/src/libunwind/src/x86/Ginit.c
@@ -54,13 +54,6 @@ tdep_uc_addr (ucontext_t *uc, int reg)
# endif /* UNW_LOCAL_ONLY */
-HIDDEN unw_dyn_info_list_t _U_dyn_info_list;
-
-/* XXX fix me: there is currently no way to locate the dyn-info list
- by a remote unwinder. On ia64, this is done via a special
- unwind-table entry. Perhaps something similar can be done with
- DWARF2 unwind info. */
-
static void
put_unwind_info (unw_addr_space_t as, unw_proc_info_t *proc_info, void *arg)
{
@@ -71,7 +64,13 @@ static int
get_dyn_info_list_addr (unw_addr_space_t as, unw_word_t *dyn_info_list_addr,
void *arg)
{
- *dyn_info_list_addr = (unw_word_t) &_U_dyn_info_list;
+#ifndef UNW_LOCAL_ONLY
+# pragma weak _U_dyn_info_list_addr
+ if (!_U_dyn_info_list_addr)
+ return -UNW_ENOINFO;
+#endif
+ // Access the `_U_dyn_info_list` from `LOCAL_ONLY` library, i.e. libunwind.so.
+ *dyn_info_list_addr = _U_dyn_info_list_addr ();
return 0;
}
diff --git a/src/pal/src/libunwind/src/x86_64/Ginit.c b/src/pal/src/libunwind/src/x86_64/Ginit.c
index a865d3385..fd8d418b1 100644
--- a/src/pal/src/libunwind/src/x86_64/Ginit.c
+++ b/src/pal/src/libunwind/src/x86_64/Ginit.c
@@ -49,13 +49,6 @@ static struct unw_addr_space local_addr_space;
unw_addr_space_t unw_local_addr_space = &local_addr_space;
-HIDDEN unw_dyn_info_list_t _U_dyn_info_list;
-
-/* XXX fix me: there is currently no way to locate the dyn-info list
- by a remote unwinder. On ia64, this is done via a special
- unwind-table entry. Perhaps something similar can be done with
- DWARF2 unwind info. */
-
static void
put_unwind_info (unw_addr_space_t as, unw_proc_info_t *proc_info, void *arg)
{
@@ -66,7 +59,13 @@ static int
get_dyn_info_list_addr (unw_addr_space_t as, unw_word_t *dyn_info_list_addr,
void *arg)
{
- *dyn_info_list_addr = (unw_word_t) &_U_dyn_info_list;
+#ifndef UNW_LOCAL_ONLY
+# pragma weak _U_dyn_info_list_addr
+ if (!_U_dyn_info_list_addr)
+ return -UNW_ENOINFO;
+#endif
+ // Access the `_U_dyn_info_list` from `LOCAL_ONLY` library, i.e. libunwind.so.
+ *dyn_info_list_addr = _U_dyn_info_list_addr ();
return 0;
}

View File

@ -1,11 +0,0 @@
--- a/src/Native/Unix/System.Native/CMakeLists.txt
+++ b/src/Native/Unix/System.Native/CMakeLists.txt
@@ -48,6 +48,8 @@
set_target_properties(System.Native-Static PROPERTIES PREFIX "")
set_target_properties(System.Native-Static PROPERTIES OUTPUT_NAME System.Native CLEAN_DIRECT_OUTPUT 1)
+set_target_properties(System.Native PROPERTIES LINK_FLAGS -pie)
+
if (CMAKE_SYSTEM_NAME STREQUAL Linux AND NOT CLR_CMAKE_PLATFORM_ANDROID)
target_link_libraries(System.Native rt)
endif ()

View File

@ -0,0 +1,15 @@
diff --git a/Directory.Build.props b/Directory.Build.props
index f6a6f54a..8247c3ee 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -133,8 +133,8 @@
<AspNetRazorBuildServerLogDir>$(BaseOutputPath)aspnet-debug</AspNetRazorBuildServerLogDir>
<AspNetRazorBuildServerLogFile>$(AspNetRazorBuildServerLogDir)razor-build-server.log</AspNetRazorBuildServerLogFile>
<IlasmPath Condition="'$(OfflineBuild)' != 'true'">invalid: ILAsm is not expected to be needed in the online build</IlasmPath>
- <IlasmPath Condition="'$(OfflineBuild)' == 'true'">$(PrebuiltSourceBuiltPackagesPath)coreclr-tools/$(BuildArchitecture)/ilasm</IlasmPath>
- <IldasmPath Condition="'$(OfflineBuild)' != 'true'">$(ToolPackageExtractDir)coreclr-tools/$(BuildArchitecture)/ildasm</IldasmPath>
+ <IlasmPath Condition="'$(OfflineBuild)' == 'true'">$(PrebuiltSourceBuiltPackagesPath)coreclr-tools/ilasm</IlasmPath>
+ <IldasmPath Condition="'$(OfflineBuild)' != 'true'">$(ToolPackageExtractDir)coreclr-tools/ildasm</IldasmPath>
<IldasmPath Condition="'$(OfflineBuild)' == 'true'">invalid: ILDasm is not expected to be needed in the offline build</IldasmPath>
<!-- Dir where git info is generated during online builds. -->
<GitInfoOutputDir>$(BaseOutputPath)git-info/</GitInfoOutputDir>

View File

@ -1,3 +1,5 @@
%bcond_with bootstrap
# Avoid provides/requires from private libraries
%global privlibs libhostfxr
%global privlibs %{privlibs}|libclrjit
@ -23,10 +25,10 @@
%endif
%global dotnet_ldflags %(echo %{__global_ldflags} | sed -re 's/-specs=[^ ]*//g')
%global host_version 3.1.12
%global runtime_version 3.1.12
%global host_version 3.1.32
%global runtime_version 3.1.32
%global aspnetcore_runtime_version %{runtime_version}
%global sdk_version 3.1.112
%global sdk_version 3.1.426
%global templates_version %(echo %{runtime_version} | awk 'BEGIN { FS="."; OFS="." } {print $1, $2, $3+1 }')
%global host_rpm_version %{host_version}
@ -59,28 +61,29 @@
Name: dotnet3.1
Version: %{sdk_rpm_version}
Release: 2%{?dist}
Release: 1%{?dist}
Summary: .NET Core CLI tools and runtime
License: MIT and ASL 2.0 and BSD
URL: https://github.com/dotnet/
# ./build-dotnet-tarball dotnet-v%%{sdk_version}-SDK
Source0: dotnet-v%{sdk_version}-SDK.tar.gz
#Source1: dotnet-v%%{sdk_version}-SDK-rhel.8-arm64.tar.gz
#Source0: dotnet-v%%{sdk_version}-SDK-x64-bootstrap.tar.gz
Source100: check-debug-symbols.py
Source101: dotnet.sh.in
Patch1: source-build-ilasm-ildasm-path-fix.patch
Patch100: corefx-optflags-support.patch
Patch103: corefx-39633-cgroupv2-mountpoints.patch
Patch104: corefx-hardening-flags.patch
Patch200: coreclr-27048-sysctl-deprecation.patch
Patch201: coreclr-hardening-flags.patch
Patch202: coreclr-libunwind-fno-common.patch
# Already applied at tarball build time
#Patch201: coreclr-libunwind-fno-common.patch
Patch300: core-setup-do-not-strip.patch
Patch301: core-setup-hardening-flags.patch
Patch301: core-setup-no-werror.patch
Patch500: cli-telemetry-optout.patch
@ -89,6 +92,11 @@ ExclusiveArch: x86_64
BuildRequires: clang
BuildRequires: cmake
BuildRequires: coreutils
%if %{without bootstrap}
BuildRequires: dotnet-build-reference-packages
BuildRequires: dotnet-sdk-3.1
BuildRequires: dotnet-sdk-3.1-source-built-artifacts
%endif
BuildRequires: git
%if 0%{?fedora} || 0%{?rhel} > 7
BuildRequires: glibc-langpack-en
@ -185,6 +193,8 @@ Requires: dotnet-hostfxr-3.1%{?_isa} >= %{host_rpm_version}-%{release}
# libicu is dlopen()ed
Requires: libicu
# See src/corefx.*/src/Native/AnyOS/brotli-version.txt
Provides: bundled(libbrotli) = 1.0.9
%if %{use_bundled_libunwind}
Provides: bundled(libunwind) = 1.3
%endif
@ -288,13 +298,47 @@ applications using the .NET Core SDK.
%dotnet_targeting_pack aspnetcore-targeting-pack-3.1 %{aspnetcore_runtime_rpm_version} Microsoft.AspNetCore.App 3.1 Microsoft.AspNetCore.App.Ref
#%%dotnet_targeting_pack netstandard-targeting-pack-2.1 %%{sdk_rpm_version} NETStandard.Library 2.1 NETStandard.Library.Ref
%package -n dotnet-sdk-3.1-source-built-artifacts
Version: %{sdk_rpm_version}
Summary: Internal package for building .NET Core 3.1 Software Development Kit
%description -n dotnet-sdk-3.1-source-built-artifacts
The .NET Core source-built archive is a collection of packages needed
to build the .NET Core SDK itself.
These are not meant for general use.
%prep
%if %{with bootstrap}
%ifarch x86_64
%setup T -b0 -q -n dotnet-v%{sdk_version}-SDK
%setup T -b0 -q -n dotnet-v%{sdk_version}-SDK-%{runtime_arch}-bootstrap
%endif
%ifarch aarch64
%setup T -b1 -q -n dotnet-v%{sdk_version}-SDK-rhel.8-arm64
%setup T -b1 -q -n dotnet-v%{sdk_version}-SDK-%{runtime_arch}-bootstrap
%endif
%else
%setup -q -n dotnet-v%{sdk_version}-SDK
%endif
%if %{without bootstrap}
# Remove all prebuilts
find -iname '*.dll' -type f -delete
find -iname '*.so' -type f -delete
find -iname '*.tar.gz' -type f -delete
find -iname '*.nupkg' -type f -delete
find -iname '*.zip' -type f -delete
rm -rf .dotnet/
rm -rf packages/source-built
%endif
%if %{without bootstrap}
mkdir -p packages/archive
ln -s %{_libdir}/dotnet/source-built-artifacts/*.tar.gz packages/archive/
ln -s %{_libdir}/dotnet/reference-packages/Private.SourceBuild.ReferencePackages*.tar.gz packages/archive
%endif
# Fix bad hardcoded path in build
@ -303,16 +347,16 @@ sed -i 's|/usr/share/dotnet|%{_libdir}/dotnet|' src/dotnet-core-setup.*/src/core
# Disable warnings
sed -i 's|skiptests|skiptests ignorewarnings|' repos/coreclr.common.props
%patch1 -p1
pushd src/dotnet-corefx.*
%patch100 -p1
%patch103 -p1
%patch104 -p1
popd
pushd src/coreclr.*
pushd src/dotnet-coreclr.*
%patch200 -p1
%patch201 -p1
%patch202 -p1
#%%patch201 -p1
popd
pushd src/dotnet-core-setup.*
@ -340,16 +384,25 @@ find -iname 'nuget.config' -exec echo {}: \; -exec cat {} \; -exec echo \;
%build
cat /etc/os-release
%if %{without bootstrap}
# We need to create a copy because we will mutate this
cp -a %{_libdir}/dotnet previously-built-dotnet
%endif
export CFLAGS="%{dotnet_cflags}"
export CXXFLAGS="%{dotnet_cflags}"
export LDFLAGS="%{dotnet_ldflags}"
VERBOSE=1 ./build.sh \
-- \
/v:n \
/p:LogVerbosity=n \
/p:MinimalConsoleLogOutput=false \
/p:ContinueOnPrebuiltBaselineError=true \
%if %{without bootstrap}
--with-sdk previously-built-dotnet \
%endif
-- \
/v:n \
/p:SkipPortableRuntimeBuild=true \
/p:LogVerbosity=n \
/p:MinimalConsoleLogOutput=false \
/p:ContinueOnPrebuiltBaselineError=true \
sed -e 's|[@]LIBDIR[@]|%{_libdir}|g' %{SOURCE101} > dotnet.sh
@ -357,7 +410,7 @@ sed -e 's|[@]LIBDIR[@]|%{_libdir}|g' %{SOURCE101} > dotnet.sh
%install
install -dm 0755 %{buildroot}%{_libdir}/dotnet
ls artifacts/%{runtime_arch}/Release
find artifacts/%{runtime_arch}/Release
tar xf artifacts/%{runtime_arch}/Release/dotnet-sdk-%{sdk_version}-%{runtime_id}.tar.gz -C %{buildroot}%{_libdir}/dotnet/
# Install managed symbols
@ -385,17 +438,17 @@ chmod 0755 %{buildroot}/%{_libdir}/dotnet/packs/Microsoft.NETCore.App.Host.%{run
chmod 0755 %{buildroot}/%{_libdir}/dotnet/packs/Microsoft.NETCore.App.Host.%{runtime_id}/%{runtime_version}/runtimes/%{runtime_id}/native/libnethost.so
# Provided by dotnet-host from another SRPM
#install -dm 0755 %%{buildroot}%{_sysconfdir}/profile.d/
#install dotnet.sh %%{buildroot}%{_sysconfdir}/profile.d/
#install -dm 0755 %%{buildroot}%%{_sysconfdir}/profile.d/
#install dotnet.sh %%{buildroot}%%{_sysconfdir}/profile.d/
# Provided by dotnet-host from another SRPM
#install -dm 0755 %%{buildroot}/%%{_datadir}/bash-completion/completions
# dynamic completion needs the file to be named the same as the base command
#install src/cli.*/scripts/register-completions.bash %%{buildroot}/%%{_datadir}/bash-completion/completions/dotnet
#install src/dotnet-cli.*/scripts/register-completions.bash %%{buildroot}/%%{_datadir}/bash-completion/completions/dotnet
# TODO: the zsh completion script needs to be ported to use #compdef
#install -dm 755 %%{buildroot}/%%{_datadir}/zsh/site-functions
#install src/cli/scripts/register-completions.zsh %%{buildroot}/%%{_datadir}/zsh/site-functions/_dotnet
#install src/dotnet-cli/scripts/register-completions.zsh %%{buildroot}/%%{_datadir}/zsh/site-functions/_dotnet
# Provided by dotnet-host from another SRPM
#install -dm 0755 %%{buildroot}%%{_bindir}
@ -410,6 +463,9 @@ chmod 0755 %{buildroot}/%{_libdir}/dotnet/packs/Microsoft.NETCore.App.Host.%{run
#install -dm 0755 %%{buildroot}%%{_sysconfdir}/dotnet
#install install_location %%{buildroot}%%{_sysconfdir}/dotnet/
install -dm 0755 %{buildroot}%{_libdir}/dotnet/source-built-artifacts
install artifacts/%{runtime_arch}/Release/Private.SourceBuilt.Artifacts.*.tar.gz %{buildroot}/%{_libdir}/dotnet/source-built-artifacts/
# Check debug symbols in all elf objects. This is not in %%check
# because native binaries are stripped by rpm-build after %%install.
# So we need to do this check earlier.
@ -450,7 +506,71 @@ rm -rf %{buildroot}%{_libdir}/dotnet/packs/NETStandard.Library.Ref/2.1.0
%{_libdir}/dotnet/sdk/%{sdk_version}
%dir %{_libdir}/dotnet/packs
%files -n dotnet-sdk-3.1-source-built-artifacts
%dir %{_libdir}/dotnet
%{_libdir}/dotnet/source-built-artifacts
%changelog
* Wed Nov 30 2022 Omair Majid <omajid@redhat.com> - 3.1.426-1
- Update to .NET SDK 3.1.426 and Runtime 3.1.32
- Resolves: RHBZ#2148219
* Wed Sep 14 2022 Omair Majid <omajid@redhat.com> - 3.1.423-2
- Update to .NET SDK 3.1.423 and Runtime 3.1.29
- Resolves: RHBZ#2123784
* Tue Aug 09 2022 Omair Majid <omajid@redhat.com> - 3.1.422-2
- Update to .NET SDK 3.1.422 and Runtime 3.1.28
- Resolves: RHBZ#2115350
* Thu Jul 21 2022 Omair Majid <omajid@redhat.com> - 3.1.421-2
- Update to .NET SDK 3.1.421 and Runtime 3.1.27
- Resolves: RHBZ#2103273
* Thu Jun 23 2022 Omair Majid <omajid@redhat.com> - 3.1.420-1
- Update to .NET SDK 3.1.420 and Runtime 3.1.26
- Resolves: RHBZ#2096318
* Mon May 16 2022 Omair Majid <omajid@redhat.com> - 3.1.419-1
- Update to .NET SDK 3.1.419 and Runtime 3.1.25
- Resolves: RHBZ#2081442
* Wed Apr 27 2022 Omair Majid <omajid@redhat.com> - 3.1.418-2
- Bump release
- Related: RHBZ#2072012
* Mon Apr 25 2022 Omair Majid <omajid@redhat.com> - 3.1.418-1
- Update to .NET SDK 3.1.418 and Runtime 3.1.24
- Resolves: RHBZ#2072012
* Tue Jan 25 2022 Omair Majid <omajid@redhat.com> - 3.1.416-4
- Update to .NET SDK 3.1.416 and Runtime 3.1.22
- Resolves: RHBZ#2011820
- Resolves: RHBZ#2003077
- Resolves: RHBZ#2031428
* Sat Aug 14 2021 Omair Majid <omajid@redhat.com> - 3.1.118-1
- Update to .NET SDK 3.1.118 and Runtime 3.1.18
- Resolves: RHBZ#1990174
* Wed Aug 11 2021 Omair Majid <omajid@redhat.com> - 3.1.117-1
- Update to .NET SDK 3.1.117 and Runtime 3.1.17
- Resolves: RHBZ#1978389
* Fri Jun 11 2021 Omair Majid <omajid@redhat.com> - 3.1.116-1
- Update to .NET SDK 3.1.116 and Runtime 3.1.16
- Resolves: RHBZ#1965499
- Resolves: RHBZ#1966998
* Wed Jun 02 2021 Omair Majid <omajid@redhat.com> - 3.1.115-1
- Update to .NET SDK 3.1.115 and Runtime 3.1.15
- Resolves: RHBZ#1954324
* Thu Apr 22 2021 Omair Majid <omajid@redhat.com> - 3.1.114-2
- Update to .NET SDK 3.1.114 and Runtime 3.1.14
- Add dotnet-sdk-3.1-source-built-artifacts subpackage
- Resolves: RHBZ#1946721
* Wed Feb 10 2021 Omair Majid <omajid@redhat.com> - 3.1.112-2
- Update to .NET Core SDK 3.1.112 and Runtime 3.1.12
- Resolves: RHBZ#1923370