summaryrefslogtreecommitdiffstats
path: root/recipes-tpm/swtpm/files/fix_lib_search_path.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-tpm/swtpm/files/fix_lib_search_path.patch')
-rw-r--r--recipes-tpm/swtpm/files/fix_lib_search_path.patch64
1 files changed, 64 insertions, 0 deletions
diff --git a/recipes-tpm/swtpm/files/fix_lib_search_path.patch b/recipes-tpm/swtpm/files/fix_lib_search_path.patch
new file mode 100644
index 0000000..28aca4a
--- /dev/null
+++ b/recipes-tpm/swtpm/files/fix_lib_search_path.patch
@@ -0,0 +1,64 @@
1From 85706ceb6877ade3b589d3c390abf5b3492bb718 Mon Sep 17 00:00:00 2001
2From: Armin Kuster <akuster808@gmail.com>
3Date: Thu, 13 Oct 2016 02:03:56 -0700
4Subject: [PATCH] swtpm: add new package
5
6Upstream-Status: Inappropriate [OE config]
7
8Signed-off-by: Armin Kuster <akuster808@gmail.com>
9
10Rebased to current tip.
11
12Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
13
14---
15 configure.ac | 32 ++++++++++----------------------
16 1 file changed, 10 insertions(+), 22 deletions(-)
17
18diff --git a/configure.ac b/configure.ac
19index c4a9c6d..6267f64 100644
20--- a/configure.ac
21+++ b/configure.ac
22@@ -395,29 +395,17 @@ CFLAGS="$CFLAGS -Wformat -Wformat-security"
23 dnl We have to make sure libtpms is using the same crypto library
24 dnl to avoid problems
25 AC_MSG_CHECKING([the crypto library libtpms is using])
26-dirs=$($CC $CFLAGS -Xlinker --verbose 2>/dev/null | \
27- sed -n '/SEARCH_DIR/p' | \
28- sed 's/SEARCH_DIR("=\?\(@<:@^"@:>@\+\)"); */\1\n/g')
29-for dir in $dirs $LIBRARY_PATH; do
30- if test -r $dir/libtpms.so; then
31- if test -n "`ldd $dir/libtpms.so | grep libcrypto.so`"; then
32- libtpms_cryptolib="openssl"
33- break
34- fi
35- if test -n "`ldd $dir/libtpms.so | grep libnss3.so`"; then
36- libtpms_cryptolib="freebl"
37- break
38- fi
39+dir="$SEARCH_DIR"
40+if test -r $dir/libtpms.so; then
41+ if test -n "`ldd $dir/libtpms.so | grep libcrypto.so`"; then
42+ libtpms_cryptolib="openssl"
43+ break
44 fi
45- case $host_os in
46- cygwin)
47- if test -r $dir/libtpms.a; then
48- if test -n "$(nm $dir/libtpms.a | grep "U AES_encrypt")"; then
49- libtpms_cryptolib="openssl"
50- fi
51- fi
52- esac
53-done
54+ if test -n "`ldd $dir/libtpms.so | grep libnss3.so`"; then
55+ libtpms_cryptolib="freebl"
56+ break
57+ fi
58+fi
59
60 if test -z "$libtpms_cryptolib"; then
61 AC_MSG_ERROR([Could not determine libtpms crypto library.])
62--
632.1.4
64