Install headers so that dependencies can use this to build against. Make `brssl` executable, fixup library soname. Drop patches which change build flags in favour of command line overrides. Add support for static build.
Changes: Thomas Pornin (4): Added generic API for date range validation (with callbacks). Fixed RSA PSS verificatiobn bug (when hash_len != salt_len). Added macro that indicates presence of the time callback feature. Also added C++ compatibility. Fixed spurious warning about old-style prototype. Signed-off-by: Alex Kiernan <alex.kier...@gmail.com> --- Changes in v3: - Drop setting of ${B} which matches the default Changes in v2: - Drop patches which change build flags in favour of command line overrides - Add support for static build ....mk-remove-fixed-command-definitions.patch | 57 ------------------- ...LDFLAGS-when-building-shared-objects.patch | 32 ----------- .../bearssl/bearssl_0.6.bb | 27 +++++---- 3 files changed, 16 insertions(+), 100 deletions(-) delete mode 100644 meta-networking/recipes-connectivity/bearssl/bearssl/0001-conf-Unix.mk-remove-fixed-command-definitions.patch delete mode 100644 meta-networking/recipes-connectivity/bearssl/bearssl/0001-make-Pass-LDFLAGS-when-building-shared-objects.patch diff --git a/meta-networking/recipes-connectivity/bearssl/bearssl/0001-conf-Unix.mk-remove-fixed-command-definitions.patch b/meta-networking/recipes-connectivity/bearssl/bearssl/0001-conf-Unix.mk-remove-fixed-command-definitions.patch deleted file mode 100644 index 00be224990d2..000000000000 --- a/meta-networking/recipes-connectivity/bearssl/bearssl/0001-conf-Unix.mk-remove-fixed-command-definitions.patch +++ /dev/null @@ -1,57 +0,0 @@ -From 4ba61c59d3488c263d106d486b656854a57ad79f Mon Sep 17 00:00:00 2001 -From: Jens Rehsack <s...@netbsd.org> -Date: Thu, 13 Aug 2020 15:26:30 +0200 -Subject: [PATCH 1/2] conf/Unix.mk: remove fixed command definitions - -For cross compiling in Yocto or with appropriate SDKs, commands like -`$CC` are reasonably predefined. - -Upstream-Status: Inappropriate - -Signed-off-by: Jens Rehsack <s...@netbsd.org> ---- - conf/Unix.mk | 10 +++------- - 1 file changed, 3 insertions(+), 7 deletions(-) - -diff --git a/conf/Unix.mk b/conf/Unix.mk -index 02f2b2b..05979fc 100644 ---- a/conf/Unix.mk -+++ b/conf/Unix.mk -@@ -37,23 +37,19 @@ RM = rm -f - MKDIR = mkdir -p - - # C compiler and flags. --CC = cc --CFLAGS = -W -Wall -Os -fPIC - CCOUT = -c -o - - # Static library building tool. --AR = ar - ARFLAGS = -rcs - AROUT = - - # DLL building tool. --LDDLL = cc -+LDDLL = $(CCLD) - LDDLLFLAGS = -shared - LDDLLOUT = -o - - # Static linker. --LD = cc --LDFLAGS = -+LD = $(CCLD) - LDOUT = -o - - # C# compiler; we assume usage of Mono. -@@ -63,7 +59,7 @@ RUNT0COMP = mono T0Comp.exe - # Set the values to 'no' to disable building of the corresponding element - # by default. Building can still be invoked with an explicit target call - # (e.g. 'make dll' to force build the DLL). --#STATICLIB = no -+STATICLIB = no - #DLL = no - #TOOLS = no - #TESTS = no --- -2.17.1 - diff --git a/meta-networking/recipes-connectivity/bearssl/bearssl/0001-make-Pass-LDFLAGS-when-building-shared-objects.patch b/meta-networking/recipes-connectivity/bearssl/bearssl/0001-make-Pass-LDFLAGS-when-building-shared-objects.patch deleted file mode 100644 index 3b341e035545..000000000000 --- a/meta-networking/recipes-connectivity/bearssl/bearssl/0001-make-Pass-LDFLAGS-when-building-shared-objects.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 9515448761739d6186e7d07da5b47e368753528c Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.k...@gmail.com> -Date: Tue, 1 Sep 2020 11:34:33 -0700 -Subject: [PATCH] make: Pass LDFLAGS when building shared objects - -OE passes flags like hash-style via LDFLAGS which alters the linker -defaults, its important to have LDFLAGS in link step even if compiler -driver is used to do linking - -Upstream-Status: Pending - -Signed-off-by: Khem Raj <raj.k...@gmail.com> ---- - mk/Rules.mk | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/mk/Rules.mk b/mk/Rules.mk -index b480bd6..db65125 100644 ---- a/mk/Rules.mk -+++ b/mk/Rules.mk -@@ -344,7 +344,7 @@ $(BEARSSLLIB): $(OBJDIR) $(OBJ) - $(AR) $(ARFLAGS) $(AROUT)$(BEARSSLLIB) $(OBJ) - - $(BEARSSLDLL): $(OBJDIR) $(OBJ) -- $(LDDLL) $(LDDLLFLAGS) $(LDDLLOUT)$(BEARSSLDLL) $(OBJ) -+ $(LDDLL) $(LDDLLFLAGS) $(LDFLAGS) $(LDDLLOUT)$(BEARSSLDLL) $(OBJ) - - $(BRSSL): $(BEARSSLLIB) $(OBJBRSSL) - $(LD) $(LDFLAGS) $(LDOUT)$(BRSSL) $(OBJBRSSL) $(BEARSSLLIB) --- -2.28.0 - diff --git a/meta-networking/recipes-connectivity/bearssl/bearssl_0.6.bb b/meta-networking/recipes-connectivity/bearssl/bearssl_0.6.bb index 777ba2270bc1..1e70a3dec6cb 100644 --- a/meta-networking/recipes-connectivity/bearssl/bearssl_0.6.bb +++ b/meta-networking/recipes-connectivity/bearssl/bearssl_0.6.bb @@ -24,24 +24,29 @@ LICENSE = "MIT" LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=1fc37e1037ae673975fbcb96a98f7191" PV .= "+git${SRCPV}" -SRCREV = "79b1a9996c094ff593ae50bc4edc1f349f39dd6d" +SRCREV = "79c060eea3eea1257797f15ea1608a9a9923aa6f" SRC_URI = "git://www.bearssl.org/git/BearSSL;protocol=https;branch=master \ - file://0001-conf-Unix.mk-remove-fixed-command-definitions.patch \ - file://0002-test-test_x509.c-fix-potential-overflow-issue.patch \ - file://0001-make-Pass-LDFLAGS-when-building-shared-objects.patch \ - " + file://0002-test-test_x509.c-fix-potential-overflow-issue.patch \ + " +SONAME = "libbearssl.so.6" # without compile errors like # <..>/ld: build/obj/ghash_pclmul.o: warning: relocation against `br_ghash_pclmul' in read-only section `.text' CFLAGS += "-fPIC" +EXTRA_OEMAKE += 'CC="${CC}" CFLAGS="${CFLAGS}" LDDLL="${CCLD} ${LDFLAGS}" LD="${CCLD}" LDFLAGS="${LDFLAGS}" \ + BEARSSLDLL=build/${SONAME} \ + LDDLLFLAGS="-shared -Wl,-soname,${SONAME}" \ + ${@ "STATICLIB=no" if d.getVar('DISABLE_STATIC') != "" else "" } \ +' + S = "${WORKDIR}/git" -B = "${S}" do_install() { - mkdir -p ${D}/${bindir} ${D}/${libdir} - install -m 0644 ${B}/build/brssl ${D}/${bindir} - install -m 0644 ${B}/build/libbearssl.so ${D}/${libdir}/libbearssl.so.6.0.0 - ln -s libbearssl.so.6.0.0 ${D}/${libdir}/libbearssl.so.6 - ln -s libbearssl.so.6.0.0 ${D}/${libdir}/libbearssl.so + install -d ${D}/${bindir} ${D}/${libdir} ${D}/${includedir} + install -m 0755 ${B}/build/brssl ${D}/${bindir} + oe_libinstall -C ${B}/build libbearssl ${D}/${libdir} + for inc in ${S}/inc/*.h; do + install -m 0644 "${inc}" ${D}/${includedir} + done } -- 2.39.0
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#107781): https://lists.openembedded.org/g/openembedded-devel/message/107781 Mute This Topic: https://lists.openembedded.org/mt/103348705/21656 Group Owner: openembedded-devel+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-