Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Robert Joslyn <robert.joslyn@redrectangle.org>
To: openembedded-core@lists.openembedded.org
Subject: [rocko][PATCH 09/25] openssl_1.0: fix cryptodev-linux PACKAGECONFIG support
Date: Sat,  3 Nov 2018 09:44:11 -0700	[thread overview]
Message-ID: <20181103164427.16125-10-robert.joslyn@redrectangle.org> (raw)
In-Reply-To: <20181103164427.16125-1-robert.joslyn@redrectangle.org>

From: Andre McCurdy <armccurdy@gmail.com>

Since openssl isn't an autotools recipe, defining cryptodev-linux
related config options via PACKAGECONFIG hasn't worked correctly
since PACKAGECONFIG_CONFARGS stopped being automatically appended to
EXTRA_OECONF in 2016:

  http://git.openembedded.org/openembedded-core/commit/?id=c98fb5f5129e71829ffab4449b3d28082bc95ab4

The issue appears to have been hidden as the flags are also hardcoded
in CFLAG - and therefore always enabled, regardless of the state of
the PACKAGECONFIG option. Fix by passing both EXTRA_OECONF and
PACKAGECONFIG_CONFARGS when running the openssl Configure script.
Although the openssl 1.1 recipe doesn't contain any PACKAGECONFIG
options yet, pre-emptively make the same fix there too.

Also only enable cryptodev-linux by default for target builds (based
on the historical comments in the recipe, that seems to have been the
original intention).

(From OE-Core rev: 6fee11b04b979a5b3237902d947db7118cafca2b)

(From OE-Core rev: 201f4a889c0e4b3d13369e38662bf97ed8a9a8e1)

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 meta/recipes-connectivity/openssl/openssl_1.0.2o.bb | 9 ++++-----
 meta/recipes-connectivity/openssl/openssl_1.1.0h.bb | 2 +-
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/meta/recipes-connectivity/openssl/openssl_1.0.2o.bb b/meta/recipes-connectivity/openssl/openssl_1.0.2o.bb
index e78830c55b..b8fe49f7c9 100644
--- a/meta/recipes-connectivity/openssl/openssl_1.0.2o.bb
+++ b/meta/recipes-connectivity/openssl/openssl_1.0.2o.bb
@@ -63,6 +63,9 @@ UPSTREAM_CHECK_REGEX = "openssl-(?P<pver>1\.0.+)\.tar"
 inherit pkgconfig siteinfo multilib_header ptest relative_symlinks
 
 PACKAGECONFIG ?= "cryptodev-linux"
+PACKAGECONFIG_class-native = ""
+PACKAGECONFIG_class-nativesdk = ""
+
 PACKAGECONFIG[perl] = ",,,"
 PACKAGECONFIG[cryptodev-linux] = "-DHAVE_CRYPTODEV -DUSE_CRYPTODEV_DIGESTS,,cryptodev-linux"
 
@@ -88,10 +91,6 @@ CFLAG = "${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'le', '-DL_ENDIAN', '-DB
 # (and it causes issues with SELinux)
 CFLAG += "-Wa,--noexecstack"
 
