summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-extended/openwsman
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2023-07-24 22:15:27 -0700
committerKhem Raj <raj.khem@gmail.com>2023-07-24 22:16:28 -0700
commit73eda616eff7549c43d215e01ad9d662c3978d17 (patch)
tree4ff776aef0ab01b7e487dd2351ae8608b0a1c5ea /meta-oe/recipes-extended/openwsman
parentad4a71137e4a3e4e53bc0492a15ce1025f3f9143 (diff)
downloadmeta-openembedded-73eda616eff7549c43d215e01ad9d662c3978d17.tar.gz
openwsman: Link with -lm to get floor() definition
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-extended/openwsman')
-rw-r--r--meta-oe/recipes-extended/openwsman/openwsman/0001-Link-with-libm-for-floor-function.patch71
-rw-r--r--meta-oe/recipes-extended/openwsman/openwsman_2.7.2.bb1
2 files changed, 72 insertions, 0 deletions
diff --git a/meta-oe/recipes-extended/openwsman/openwsman/0001-Link-with-libm-for-floor-function.patch b/meta-oe/recipes-extended/openwsman/openwsman/0001-Link-with-libm-for-floor-function.patch
new file mode 100644
index 000000000..2f4726158
--- /dev/null
+++ b/meta-oe/recipes-extended/openwsman/openwsman/0001-Link-with-libm-for-floor-function.patch
@@ -0,0 +1,71 @@
1From 09101da4efaa5584b7f3f3f3bfa5dbb4d1e26948 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 24 Jul 2023 22:09:21 -0700
4Subject: [PATCH] Link with libm for floor() function
5
6LLD linker finds this missing symbol
7
8arm-yoe-linux-gnueabi-ld.lld: error: undefined reference due to --no-allow-shlib-undefined: floor
9>>> referenced by src/lib/libwsman.so.1.0.0
10
11Upstream-Status: Submitted [https://github.com/Openwsman/openwsman/pull/195]
12Signed-off-by: Khem Raj <raj.khem@gmail.com>
13---
14 CMakeLists.txt | 10 ++++++++++
15 configure.ac | 3 ++-
16 src/lib/CMakeLists.txt | 4 ++++
17 3 files changed, 16 insertions(+), 1 deletion(-)
18
19diff --git a/CMakeLists.txt b/CMakeLists.txt
20index 6e54c66b..507ee633 100644
21--- a/CMakeLists.txt
22+++ b/CMakeLists.txt
23@@ -297,6 +297,16 @@ ELSE(HAVE_LIBDL)
24 SET(HAVE_LIBDL 0)
25 ENDIF(HAVE_LIBDL)
26
27+# m
28+
29+FIND_LIBRARY( HAVE_LIBM "m" )
30+IF(HAVE_LIBM)
31+ SET(M_LIBRARIES ${HAVE_LIBM})
32+ SET(HAVE_LIBM 1)
33+ELSE(HAVE_LIBM)
34+ SET(HAVE_LIBM 0)
35+ENDIF(HAVE_LIBM)
36+
37 # crypt
38
39 FIND_LIBRARY( HAVE_LIBCRYPT "crypt" )
40diff --git a/configure.ac b/configure.ac
41index 125564da..010fa0b6 100644
42--- a/configure.ac
43+++ b/configure.ac
44@@ -128,7 +128,8 @@ daemon \
45 va_copy \
46 memmove \
47 bcopy \
48-gmtime_r
49+gmtime_r \
50+floor
51 )
52 AC_CHECK_FUNC(socket, , AC_CHECK_LIB(socket, socket))
53 AC_CHECK_FUNC(gethostbyname, , AC_CHECK_LIB(nsl, gethostbyname))
54diff --git a/src/lib/CMakeLists.txt b/src/lib/CMakeLists.txt
55index 5c51781f..496fd672 100644
56--- a/src/lib/CMakeLists.txt
57+++ b/src/lib/CMakeLists.txt
58@@ -36,6 +36,10 @@ if( HAVE_LIBDL )
59 TARGET_LINK_LIBRARIES(wsman ${DL_LIBRARIES})
60 endif( HAVE_LIBDL )
61
62+if( HAVE_LIBM )
63+TARGET_LINK_LIBRARIES(wsman ${M_LIBRARIES})
64+endif( HAVE_LIBM )
65+
66 IF( ENABLE_EVENTING_SUPPORT )
67 TARGET_LINK_LIBRARIES( wsman ${WSMAN_CLIENT_PKG} )
68 ENDIF( ENABLE_EVENTING_SUPPORT )
69--
702.41.0
71
diff --git a/meta-oe/recipes-extended/openwsman/openwsman_2.7.2.bb b/meta-oe/recipes-extended/openwsman/openwsman_2.7.2.bb
index 39a9c52a4..1c68b5f43 100644
--- a/meta-oe/recipes-extended/openwsman/openwsman_2.7.2.bb
+++ b/meta-oe/recipes-extended/openwsman/openwsman_2.7.2.bb
@@ -21,6 +21,7 @@ SRC_URI = "git://github.com/Openwsman/openwsman.git;branch=main;protocol=https \
21 file://libssl-is-required-if-eventint-supported.patch \ 21 file://libssl-is-required-if-eventint-supported.patch \
22 file://openwsmand.service \ 22 file://openwsmand.service \
23 file://0001-lock.c-Define-PTHREAD_MUTEX_RECURSIVE_NP-if-undefine.patch \ 23 file://0001-lock.c-Define-PTHREAD_MUTEX_RECURSIVE_NP-if-undefine.patch \
24 file://0001-Link-with-libm-for-floor-function.patch \
24 " 25 "
25 26
26S = "${WORKDIR}/git" 27S = "${WORKDIR}/git"