summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2018-08-28 12:23:14 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-09-04 11:03:56 +0100
commitd9704260def0c2058ea62398cefff2e7574fba37 (patch)
tree1ca189cbc812c64d4a6f07581bb54dfb9fb854ed /meta/recipes-connectivity
parent1343314af942b58fb659b06221d3df6ab299e35c (diff)
downloadpoky-d9704260def0c2058ea62398cefff2e7574fba37.tar.gz
openssl: update to 1.1.1
At the moment 1.1.1 is in pre-release stage, however the final release should be available within a few weeks. The major selling point is that it supports the new TLS 1.3 specification. It will also be the new long term support version. More information: https://www.openssl.org/policies/releasestrat.html (From OE-Core rev: 9f14a32a3b47b83877fe4fa58b13caeeb38f183a) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-connectivity')
-rw-r--r--meta/recipes-connectivity/openssl/openssl/0001-Take-linking-flags-from-LDFLAGS-env-var.patch43
-rw-r--r--meta/recipes-connectivity/openssl/openssl/0001-allow-OPENSSLDIR-and-ENGINESDIR-CFLAGS-to-be-control.patch39
-rw-r--r--meta/recipes-connectivity/openssl/openssl_1.1.1-pre9.bb (renamed from meta/recipes-connectivity/openssl/openssl_1.1.0i.bb)23
3 files changed, 14 insertions, 91 deletions
diff --git a/meta/recipes-connectivity/openssl/openssl/0001-Take-linking-flags-from-LDFLAGS-env-var.patch b/meta/recipes-connectivity/openssl/openssl/0001-Take-linking-flags-from-LDFLAGS-env-var.patch
deleted file mode 100644
index 6ce4e47d71..0000000000
--- a/meta/recipes-connectivity/openssl/openssl/0001-Take-linking-flags-from-LDFLAGS-env-var.patch
+++ /dev/null
@@ -1,43 +0,0 @@
1From 08face4353d80111973aba9c1304c92158cfad0e Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Tue, 28 Mar 2017 16:40:12 +0300
4Subject: [PATCH] Take linking flags from LDFLAGS env var
5
6This fixes "No GNU_HASH in the elf binary" issues.
7
8Upstream-Status: Inappropriate [oe-core specific]
9Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
10---
11 Configurations/unix-Makefile.tmpl | 2 +-
12 Configure | 2 +-
13 2 files changed, 2 insertions(+), 2 deletions(-)
14
15diff --git a/Configurations/unix-Makefile.tmpl b/Configurations/unix-Makefile.tmpl
16index c029817..43b769b 100644
17--- a/Configurations/unix-Makefile.tmpl
18+++ b/Configurations/unix-Makefile.tmpl
19@@ -173,7 +173,7 @@ CROSS_COMPILE= {- $config{cross_compile_prefix} -}
20 CC= $(CROSS_COMPILE){- $target{cc} -}
21 CFLAGS={- our $cflags2 = join(" ",(map { "-D".$_} @{$target{defines}}, @{$config{defines}}),"-DOPENSSLDIR=\"\\\"\$(OPENSSLDIR)\\\"\"","-DENGINESDIR=\"\\\"\$(ENGINESDIR)\\\"\"") -} {- $target{cflags} -} {- $config{cflags} -}
22 CFLAGS_Q={- $cflags2 =~ s|([\\"])|\\$1|g; $cflags2 -} {- $config{cflags} -}
23-LDFLAGS= {- $target{lflags} -}
24+LDFLAGS= {- $target{lflags}." ".$ENV{'LDFLAGS'} -}
25 PLIB_LDFLAGS= {- $target{plib_lflags} -}
26 EX_LIBS= {- $target{ex_libs} -} {- $config{ex_libs} -}
27 LIB_CFLAGS={- $target{shared_cflag} || "" -}
28diff --git a/Configure b/Configure
29index aee7cc3..274d236 100755
30--- a/Configure
31+++ b/Configure
32@@ -979,7 +979,7 @@ $config{build_file} = $target{build_file};
33 $config{defines} = [];
34 $config{cflags} = "";
35 $config{ex_libs} = "";
36-$config{shared_ldflag} = "";
37+$config{shared_ldflag} = $ENV{'LDFLAGS'};
38
39 # Make sure build_scheme is consistent.
40 $target{build_scheme} = [ $target{build_scheme} ]
41--
422.11.0
43
diff --git a/meta/recipes-connectivity/openssl/openssl/0001-allow-OPENSSLDIR-and-ENGINESDIR-CFLAGS-to-be-control.patch b/meta/recipes-connectivity/openssl/openssl/0001-allow-OPENSSLDIR-and-ENGINESDIR-CFLAGS-to-be-control.patch
deleted file mode 100644
index 67d06fc78e..0000000000
--- a/meta/recipes-connectivity/openssl/openssl/0001-allow-OPENSSLDIR-and-ENGINESDIR-CFLAGS-to-be-control.patch
+++ /dev/null
@@ -1,39 +0,0 @@
1From 26e98beb8a987cdc69699aaffc5599926fb1b293 Mon Sep 17 00:00:00 2001
2From: Andre McCurdy <armccurdy@gmail.com>
3Date: Fri, 17 Aug 2018 20:33:44 -0700
4Subject: [PATCH] allow OPENSSLDIR and ENGINESDIR CFLAGS to be controlled
5
6Upstream-Status: Inappropriate [OE Specific]
7
8Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
9---
10 Configurations/unix-Makefile.tmpl | 6 +++++-
11 1 file changed, 5 insertions(+), 1 deletion(-)
12
13diff --git a/Configurations/unix-Makefile.tmpl b/Configurations/unix-Makefile.tmpl
14index 034d93e..2310d12 100644
15--- a/Configurations/unix-Makefile.tmpl
16+++ b/Configurations/unix-Makefile.tmpl
17@@ -156,6 +156,10 @@ LIBDIR={- #
18 ENGINESDIR={- use File::Spec::Functions;
19 catdir($prefix,$libdir,"engines-$sover") -}
20
21+# Intermediate variables so the values defined via CFLAGS can be controlled.
22+OE_DOPENSSLDIR=$(OPENSSLDIR)
23+OE_DENGINESDIR=$(ENGINESDIR)
24+
25 # Convenience variable for those who want to set the rpath in shared
26 # libraries and applications
27 LIBRPATH=$(INSTALLTOP)/$(LIBDIR)
28@@ -174,7 +178,7 @@ HTMLSUFFIX=html
29
30 CROSS_COMPILE= {- $config{cross_compile_prefix} -}
31 CC= $(CROSS_COMPILE){- $target{cc} -}
32-CFLAGS={- our $cflags2 = join(" ",(map { "-D".$_} @{$target{defines}}, @{$config{defines}}),"-DOPENSSLDIR=\"\\\"\$(OPENSSLDIR)\\\"\"","-DENGINESDIR=\"\\\"\$(ENGINESDIR)\\\"\"") -} {- $target{cflags} -} {- $config{cflags} -}
33+CFLAGS={- our $cflags2 = join(" ",(map { "-D".$_} @{$target{defines}}, @{$config{defines}}),"-DOPENSSLDIR=\"\\\"\$(OE_DOPENSSLDIR)\\\"\"","-DENGINESDIR=\"\\\"\$(OE_DENGINESDIR)\\\"\"") -} {- $target{cflags} -} {- $config{cflags} -}
34 CFLAGS_Q={- $cflags2 =~ s|([\\"])|\\$1|g; $cflags2 -} {- $config{cflags} -}
35 LDFLAGS= {- $target{lflags}." ".$ENV{'LDFLAGS'} -}
36 PLIB_LDFLAGS= {- $target{plib_lflags} -}
37--
381.9.1
39
diff --git a/meta/recipes-connectivity/openssl/openssl_1.1.0i.bb b/meta/recipes-connectivity/openssl/openssl_1.1.1-pre9.bb
index a03f6ff336..1917c3301f 100644
--- a/meta/recipes-connectivity/openssl/openssl_1.1.0i.bb
+++ b/meta/recipes-connectivity/openssl/openssl_1.1.1-pre9.bb
@@ -13,26 +13,30 @@ DEPENDS = "hostperl-runtime-native"
13SRC_URI = "http://www.openssl.org/source/openssl-${PV}.tar.gz \ 13SRC_URI = "http://www.openssl.org/source/openssl-${PV}.tar.gz \
14 file://run-ptest \ 14 file://run-ptest \
15 file://openssl-c_rehash.sh \ 15 file://openssl-c_rehash.sh \
16 file://0001-Take-linking-flags-from-LDFLAGS-env-var.patch \
17 file://0001-allow-OPENSSLDIR-and-ENGINESDIR-CFLAGS-to-be-control.patch \
18 " 16 "
19 17
20SRC_URI_append_class-nativesdk = " \ 18SRC_URI_append_class-nativesdk = " \
21 file://environment.d-openssl.sh \ 19 file://environment.d-openssl.sh \
22 " 20 "
23 21
24SRC_URI[md5sum] = "9495126aafd2659d357ea66a969c3fe1" 22SRC_URI[md5sum] = "6aa32e976e2c9a4aee858ced135d2573"
25SRC_URI[sha256sum] = "ebbfc844a8c8cc0ea5dc10b86c9ce97f401837f3fa08c17b2cdadc118253cf99" 23SRC_URI[sha256sum] = "95ebdfbb05e8451fb01a186ccaa4a7da0eff9a48999ede9fe1a7d90db75ccb4c"
26 24
27inherit lib_package multilib_header ptest 25inherit lib_package multilib_header ptest
28 26
29#| ./libcrypto.so: undefined reference to `getcontext' 27#| ./libcrypto.so: undefined reference to `getcontext'
30#| ./libcrypto.so: undefined reference to `setcontext' 28#| ./libcrypto.so: undefined reference to `setcontext'
31#| ./libcrypto.so: undefined reference to `makecontext' 29#| ./libcrypto.so: undefined reference to `makecontext'
32EXTRA_OECONF_append_libc-musl = " -DOPENSSL_NO_ASYNC" 30CPPFLAGS_append_libc-musl = " -DOPENSSL_NO_ASYNC"
33 31
34EXTRA_OEMAKE_append_class-native = " OE_DOPENSSLDIR='/not/builtin' OE_DENGINESDIR='/not/builtin'" 32# This prevents openssl from using getrandom() which is not available on older glibc versions
35EXTRA_OEMAKE_append_class-nativesdk = " OE_DOPENSSLDIR='/not/builtin' OE_DENGINESDIR='/not/builtin'" 33# (native versions can be built with newer glibc, but then relocated onto a system with older glibc)
34EXTRA_OECONF_class-native = "--with-rand-seed=devrandom"
35EXTRA_OECONF_class-nativesdk = "--with-rand-seed=devrandom"
36
37# Relying on hardcoded built-in paths causes openssl-native to not be relocateable from sstate.
38CFLAGS_append_class-native = " -DOPENSSLDIR=/not/builtin -DENGINESDIR=/not/builtin"
39CFLAGS_append_class-nativesdk = " -DOPENSSLDIR=/not/builtin -DENGINESDIR=/not/builtin"
36 40
37do_configure () { 41do_configure () {
38 os=${HOST_OS} 42 os=${HOST_OS}
@@ -98,8 +102,9 @@ do_configure () {
98 if [ "x$useprefix" = "x" ]; then 102 if [ "x$useprefix" = "x" ]; then
99 useprefix=/ 103 useprefix=/
100 fi 104 fi
101 libdirleaf="$(echo ${libdir} | sed s:$useprefix::)" 105 # WARNING: do not set compiler/linker flags (-I/-D etc.) in EXTRA_OECONF, as they will fully replace the
102 perl ./Configure ${EXTRA_OECONF} ${PACKAGECONFIG_CONFARGS} --prefix=$useprefix --openssldir=${libdir}/ssl-1.1 --libdir=$libdirleaf $target 106 # environment variables set by bitbake. Adjust the environment variables instead.
107 perl ./Configure ${EXTRA_OECONF} ${PACKAGECONFIG_CONFARGS} --prefix=$useprefix --openssldir=${libdir}/ssl-1.1 --libdir=${libdir} $target
103} 108}
104 109
105do_install () { 110do_install () {