From bbead114d19e59754dc0bd625de3774ee8887535 Mon Sep 17 00:00:00 2001 From: Anhad Singh Date: Mon, 20 Jan 2025 18:51:45 +1100 Subject: [PATCH] feat(openssl1): dynamic Signed-off-by: Anhad Singh --- recipes/libs/openssl1/openssl1.patch | 50 ++++++++++++++++++++++++++++ recipes/libs/openssl1/recipe.toml | 7 ++-- 2 files changed, 55 insertions(+), 2 deletions(-) create mode 100644 recipes/libs/openssl1/openssl1.patch diff --git a/recipes/libs/openssl1/openssl1.patch b/recipes/libs/openssl1/openssl1.patch new file mode 100644 index 000000000..82fe3ac23 --- /dev/null +++ b/recipes/libs/openssl1/openssl1.patch @@ -0,0 +1,50 @@ +diff --git a/Configurations/10-main.conf b/Configurations/10-main.conf +index 45e2fc7a..2d7f7db3 100644 +--- a/Configurations/10-main.conf ++++ b/Configurations/10-main.conf +@@ -175,28 +175,32 @@ sub vms_info { + }, + + +-### Redox +- "redox-aarch64" => { +- inherit_from => [ "BASE_common", asm("aarch64_asm") ], ++### Redox configurations ++ "redox-common" => { ++ inherit_from => [ "BASE_common" ], + cc => "gcc", +- cflags => "-DL_ENDIAN -DOSSL_SSIZE_MAX=LONG_MAX -DNO_SYSLOG -O3 -static -Wall", ++ thread_scheme => "(unknown)", ++ dso_scheme => "dlfcn", ++ shared_target => "linux-shared", ++ shared_cflag => "-fPIC", ++ shared_ldflag => sub { $disabled{pinshared} ? () : "-Wl,-znodelete" }, ++ shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", ++ }, ++ "redox-aarch64" => { ++ inherit_from => [ "redox-common", asm("aarch64_asm") ], ++ cflags => "-DL_ENDIAN -DOSSL_SSIZE_MAX=LONG_MAX -DNO_SYSLOG -O3 -Wall", + bn_ops => "SIXTY_FOUR_BIT_LONG", + perlasm_scheme => "elf", +- thread_scheme => "(unknown)", + }, + "redox-i686" => { +- inherit_from => [ "BASE_unix", asm("x86_elf_asm") ], +- cc => "gcc", +- cflags => "-DL_ENDIAN -DNO_SYSLOG -O3 -static -Wall", ++ inherit_from => [ "redox-common", asm("x86_elf_asm") ], ++ cflags => "-DL_ENDIAN -DNO_SYSLOG -O3 -Wall", + bn_ops => "BN_LLONG", +- thread_scheme => "(unknown)", + }, + "redox-x86_64" => { +- inherit_from => [ "BASE_common", asm("x86_64_asm") ], +- cc => "gcc", +- cflags => "-DL_ENDIAN -DOSSL_SSIZE_MAX=LONG_MAX -DNO_SYSLOG -O3 -static -Wall", ++ inherit_from => [ "redox-common", asm("x86_64_asm") ], ++ cflags => "-DL_ENDIAN -DOSSL_SSIZE_MAX=LONG_MAX -DNO_SYSLOG -O3 -Wall", + bn_ops => "SIXTY_FOUR_BIT_LONG", +- thread_scheme => "(unknown)", + }, + + #### Solaris configurations diff --git a/recipes/libs/openssl1/recipe.toml b/recipes/libs/openssl1/recipe.toml index 55b707c0e..2666b3860 100644 --- a/recipes/libs/openssl1/recipe.toml +++ b/recipes/libs/openssl1/recipe.toml @@ -5,15 +5,18 @@ branch = "redox-v1" [build] template = "custom" script = """ +DYNAMIC_INIT ARCH="${TARGET%%-*}" COOKBOOK_CONFIGURE="${COOKBOOK_SOURCE}/Configure" COOKBOOK_CONFIGURE_FLAGS=( - no-shared + shared no-dgram "redox-${ARCH}" --prefix="/" ) export CC="${TARGET}-gcc" -cookbook_configure +"${COOKBOOK_CONFIGURE}" "${COOKBOOK_CONFIGURE_FLAGS[@]}" +"${COOKBOOK_MAKE}" -j"${COOKBOOK_MAKE_JOBS}" +"${COOKBOOK_MAKE}" install DESTDIR="${COOKBOOK_STAGE}" rm -rfv "${COOKBOOK_STAGE}/"{share,ssl} """