-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BoringTLS #7
Comments
Truncated log of progress. Right now, we're having issues linking?
The patch: diff --git a/configure.ac b/configure.ac
index 5c8fe7e..8893f9e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3453,6 +3453,8 @@ case "$host" in
arch_target=ppc;
case $host_os in
aix*|os400*)
+ BTLS_SUPPORTED=yes
+ BTLS_PLATFORM=powerpc
dnl on AIX/PASE, shared libraries can be inside archives
dnl if they are, we specify them by lib.a(lib.so)
dnl we may hardcode 64-bit names at times, but we don't do 32-bit AIX, so
@@ -4539,6 +4541,15 @@ if test "x$enable_btls" = "xyes"; then
aarch64)
btls_arch=aarch64
;;
+ powerpc)
+ btls_arch=powerpc
+ case $host_os in
+ aix*|os400*)
+ dnl be consistent
+ btls_cflags="$btls_cflags -maix64 -D_ALL_SOURCE -D_THREAD_SAFE -D_REENTRANT"
+ btls_ldflags="$btls_ldflags -maix64"
+ esac
+ ;;
android-armv5)
BTLS_CMAKE_ARGS="-DANDROID_ABI=\"armeabi\" -DANDROID_NATIVE_API_LEVEL=14"
;;
diff --git a/external/boringssl b/external/boringssl
--- a/external/boringssl
+++ b/external/boringssl
@@ -1 +1 @@
-Subproject commit 2ba8564f8b677a338bd84a41d5817f6399861031
+Subproject commit 2ba8564f8b677a338bd84a41d5817f6399861031-dirty diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2ba98c0..c81269a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -166,6 +166,8 @@ elseif (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "aarch64")
set(ARCH "aarch64")
elseif (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "s390x")
set(ARCH "s390x")
+elseif (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "powerpc")
+ set(ARCH "powerpc")
else()
message(FATAL_ERROR "Unknown processor:" ${CMAKE_SYSTEM_PROCESSOR})
endif()
diff --git a/include/openssl/thread.h b/include/openssl/thread.h
index 9a96fb4..1900d9e 100644
--- a/include/openssl/thread.h
+++ b/include/openssl/thread.h
@@ -77,7 +77,7 @@ typedef struct crypto_mutex_st {
typedef union crypto_mutex_st {
void *handle;
} CRYPTO_MUTEX;
-#elif defined(__MACH__) && defined(__APPLE__)
+#elif (defined(__MACH__) && defined(__APPLE__)) || defined(_AIX)
typedef pthread_rwlock_t CRYPTO_MUTEX;
#else
/* It is reasonable to include pthread.h on non-Windows systems, however the |
I've got a working BTLS, though now it bombs out trying to create handles. |
|
"working patch" that gets you to above; use above external submodule patch diff --git a/configure.ac b/configure.ac
index 5c8fe7e..718e4ee 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3453,6 +3453,8 @@ case "$host" in
arch_target=ppc;
case $host_os in
aix*|os400*)
+ BTLS_SUPPORTED=yes
+ BTLS_PLATFORM=powerpc
dnl on AIX/PASE, shared libraries can be inside archives
dnl if they are, we specify them by lib.a(lib.so)
dnl we may hardcode 64-bit names at times, but we don't do 32-bit AIX, so
@@ -4539,6 +4541,15 @@ if test "x$enable_btls" = "xyes"; then
aarch64)
btls_arch=aarch64
;;
+ powerpc)
+ btls_arch=powerpc
+ case $host_os in
+ aix*|os400*)
+ btls_cflags="$btls_cflags -maix64 -D_ALL_SOURCE -D_THREAD_SAFE -D_REENTRANT"
+ btls_ldflags="$btls_ldflags -maix64"
+ BTLS_CMAKE_ARGS="-DCMAKE_AR=/usr/bin/ar -DCMAKE_C_ARCHIVE_CREATE=\"<CMAKE_AR> -X64 cr <TARGET> <LINK_FLAGS> <OBJECTS>\""
+ esac
+ ;;
android-armv5)
BTLS_CMAKE_ARGS="-DANDROID_ABI=\"armeabi\" -DANDROID_NATIVE_API_LEVEL=14"
;;
diff --git a/external/boringssl b/external/boringssl
--- a/external/boringssl
+++ b/external/boringssl
@@ -1 +1 @@
-Subproject commit 2ba8564f8b677a338bd84a41d5817f6399861031
+Subproject commit 2ba8564f8b677a338bd84a41d5817f6399861031-dirty |
mono/mono#7403 and mono/boringssl#5 filed. I think we might be blocking on #3 for AIX though, but having PPC upstream will make things easier. |
Either the trampoline code is broken still after rebasing onto the PRs, or BTLS is dying very badly inside itself - judging by the call frames I see, likely the latter. This will get ugly. |
|
BoringTLS now works seemingly as well as it does on Linux. i is untested so far. Still misc issues, but the overall goal of this issue is done, so... |
Mono's managed TLS stack is deprecated and only supports TLS 1.0. BoringTLS requires cmake (installed) and will likely need some tweaking. Luckily, z Linux Mono maintainers have commited big endian fixes.
The text was updated successfully, but these errors were encountered: