mirror of
https://github.com/MiyooCFW/buildroot.git
synced 2025-09-27 22:24:19 +03:00
Merge from bittboy/buildroot@26c91a9
This commit is contained in:
@@ -1,49 +1,37 @@
|
||||
From c0b3dbb43aa3a38c47311556c85eadc6072e2d68 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?J=C3=B6rg=20Krause?= <joerg.krause@embedded.rocks>
|
||||
Date: Tue, 14 Feb 2017 22:02:26 +0100
|
||||
Subject: [PATCH] Fix Libs.private flags for mbedtls
|
||||
From b7f14a800bbdad193f45695bc5b8c5173f3882ba Mon Sep 17 00:00:00 2001
|
||||
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
Date: Sun, 10 Feb 2019 17:51:05 +0100
|
||||
Subject: [PATCH] CMakeLists.txt: fix mbedtls libraries in bctoolbox.pc
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Static linking with bctoolbox fails when using pkg-config as the
|
||||
generated bctoolbox.pc file only consists of an '-L' string without any
|
||||
search path or libraries flags.
|
||||
|
||||
That's because of an typo in `mbedtls_library_path`. However,
|
||||
`mbedtls_library_path` contains a string of the mbedtls libraries
|
||||
concatenated by an ';' which cannot be parsed by pkg-config.
|
||||
|
||||
Therefore, use `MBEDTLS_LIBRARY` instead of `MBEDTLS_LIBRARIES` to get
|
||||
the library path.
|
||||
|
||||
Furthermore, add the three mbedtls libraries *mbedtls*, *mbedcrypto*, and
|
||||
*mbedx509* to `LIBS_PRIVATE` so these libraries are added to the
|
||||
`Libs.private` field of bctoolbox.pc.
|
||||
|
||||
Upstream status: Pending
|
||||
bctoolbox.pc should not contain the full libraries path, path should be
|
||||
given by -L and library names by -l
|
||||
So sent back the fix already suggested by Jörg Krause in
|
||||
https://github.com/BelledonneCommunications/bctoolbox/pull/4
|
||||
|
||||
Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
[Upstream status:
|
||||
https://github.com/BelledonneCommunications/bctoolbox/pull/7]
|
||||
---
|
||||
CMakeLists.txt | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
CMakeLists.txt | 5 ++---
|
||||
1 file changed, 2 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index ed7aa00..4127f0e 100644
|
||||
index 29f3eb6..b2f26c2 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -103,8 +103,8 @@ else()
|
||||
@@ -101,9 +101,8 @@ else()
|
||||
endif()
|
||||
|
||||
if(MBEDTLS_FOUND)
|
||||
- get_filename_component(mbedtls_library_path "${MBEDTLS_LIBRARIES}" PATH)
|
||||
- set(LIBS_PRIVATE "${LIBS_PRIVATE} -L${mbedlts_library_path}")
|
||||
- string(REPLACE ";" " " MBEDTLS_LIBRARIES_STR "${MBEDTLS_LIBRARIES}")
|
||||
- set(LIBS_PRIVATE "${LIBS_PRIVATE} ${MBEDTLS_LIBRARIES_STR}")
|
||||
+ get_filename_component(mbedtls_library_path "${MBEDTLS_LIBRARY}" PATH)
|
||||
+ set(LIBS_PRIVATE "${LIBS_PRIVATE} -L${mbedtls_library_path} -lmbedtls -lmbedcrypto -lmbedx509")
|
||||
endif()
|
||||
if(POLARSSL_FOUND)
|
||||
get_filename_component(polarssl_library_path "${POLARSSL_LIBRARIES}" PATH)
|
||||
--
|
||||
2.11.1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user