mirror of
git://git.openembedded.org/meta-openembedded
synced 2026-01-01 13:58:06 +00:00
bearssl: Upgrade to latest
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.kiernan@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
parent
aebb88b41f
commit
bf4d7f6284
|
|
@ -1,57 +0,0 @@
|
|||
From 4ba61c59d3488c263d106d486b656854a57ad79f Mon Sep 17 00:00:00 2001
|
||||
From: Jens Rehsack <sno@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 <sno@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
|
||||
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
From 9515448761739d6186e7d07da5b47e368753528c Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@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.khem@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
|
||||
|
||||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user