1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-25 20:45:06 +00:00
serenity/Ports/openssl/patches/serenity-configuration.patch
Rodrigo Tobar dc03c559df Ports: Compile OpenSSL with threads and as a shared library
By defining our own target platform in the OpenSSL compilation
configuration we can now compile an OpenSSL shared library. We need to
avoid symbol versioning though, as serenity's LibELF doesn't support
this yet.

We are now also compiling with threading support to allow using this
from Python.
2021-10-05 15:35:48 +01:00

33 lines
1.3 KiB
Diff

--- openssl-1.1.1k/Configurations/10-main.conf 2021-03-25 21:28:38.000000000 +0800
+++ openssl-1.1.1k/Configurations/10-main.conf 2021-09-26 00:05:04.340004623 +0800
@@ -627,6 +627,30 @@
shared_extension => ".so",
},
+### Serenity
+ "serenity-generic" => {
+ inherit_from => [ "BASE_unix" ],
+ CC => "gcc",
+ CXX => "g++",
+ CFLAGS => picker(default => "-Wall",
+ debug => "-O0 -g",
+ release => "-O3"),
+ CXXFLAGS => picker(default => "-Wall",
+ debug => "-O0 -g",
+ release => "-O3"),
+ cflags => threads("-pthread"),
+ cxxflags => combine("-std=c++11", threads("-pthread")),
+ lib_cppflags => "-DOPENSSL_USE_NODELETE",
+ ex_libs => add("-ldl", threads("-pthread")),
+ bn_ops => "BN_LLONG RC4_CHAR",
+ thread_scheme => "pthreads",
+ dso_scheme => "dlfcn",
+ shared_target => "serenity-shared",
+ shared_cflag => "-fPIC",
+ shared_ldflag => sub { $disabled{pinshared} ? () : "-Wl,-znodelete" },
+ shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)",
+ },
+
####
#### Variety of LINUX:-)
####