• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
  • Help
    • Online help
    • Learn Git
    • Welcome to Bitbucket
    • Keyboard shortcuts
  • Log In
Alexander Dahl
  1. Alexander Dahl

buildroot

Public
Actions
  • Clone
  • Compare

Learn more about cloning repositories

You have read-only access

Navigation
  • Source
  • Commits
  • Branches
  • All Branches Graph
  • Forks
  1. Alexander Dahl
  2. buildroot

Source

buildroot/package/bctoolbox/0001-Fix-Libs.private-flags-for-mbedtls.patch
Jörg KrauseJörg Krause committed ec52c7427f115 Feb 2017
Raw file
Source viewDiff to previous
xxxxxxxxxx
 
1
From c0b3dbb43aa3a38c47311556c85eadc6072e2d68 Mon Sep 17 00:00:00 2001
2
From: =?UTF-8?q?J=C3=B6rg=20Krause?= <joerg.krause@embedded.rocks>
3
Date: Tue, 14 Feb 2017 22:02:26 +0100
4
Subject: [PATCH] Fix Libs.private flags for mbedtls
5
MIME-Version: 1.0
6
Content-Type: text/plain; charset=UTF-8
7
Content-Transfer-Encoding: 8bit
8
​
9
Static linking with bctoolbox fails when using pkg-config as the
10
generated bctoolbox.pc file only consists of an '-L' string without any
11
search path or libraries flags.
12
​
13
That's because of an typo in `mbedtls_library_path`. However,
14
`mbedtls_library_path` contains a string of the mbedtls libraries
15
concatenated by an ';' which cannot be parsed by pkg-config.
16
​
17
Therefore, use `MBEDTLS_LIBRARY` instead of `MBEDTLS_LIBRARIES` to get
18
the library path.
19
​
20
Furthermore, add the three mbedtls libraries *mbedtls*, *mbedcrypto*, and
21
*mbedx509* to `LIBS_PRIVATE` so these libraries are added to the
22
`Libs.private` field of bctoolbox.pc.
23
​
24
Upstream status: Pending
25
https://github.com/BelledonneCommunications/bctoolbox/pull/4
26
​
27
Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
28
---
29
 CMakeLists.txt | 4 ++--
30
 1 file changed, 2 insertions(+), 2 deletions(-)
31
​
32
diff --git a/CMakeLists.txt b/CMakeLists.txt
33
index ed7aa00..4127f0e 100644
34
--- a/CMakeLists.txt
35
+++ b/CMakeLists.txt
36
@@ -103,8 +103,8 @@ else()
37
 endif()
38
 
39
 if(MBEDTLS_FOUND)
40
-   get_filename_component(mbedtls_library_path "${MBEDTLS_LIBRARIES}" PATH)
41
-   set(LIBS_PRIVATE "${LIBS_PRIVATE} -L${mbedlts_library_path}")
42
+   get_filename_component(mbedtls_library_path "${MBEDTLS_LIBRARY}" PATH)
43
+   set(LIBS_PRIVATE "${LIBS_PRIVATE} -L${mbedtls_library_path} -lmbedtls -lmbedcrypto -lmbedx509")
44
 endif()
45
 if(POLARSSL_FOUND)
46
    get_filename_component(polarssl_library_path "${POLARSSL_LIBRARIES}" PATH)
47
-- 
48
2.11.1
49
​
  • Git repository management for enterprise teams powered by Atlassian Bitbucket
  • Atlassian Bitbucket v6.7.2
  • Documentation
  • Request a feature
  • About
  • Contact Atlassian
Atlassian

Everything looks good. We'll let you know here if there's anything you should know about.