diff options
author | Ming Liu <peter.x.liu@external.atlascopco.com> | 2017-08-30 17:15:28 +0200 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2017-09-07 10:59:20 +0200 |
commit | ffc78c155c36c657c4648ee303f108b164fef4b8 (patch) | |
tree | 59e7d2b3227887cbb038e224a4b282066612dfe5 | |
parent | 7c6a47177c1c9e61fc3e26098277786563c575af (diff) | |
download | meta-openembedded-ffc78c155c36c657c4648ee303f108b164fef4b8.tar.gz |
json-spirit: link to libatomic
In commit ac2a6d2b5d69937577effcb8bb2149651bac0176:
[ json-spirit: Add -latomic to LDFLAGS ]
I added '-latomic' to LDFLAGS, which worked for clang 3.9 but it does
not work for clang 5.0, seems the linking order matters for clang 5.0,
it should be after -ljson_spirit.
Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-rw-r--r-- | meta-oe/recipes-devtools/json-spirit/json-spirit/0001-Link-to-libatomic.patch | 64 | ||||
-rw-r--r-- | meta-oe/recipes-devtools/json-spirit/json-spirit_4.08.bb | 3 |
2 files changed, 65 insertions, 2 deletions
diff --git a/meta-oe/recipes-devtools/json-spirit/json-spirit/0001-Link-to-libatomic.patch b/meta-oe/recipes-devtools/json-spirit/json-spirit/0001-Link-to-libatomic.patch new file mode 100644 index 000000000..4c8c7b98d --- /dev/null +++ b/meta-oe/recipes-devtools/json-spirit/json-spirit/0001-Link-to-libatomic.patch | |||
@@ -0,0 +1,64 @@ | |||
1 | From bbac9ac3e391253bc1f90cf0f70a2ce1aac9511f Mon Sep 17 00:00:00 2001 | ||
2 | From: Ming Liu <liu.ming50@gmail.com> | ||
3 | Date: Wed, 30 Aug 2017 16:50:56 +0200 | ||
4 | Subject: [PATCH] Link to libatomic | ||
5 | |||
6 | This is needed for clang compiler. | ||
7 | |||
8 | Upstream-Status: Pending | ||
9 | |||
10 | Signed-off-by: Ming Liu <liu.ming50@gmail.com> | ||
11 | --- | ||
12 | json_demo/CMakeLists.txt | 2 +- | ||
13 | json_headers_only_demo/CMakeLists.txt | 2 +- | ||
14 | json_map_demo/CMakeLists.txt | 2 +- | ||
15 | json_test/CMakeLists.txt | 2 +- | ||
16 | 4 files changed, 4 insertions(+), 4 deletions(-) | ||
17 | |||
18 | diff --git a/json_demo/CMakeLists.txt b/json_demo/CMakeLists.txt | ||
19 | index b1d3c6a..0dfd308 100644 | ||
20 | --- a/json_demo/CMakeLists.txt | ||
21 | +++ b/json_demo/CMakeLists.txt | ||
22 | @@ -5,5 +5,5 @@ FIND_PACKAGE(Boost 1.34 REQUIRED) | ||
23 | INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIR}) | ||
24 | |||
25 | ADD_EXECUTABLE(json_demo ${JSON_DEMO_SRCS}) | ||
26 | -TARGET_LINK_LIBRARIES(json_demo json_spirit) | ||
27 | +TARGET_LINK_LIBRARIES(json_demo json_spirit -latomic) | ||
28 | |||
29 | diff --git a/json_headers_only_demo/CMakeLists.txt b/json_headers_only_demo/CMakeLists.txt | ||
30 | index a3c787a..6eae11e 100644 | ||
31 | --- a/json_headers_only_demo/CMakeLists.txt | ||
32 | +++ b/json_headers_only_demo/CMakeLists.txt | ||
33 | @@ -5,5 +5,5 @@ FIND_PACKAGE(Boost 1.34 REQUIRED) | ||
34 | INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIR}) | ||
35 | |||
36 | ADD_EXECUTABLE(json_headers_only_demo ${JSON_HEADERS_ONLY_DEMO_SRCS}) | ||
37 | -TARGET_LINK_LIBRARIES(json_headers_only_demo json_spirit) | ||
38 | +TARGET_LINK_LIBRARIES(json_headers_only_demo json_spirit -latomic) | ||
39 | |||
40 | diff --git a/json_map_demo/CMakeLists.txt b/json_map_demo/CMakeLists.txt | ||
41 | index 599006a..e3e45e8 100644 | ||
42 | --- a/json_map_demo/CMakeLists.txt | ||
43 | +++ b/json_map_demo/CMakeLists.txt | ||
44 | @@ -5,5 +5,5 @@ FIND_PACKAGE(Boost 1.34 REQUIRED) | ||
45 | INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIR}) | ||
46 | |||
47 | ADD_EXECUTABLE(json_map_demo ${JSON_MAP_DEMO_SRCS}) | ||
48 | -TARGET_LINK_LIBRARIES(json_map_demo json_spirit) | ||
49 | +TARGET_LINK_LIBRARIES(json_map_demo json_spirit -latomic) | ||
50 | |||
51 | diff --git a/json_test/CMakeLists.txt b/json_test/CMakeLists.txt | ||
52 | index 38ffa7f..1ec1365 100644 | ||
53 | --- a/json_test/CMakeLists.txt | ||
54 | +++ b/json_test/CMakeLists.txt | ||
55 | @@ -11,5 +11,5 @@ FIND_PACKAGE(Boost 1.34 REQUIRED) | ||
56 | INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIR}) | ||
57 | |||
58 | ADD_EXECUTABLE(json_test ${JSON_TEST_SRCS}) | ||
59 | -TARGET_LINK_LIBRARIES(json_test json_spirit) | ||
60 | +TARGET_LINK_LIBRARIES(json_test json_spirit -latomic) | ||
61 | |||
62 | -- | ||
63 | 2.7.4 | ||
64 | |||
diff --git a/meta-oe/recipes-devtools/json-spirit/json-spirit_4.08.bb b/meta-oe/recipes-devtools/json-spirit/json-spirit_4.08.bb index 2f456bf64..c7c1ad1ec 100644 --- a/meta-oe/recipes-devtools/json-spirit/json-spirit_4.08.bb +++ b/meta-oe/recipes-devtools/json-spirit/json-spirit_4.08.bb | |||
@@ -11,14 +11,13 @@ LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=278ef6183dec4aae1524fccc4b0113c9" | |||
11 | 11 | ||
12 | SRC_URI = "file://json_spirit_v${PV}.zip \ | 12 | SRC_URI = "file://json_spirit_v${PV}.zip \ |
13 | file://0001-Adjust-the-cmake-files.patch \ | 13 | file://0001-Adjust-the-cmake-files.patch \ |
14 | file://0001-Link-to-libatomic.patch \ | ||
14 | " | 15 | " |
15 | 16 | ||
16 | S = "${WORKDIR}/json_spirit_v${PV}" | 17 | S = "${WORKDIR}/json_spirit_v${PV}" |
17 | 18 | ||
18 | DEPENDS = "boost" | 19 | DEPENDS = "boost" |
19 | 20 | ||
20 | LDFLAGS += "-Wl,--as-needed -latomic -Wl,--no-as-needed" | ||
21 | |||
22 | inherit cmake | 21 | inherit cmake |
23 | 22 | ||
24 | FILES_${PN}-dev += "${datadir}/cmake/Modules/FindLibJsonSpirit.cmake" | 23 | FILES_${PN}-dev += "${datadir}/cmake/Modules/FindLibJsonSpirit.cmake" |