-# For target side versions of openssl enable support for OCF Linux driver
-# if they are available.
-CFLAG += "-DHAVE_CRYPTODEV -DUSE_CRYPTODEV_DIGESTS"
-
 CFLAG_append_class-native = " -fPIC"
 
 do_configure_prepend_darwin () {
@@ -202,7 +201,7 @@ do_configure () {
 		useprefix=/
 	fi
 	libdirleaf="$(echo ${libdir} | sed s:$useprefix::)"
-	perl ./Configure ${EXTRA_OECONF} shared --prefix=$useprefix --openssldir=${libdir}/ssl --libdir=$libdirleaf $target
+	perl ./Configure ${EXTRA_OECONF} ${PACKAGECONFIG_CONFARGS} shared --prefix=$useprefix --openssldir=${libdir}/ssl --libdir=$libdirleaf $target
 }
 
 do_compile_prepend_class-target () {
diff --git a/meta/recipes-connectivity/openssl/openssl_1.1.0h.bb b/meta/recipes-connectivity/openssl/openssl_1.1.0h.bb
index d277170fdd..14c3f54132 100644
--- a/meta/recipes-connectivity/openssl/openssl_1.1.0h.bb
+++ b/meta/recipes-connectivity/openssl/openssl_1.1.0h.bb
@@ -120,7 +120,7 @@ do_configure () {
                 useprefix=/
         fi
 	libdirleaf="$(echo ${libdir} | sed s:$useprefix::)"
-	perl ./Configure ${EXTRA_OECONF} --prefix=$useprefix --openssldir=${libdir}/ssl-1.1 --libdir=${libdirleaf} $target
+	perl ./Configure ${EXTRA_OECONF} ${PACKAGECONFIG_CONFARGS} --prefix=$useprefix --openssldir=${libdir}/ssl-1.1 --libdir=${libdirleaf} $target
 }
 
 do_install () {
-- 
2.18.1



  parent reply	other threads:[~2018-11-03 16:45 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-03 16:44 [rocko][PATCH 00/25] Backport openssl 1.0.2p and 1.1.0i Robert Joslyn
2018-11-03 16:44 ` [rocko][PATCH 01/25] openssl: fix upstream version check for 1.0 version Robert Joslyn
2018-11-03 16:44 ` [rocko][PATCH 02/25] openssl: disable ccache usage Robert Joslyn
2018-11-03 16:44 ` [rocko][PATCH 03/25] openssl-nativesdk: Fix "can't open config file" warning Robert Joslyn
2018-11-03 16:44 ` [rocko][PATCH 04/25] openssl_1.1: avoid using += with an over-ride Robert Joslyn
2018-11-03 16:44 ` [rocko][PATCH 05/25] openssl_1.1: minor recipe formatting tweaks etc Robert Joslyn
2018-11-03 16:44 ` [rocko][PATCH 06/25] openssl_1.0: merge openssl10.inc into the openssl_1.0.2o.bb recipe Robert Joslyn
2018-11-03 16:44 ` [rocko][PATCH 07/25] openssl_1.0: minor recipe formatting tweaks etc Robert Joslyn
2018-11-03 16:44 ` [rocko][PATCH 08/25] openssl_1.0: drop curly brackets from shell local variables Robert Joslyn
2018-11-03 16:44 ` Robert Joslyn [this message]
2018-11-03 16:44 ` [rocko][PATCH 10/25] openssl_1.0: drop leading "-" from no-ssl3 config option Robert Joslyn
2018-11-03 16:44 ` [rocko][PATCH 11/25] openssl_1.0: avoid running make twice for target do_compile() Robert Joslyn
2018-11-03 16:44 ` [rocko][PATCH 12/25] openssl: remove uclibc remnants Robert Joslyn
2018-11-03 16:44 ` [rocko][PATCH 13/25] openssl: support musl-x32 build Robert Joslyn
2018-11-03 16:44 ` [rocko][PATCH 14/25] openssl: minor indent fixes Robert Joslyn
2018-11-03 16:44 ` [rocko][PATCH 15/25] openssl_1.0: drop obsolete ca.patch Robert Joslyn
2018-11-03 16:44 ` [rocko][PATCH 16/25] openssl_1.0: drop obsolete exporting of AS, EX_LIBS and DIRS Robert Joslyn
2018-11-03 16:44 ` [rocko][PATCH 17/25] openssl_1.0: drop unmaintained darwin support Robert Joslyn
2018-11-03 16:44 ` [rocko][PATCH 18/25] openssl_1.0: add PACKAGECONFIG option to control manpages Robert Joslyn
2018-11-03 16:44 ` [rocko][PATCH 19/25] openssl_1.0: squash whitespace in CC_INFO Robert Joslyn
2018-11-03 16:44 ` [rocko][PATCH 20/25] openssl: fix missing dependency on hostperl-runtime-native Robert Joslyn
2018-11-03 16:44 ` [rocko][PATCH 21/25] openssl_1.0: drop unnecessary dependency on makedepend-native Robert Joslyn
2018-11-03 16:44 ` [rocko][PATCH 22/25] openssl_1.0: drop unnecessary call to perlpath.pl from do_configure() Robert Joslyn
2018-11-03 16:44 ` [rocko][PATCH 23/25] openssl-1.1: fix c_rehash perl errors Robert Joslyn
2018-11-03 16:44 ` [rocko][PATCH 24/25] openssl: update 1.0.2o -> 1.0.2p Robert Joslyn
2018-11-03 16:44 ` [rocko][PATCH 25/25] openssl: update 1.1.0h -> 1.1.0i Robert Joslyn
2018-11-03 17:05 ` ✗ patchtest: failure for Backport openssl 1.0.2p and 1.1.0i Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181103164427.16125-10-robert.joslyn@redrectangle.org \
    --to=robert.joslyn@redrectangle.org \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox