Skip to contentSkip to conversation

rwmem: Update to latest

PATCH In review Khem Raj 2 participants 7 messages Dec 9, 2018 – Dec 20, 2018

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH v2 1/1 rwmem: Update to latest

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

---
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
recipes-bsp/rwmem/rwmem/0001-Use-CMake-provided-vars-for-ar-and-ranlib.patch new file +34 -0
new file mode 100644
index 00000000..d72f427d
@@ -0,0 +1,34 @@
+From ee3bbdaae568118b4aad453c8fbb1ec648e8fbf2 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+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 <[email protected]>
+---
+ 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
+
recipes-bsp/rwmem/rwmem_1.1.bb +10 -4
index 2848e1cd..62c33a3b 100644
@@ -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
 }
Signature · 1 line
2.19.2
author
#1 lore raw

ping^1

Quoted 83 lines · Khem Raj

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

---
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
recipes-bsp/rwmem/rwmem/0001-Use-CMake-provided-vars-for-ar-and-ranlib.patch new file +34 -0
new file mode 100644
index 00000000..d72f427d
@@ -0,0 +1,34 @@
+From ee3bbdaae568118b4aad453c8fbb1ec648e8fbf2 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+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 <[email protected]>
+---
+ 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
+
recipes-bsp/rwmem/rwmem_1.1.bb +10 -5
index 2848e1cd..62c33a3b 100644
@@ -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

#2 lore raw
Quoted 1 line · Khem Raj

ping^1

Yeah, I've been meaning to reply, just didn't have time.

Mostly I'm fine with the update. But I don't like hidden submodules instead of direct dependencies. I already made pybind11 recipe for Tomi's kms++ some time ago (though upstreaming it to oe-core didn't work and I didn't find time to follow up). I haven't looked at "inih" module yet, but maybe should be a separate recipe as well?

BTW, should it DEPENDS on python3 or inherit python3native?

Denys

Quoted 89 lines · Khem Raj
Quoted 83 lines

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

---
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
recipes-bsp/rwmem/rwmem/0001-Use-CMake-provided-vars-for-ar-and-ranlib.patch new file +34 -0
new file mode 100644
index 00000000..d72f427d
@@ -0,0 +1,34 @@
+From ee3bbdaae568118b4aad453c8fbb1ec648e8fbf2 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+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 <[email protected]>
+---
+ 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
+
recipes-bsp/rwmem/rwmem_1.1.bb +10 -5
index 2848e1cd..62c33a3b 100644
@@ -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

Signature · 4 lines
_______________________________________________
meta-ti mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-ti
#3 lore raw
Quoted 10 lines · Denys Dmytriyenko
Quoted 1 line · Khem Raj

ping^1

Yeah, I've been meaning to reply, just didn't have time.

Mostly I'm fine with the update. But I don't like hidden submodules instead of direct dependencies. I already made pybind11 recipe for Tomi's kms++ some time ago (though upstreaming it to oe-core didn't work and I didn't find time to follow up). I haven't looked at "inih" module yet, but maybe should be a separate recipe as well?

http://cgit.openembedded.org/meta-openembedded/tree/meta-oe/recipes-support/inih/libinih_git.bb

Quoted 99 lines

BTW, should it DEPENDS on python3 or inherit python3native?

Denys

Quoted 89 lines · Khem Raj
Quoted 83 lines

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

---
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
recipes-bsp/rwmem/rwmem/0001-Use-CMake-provided-vars-for-ar-and-ranlib.patch new file +34 -0
new file mode 100644
index 00000000..d72f427d
@@ -0,0 +1,34 @@
+From ee3bbdaae568118b4aad453c8fbb1ec648e8fbf2 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+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 <[email protected]>
+---
+ 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
+
recipes-bsp/rwmem/rwmem_1.1.bb +10 -5
index 2848e1cd..62c33a3b 100644
@@ -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

Signature · 4 lines
_______________________________________________
meta-ti mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-ti
Signature · 4 lines
_______________________________________________
meta-ti mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-ti
#4 lore raw
Quoted 6 lines · Denys Dmytriyenko
Quoted 5 lines · Denys Dmytriyenko
Quoted 1 line · Khem Raj

ping^1

Yeah, I've been meaning to reply, just didn't have time.

Quoted 7 lines
Quoted 5 lines

Mostly I'm fine with the update. But I don't like hidden submodules instead of direct dependencies. I already made pybind11 recipe for Tomi's kms++ some time ago (though upstreaming it to oe-core didn't work and I didn't find time to follow up). I haven't looked at "inih" module yet, but maybe should be a separate recipe as well?

http://cgit.openembedded.org/meta-openembedded/tree/meta-oe/recipes-support/inih/libinih_git.bb

It appears to be an 8-year old fork of the original. Doesn't seem to work, lacks some methods...

Quoted 104 lines
Quoted 99 lines

BTW, should it DEPENDS on python3 or inherit python3native?

Denys

Quoted 89 lines · Khem Raj
Quoted 83 lines

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

---
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
recipes-bsp/rwmem/rwmem/0001-Use-CMake-provided-vars-for-ar-and-ranlib.patch new file +34 -0
new file mode 100644
index 00000000..d72f427d
@@ -0,0 +1,34 @@
+From ee3bbdaae568118b4aad453c8fbb1ec648e8fbf2 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+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 <[email protected]>
+---
+ 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
+
recipes-bsp/rwmem/rwmem_1.1.bb +10 -5
index 2848e1cd..62c33a3b 100644
@@ -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

Signature · 4 lines
_______________________________________________
meta-ti mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-ti
Signature · 4 lines
_______________________________________________
meta-ti mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-ti
Signature · 4 lines
_______________________________________________
meta-ti mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-ti
author
#5 lore raw
In reply to Denys Dmytriyenko
Quoted 11 lines · Denys Dmytriyenko
Quoted 1 line · Khem Raj

ping^1

Yeah, I've been meaning to reply, just didn't have time.

Mostly I'm fine with the update. But I don't like hidden submodules instead of direct dependencies. I already made pybind11 recipe for Tomi's kms++ some time ago (though upstreaming it to oe-core didn't work and I didn't find time to follow up). I haven't looked at "inih" module yet, but maybe should be a separate recipe as well?

thats ok but usually if they are doing static linking its better to keep the gitsubmods or maybe at best use multiple SRC_URIs for each component, I think its just inviting more work to keep different recipes in sync otherwise. These new recipes may interfere with other packages
etc.

Quoted 3 lines

BTW, should it DEPENDS on python3 or inherit python3native?

its needed during runtime.

Quoted 92 lines

Denys

Quoted 89 lines · Khem Raj
Quoted 81 lines

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

---
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
recipes-bsp/rwmem/rwmem/0001-Use-CMake-provided-vars-for-ar-and-ranlib.patch new file +34 -0
new file mode 100644
index 00000000..d72f427d
@@ -0,0 +1,34 @@
+From ee3bbdaae568118b4aad453c8fbb1ec648e8fbf2 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+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 <[email protected]>
+---
+ 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
+
recipes-bsp/rwmem/rwmem_1.1.bb +10 -5
index 2848e1cd..62c33a3b 100644
@@ -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
 }
--
Quoted 2 lines

2.19.2

--
_______________________________________________
meta-ti mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-ti

#6 lore raw
Quoted 13 lines · Khem Raj
Quoted 11 lines · Denys Dmytriyenko
Quoted 1 line · Khem Raj

ping^1

Yeah, I've been meaning to reply, just didn't have time.

Mostly I'm fine with the update. But I don't like hidden submodules instead of direct dependencies. I already made pybind11 recipe for Tomi's kms++ some time ago (though upstreaming it to oe-core didn't work and I didn't find time to follow up). I haven't looked at "inih" module yet, but maybe should be a separate recipe as well?

Quoted 6 lines

thats ok but usually if they are doing static linking its better to keep the gitsubmods or maybe at best use multiple SRC_URIs for each component, I think its just inviting more work to keep different recipes in sync otherwise. These new recipes may interfere with other packages
etc.

Maybe it's more work, but it's more correct and more controlled environment, rather than letting components pull whatever dependencies they like...

Quoted 4 lines
Quoted 2 lines

BTW, should it DEPENDS on python3 or inherit python3native?

its needed during runtime.

I thought the recommendation was to RDEPENDS on python3-core and/or specific modules, instead of pulling entire pythong3 into build dependencies.

Quoted 92 lines
Quoted 92 lines

Denys

Quoted 89 lines · Khem Raj
Quoted 81 lines

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

---
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
recipes-bsp/rwmem/rwmem/0001-Use-CMake-provided-vars-for-ar-and-ranlib.patch new file +34 -0
new file mode 100644
index 00000000..d72f427d
@@ -0,0 +1,34 @@
+From ee3bbdaae568118b4aad453c8fbb1ec648e8fbf2 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+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 <[email protected]>
+---
+ 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
+
recipes-bsp/rwmem/rwmem_1.1.bb +10 -5
index 2848e1cd..62c33a3b 100644
@@ -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
 }
--
Quoted 2 lines

2.19.2

--
_______________________________________________
meta-ti mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-ti