All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH V2] rwmem: Update to latest
@ 2018-12-09  7:59 Khem Raj
  2018-12-17 18:58 ` Khem Raj
  0 siblings, 1 reply; 7+ messages in thread
From: Khem Raj @ 2018-12-09  7:59 UTC (permalink / raw)
  To: meta-ti

New versions use CMake
Correct detection of nm/ranlib/ar for LTO

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
v2: Fix nm/ar/ranlib detection needed for LTO

 ...Make-provided-vars-for-ar-and-ranlib.patch | 34 +++++++++++++++++++
 recipes-bsp/rwmem/rwmem_1.1.bb                | 14 +++++---
 2 files changed, 44 insertions(+), 4 deletions(-)
 create mode 100644 recipes-bsp/rwmem/rwmem/0001-Use-CMake-provided-vars-for-ar-and-ranlib.patch

diff --git a/recipes-bsp/rwmem/rwmem/0001-Use-CMake-provided-vars-for-ar-and-ranlib.patch b/recipes-bsp/rwmem/rwmem/0001-Use-CMake-provided-vars-for-ar-and-ranlib.patch
new file mode 100644
index 00000000..d72f427d
--- /dev/null
+++ b/recipes-bsp/rwmem/rwmem/0001-Use-CMake-provided-vars-for-ar-and-ranlib.patch
@@ -0,0 +1,34 @@
+From ee3bbdaae568118b4aad453c8fbb1ec648e8fbf2 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 8 Dec 2018 22:48:23 -0800
+Subject: [PATCH] Use CMake provided vars for ar and ranlib
+
+hardcoding them means we may not be able to cross compile the package
+reliably as build host may or may not have gcc-ar and gcc-ranlib
+installed, using the cross tools is the correct thing to do here
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ CMakeLists.txt | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 5e7f327..e36fca0 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -50,8 +50,8 @@ if (NOT ${U_CMAKE_BUILD_TYPE} MATCHES DEBUG)
+ 	if (HAS_LTO_FLAG)
+ 		set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -flto")
+ 		set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -flto")
+-		set(CMAKE_AR gcc-ar)
+-		set(CMAKE_RANLIB gcc-ranlib)
++		set(CMAKE_AR ${CMAKE_CXX_COMPILER_AR})
++		set(CMAKE_RANLIB ${CMAKE_CXX_COMPILER_RANLIB})
+ 	endif()
+ endif()
+ 
+-- 
+2.19.2
+
diff --git a/recipes-bsp/rwmem/rwmem_1.1.bb b/recipes-bsp/rwmem/rwmem_1.1.bb
index 2848e1cd..62c33a3b 100644
--- a/recipes-bsp/rwmem/rwmem_1.1.bb
+++ b/recipes-bsp/rwmem/rwmem_1.1.bb
@@ -2,12 +2,18 @@ SUMMARY = "A small tool to read/write memory"
 LICENSE = "GPLv2+"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263"
 
-SRCREV = "54904b8873b265d8f1faf82617c2f04814c102c6"
-SRC_URI = "git://github.com/tomba/rwmem.git"
+SRCREV = "ad00619005654f9cde5c2ea2ed2277d1d3ad2f26"
+SRC_URI = "gitsm://github.com/tomba/rwmem.git \
+           file://0001-Use-CMake-provided-vars-for-ar-and-ranlib.patch \
+          "
 
 S = "${WORKDIR}/git"
 
+inherit cmake pkgconfig
+
+DEPENDS += "python3"
+
 do_install() {
-	install -d ${D}${bindir}
-	install -m 0755 rwmem ${D}${bindir}
+	install -D -m 0755 ${B}/bin/rwmem ${D}${bindir}/rwmem
+	install -D -m 0644 ${B}/lib/librwmem.a ${D}${libdir}/librwmem.a
 }
-- 
2.19.2



^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-12-20  3:15 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-09  7:59 [PATCH V2] rwmem: Update to latest Khem Raj
2018-12-17 18:58 ` Khem Raj
2018-12-17 19:07   ` Denys Dmytriyenko
2018-12-17 19:13     ` Denys Dmytriyenko
2018-12-20  3:15       ` Denys Dmytriyenko
2018-12-17 19:17     ` Khem Raj
2018-12-17 19:26       ` Denys Dmytriyenko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.