-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
27 changed files
with
843 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- a/src/runtime/src/native/libs/CMakeLists.txt | ||
+++ b/src/runtime/src/native/libs/CMakeLists.txt | ||
@@ -150,13 +150,10 @@ if (CLR_CMAKE_TARGET_UNIX OR CLR_CMAKE_TARGET_BROWSER OR CLR_CMAKE_TARGET_WASI) | ||
#add_subdirectory(System.Net.Security.Native) # no gssapi on tvOS, see https://developer.apple.com/documentation/gss | ||
# System.Security.Cryptography.Native is intentionally disabled on tvOS | ||
# it is only used for interacting with OpenSSL which isn't useful there | ||
- elseif (CLR_CMAKE_TARGET_ANDROID AND NOT FORCE_ANDROID_OPENSSL) | ||
- add_subdirectory(System.Security.Cryptography.Native.Android) | ||
- elseif (FORCE_ANDROID_OPENSSL) | ||
- add_subdirectory(System.Security.Cryptography.Native) | ||
else () | ||
add_subdirectory(System.Net.Security.Native) | ||
add_subdirectory(System.Security.Cryptography.Native) | ||
+ add_subdirectory(System.Security.Cryptography.Native.Android) | ||
endif () | ||
|
||
if (CLR_CMAKE_TARGET_APPLE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- a/src/runtime/src/coreclr/minipal/Unix/doublemapping.cpp | ||
+++ b/src/runtime/src/coreclr/minipal/Unix/doublemapping.cpp | ||
@@ -14,7 +14,7 @@ | ||
#include <assert.h> | ||
#include <limits.h> | ||
#include <errno.h> | ||
-#if defined(TARGET_LINUX) && !defined(MFD_CLOEXEC) | ||
+#if (defined(TARGET_LINUX) && !defined(MFD_CLOEXEC)) || defined(TARGET_ANDROID) | ||
#include <linux/memfd.h> | ||
#include <sys/syscall.h> // __NR_memfd_create | ||
#define memfd_create(...) syscall(__NR_memfd_create, __VA_ARGS__) |
31 changes: 31 additions & 0 deletions
31
packages/dotnet9.0/0003-runtime-src-native-libs-System.IO.Compression.Native.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--- a/src/runtime/src/native/libs/System.IO.Compression.Native/CMakeLists.txt | ||
+++ b/src/runtime/src/native/libs/System.IO.Compression.Native/CMakeLists.txt | ||
@@ -60,7 +60,7 @@ if (CLR_CMAKE_TARGET_UNIX OR CLR_CMAKE_TARGET_BROWSER OR CLR_CMAKE_TARGET_WASI) | ||
${NATIVE_LIBS_EXTRA} | ||
) | ||
|
||
- if (NOT CLR_CMAKE_TARGET_MACCATALYST AND NOT CLR_CMAKE_TARGET_IOS AND NOT CLR_CMAKE_TARGET_TVOS AND NOT CLR_CMAKE_TARGET_ANDROID AND NOT CLR_CMAKE_USE_SYSTEM_BROTLI) | ||
+ if (NOT CLR_CMAKE_TARGET_MACCATALYST AND NOT CLR_CMAKE_TARGET_IOS AND NOT CLR_CMAKE_TARGET_TVOS AND NOT CLR_CMAKE_USE_SYSTEM_BROTLI) | ||
set(DEF_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/System.IO.Compression.Native_unixexports.src) | ||
set(EXPORTS_FILE ${CMAKE_CURRENT_BINARY_DIR}/System.IO.Compression.Native.exports) | ||
generate_exports_file(${DEF_SOURCES} ${EXPORTS_FILE}) | ||
@@ -114,7 +114,7 @@ else () | ||
endif() | ||
endif () | ||
|
||
- if (NOT GEN_SHARED_LIB AND NOT CLR_CMAKE_TARGET_MACCATALYST AND NOT CLR_CMAKE_TARGET_IOS AND NOT CLR_CMAKE_TARGET_TVOS AND NOT CLR_CMAKE_TARGET_ANDROID AND NOT CLR_CMAKE_TARGET_BROWSER AND NOT CLR_CMAKE_TARGET_WASI) | ||
+ if (NOT GEN_SHARED_LIB AND NOT CLR_CMAKE_TARGET_MACCATALYST AND NOT CLR_CMAKE_TARGET_IOS AND NOT CLR_CMAKE_TARGET_TVOS AND NOT CLR_CMAKE_TARGET_BROWSER AND NOT CLR_CMAKE_TARGET_WASI) | ||
set(NATIVECOMPRESSION_SOURCES ${NATIVECOMPRESSION_SOURCES} entrypoints.c) | ||
endif () | ||
|
||
--- a/src/runtime/src/native/libs/System.IO.Compression.Native/extra_libs.cmake | ||
+++ b/src/runtime/src/native/libs/System.IO.Compression.Native/extra_libs.cmake | ||
@@ -16,7 +16,7 @@ macro(append_extra_compression_libs NativeLibsExtra) | ||
# 'zlib' represents our in-tree zlib, and is used in all other platforms | ||
# that don't meet any of the previous special requirements, like most | ||
# regular Unix and Windows builds. | ||
- list(APPEND ZLIB_LIBRARIES $<IF:$<BOOL:${CLR_CMAKE_USE_SYSTEM_ZLIB}>,z,zlib>) | ||
+ list(APPEND ZLIB_LIBRARIES $<IF:$<BOOL:${CLR_CMAKE_USE_SYSTEM_ZLIB}>,z,zlib> m) | ||
endif () | ||
list(APPEND ${NativeLibsExtra} ${ZLIB_LIBRARIES}) | ||
|
17 changes: 17 additions & 0 deletions
17
...t9.0/0005-runtime-src-native-libs-System.Security.Cryptography.Native-opensslshim.c.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- a/src/runtime/src/native/libs/System.Security.Cryptography.Native/opensslshim.c | ||
+++ b/src/runtime/src/native/libs/System.Security.Cryptography.Native/opensslshim.c | ||
@@ -77,14 +77,6 @@ static void OpenLibraryOnce(void) | ||
DlOpen(soName); | ||
} | ||
|
||
-#ifdef TARGET_ANDROID | ||
- if (libssl == NULL) | ||
- { | ||
- // Android OpenSSL has no soname | ||
- DlOpen(LIBNAME); | ||
- } | ||
-#endif | ||
- | ||
if (libssl == NULL) | ||
{ | ||
// Prefer OpenSSL 3.x |
55 changes: 55 additions & 0 deletions
55
packages/dotnet9.0/0006-runtime-eng-common-cross-toolchain.cmake.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
--- a/src/runtime/eng/common/cross/toolchain.cmake | ||
+++ b/src/runtime/eng/common/cross/toolchain.cmake | ||
@@ -36,6 +36,8 @@ if(TARGET_ARCH_NAME STREQUAL "arm") | ||
set(TOOLCHAIN "armv7-alpine-linux-musleabihf") | ||
elseif(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/armv6-alpine-linux-musleabihf) | ||
set(TOOLCHAIN "armv6-alpine-linux-musleabihf") | ||
+ elseif(EXISTS ${CROSS_ROOTFS}/usr/lib/arm-linux-androideabi) | ||
+ set(TOOLCHAIN "armv7-linux-androideabi") | ||
else() | ||
set(TOOLCHAIN "arm-linux-gnueabihf") | ||
endif() | ||
@@ -46,6 +48,8 @@ elseif(TARGET_ARCH_NAME STREQUAL "arm64") | ||
set(CMAKE_SYSTEM_PROCESSOR aarch64) | ||
if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/aarch64-alpine-linux-musl) | ||
set(TOOLCHAIN "aarch64-alpine-linux-musl") | ||
+ elseif(EXISTS ${CROSS_ROOTFS}/usr/lib/aarch64-linux-android) | ||
+ set(TOOLCHAIN "aarch64-linux-android") | ||
elseif(LINUX) | ||
set(TOOLCHAIN "aarch64-linux-gnu") | ||
if(TIZEN) | ||
@@ -78,6 +82,8 @@ elseif(TARGET_ARCH_NAME STREQUAL "riscv64") | ||
set(CMAKE_SYSTEM_PROCESSOR riscv64) | ||
if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/riscv64-alpine-linux-musl) | ||
set(TOOLCHAIN "riscv64-alpine-linux-musl") | ||
+ elseif(EXISTS ${CROSS_ROOTFS}/usr/lib/riscv64-linux-android) | ||
+ set(TOOLCHAIN "riscv64-linux-android") | ||
else() | ||
set(TOOLCHAIN "riscv64-linux-gnu") | ||
endif() | ||
@@ -92,6 +98,8 @@ elseif(TARGET_ARCH_NAME STREQUAL "x64") | ||
set(CMAKE_SYSTEM_PROCESSOR x86_64) | ||
if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/x86_64-alpine-linux-musl) | ||
set(TOOLCHAIN "x86_64-alpine-linux-musl") | ||
+ elseif(EXISTS ${CROSS_ROOTFS}/usr/lib/x86_64-linux-android) | ||
+ set(TOOLCHAIN "x86_64-linux-android") | ||
elseif(LINUX) | ||
set(TOOLCHAIN "x86_64-linux-gnu") | ||
if(TIZEN) | ||
@@ -108,6 +116,8 @@ elseif(TARGET_ARCH_NAME STREQUAL "x86") | ||
set(CMAKE_SYSTEM_PROCESSOR i686) | ||
if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/i586-alpine-linux-musl) | ||
set(TOOLCHAIN "i586-alpine-linux-musl") | ||
+ elseif(EXISTS ${CROSS_ROOTFS}/usr/lib/i686-linux-android) | ||
+ set(TOOLCHAIN "i686-linux-android") | ||
else() | ||
set(TOOLCHAIN "i686-linux-gnu") | ||
endif() | ||
@@ -244,6 +254,7 @@ else() | ||
set(CMAKE_C_COMPILER_EXTERNAL_TOOLCHAIN "${CROSS_ROOTFS}/usr") | ||
set(CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN "${CROSS_ROOTFS}/usr") | ||
set(CMAKE_ASM_COMPILER_EXTERNAL_TOOLCHAIN "${CROSS_ROOTFS}/usr") | ||
+ include(${CROSS_ROOTFS}/../build/cmake/android.toolchain.cmake) | ||
endif() | ||
|
||
# Specify link flags |
11 changes: 11 additions & 0 deletions
11
packages/dotnet9.0/0007-runtime-eng-DotNetBuild.props.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- a/src/runtime/eng/DotNetBuild.props | ||
+++ b/src/runtime/eng/DotNetBuild.props | ||
@@ -88,7 +88,7 @@ | ||
|
||
<!-- Handle system libraries --> | ||
<UseSystemLibs Condition="'$(UseSystemLibs)' != ''">+$(UseSystemLibs)+</UseSystemLibs> | ||
- <InnerBuildArgs Condition="'$(PortableBuild)' != 'true'">$(InnerBuildArgs) --cmakeargs -DCLR_CMAKE_USE_SYSTEM_BROTLI=true</InnerBuildArgs> | ||
+ <InnerBuildArgs Condition="$(UseSystemLibs.Contains('+brotli+'))">$(InnerBuildArgs) --cmakeargs -DCLR_CMAKE_USE_SYSTEM_BROTLI=true</InnerBuildArgs> | ||
<InnerBuildArgs Condition="$(UseSystemLibs.Contains('+libunwind+'))">$(InnerBuildArgs) --cmakeargs -DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=true</InnerBuildArgs> | ||
<!-- TODO: llvm-libunwind --> | ||
<!-- TODO: LinuxTracepoints --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- a/src/aspire/Directory.Build.targets | ||
+++ b/src/aspire/Directory.Build.targets | ||
@@ -14,8 +14,7 @@ | ||
<None Include="$(PackageThirdPartyNoticesFile)" Pack="true" PackagePath="." /> | ||
</ItemGroup> | ||
|
||
- <Import Condition="'$(SampleProject)' == 'true' or '$(CI)' != 'true' " Project="eng\Versions.dev.targets" /> | ||
- <Import Condition="'$(SampleProject)' != 'true' and '$(CI)' == 'true' " Project="eng\Versions.targets" /> | ||
+ <Import Project="eng\Versions.dev.targets" /> | ||
|
||
<Import Project="Sdk.targets" Sdk="Microsoft.DotNet.Arcade.Sdk" /> | ||
|
13 changes: 13 additions & 0 deletions
13
packages/dotnet9.0/0009-src-runtime-src-coreclr-vm-threadstatics.cpp.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- a/src/runtime/src/coreclr/vm/threadstatics.cpp | ||
+++ b/src/runtime/src/coreclr/vm/threadstatics.cpp | ||
@@ -913,6 +913,10 @@ bool CanJITOptimizeTLSAccess() | ||
// Optimization is disabled for linux/x86 | ||
#elif defined(TARGET_LINUX_MUSL) && defined(TARGET_ARM64) | ||
// Optimization is disabled for linux musl arm64 | ||
+#elif defined(TARGET_LINUX_BIONIC) && defined(TARGET_ARM64) | ||
+ // Optimization is disabled for linux bionic arm64 | ||
+#elif defined(TARGET_ANDROID) && defined(TARGET_ARM64) | ||
+ // Optimization is disabled for Android arm64 | ||
#elif defined(TARGET_FREEBSD) && defined(TARGET_ARM64) | ||
// Optimization is disabled for FreeBSD/arm64 | ||
#elif defined(FEATURE_INTERPRETER) |
Oops, something went wrong.