Skip to contentSkip to conversation

rwmem: Update to 2.0-rc2+

PATCH Superseded Khem Raj 2 participants 7 messages Sep 26, 2019

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 rwmem: Update to 2.0-rc2+

- New versions uses CMake and extra modules
- Correct detection of nm/ranlib/ar for LTO
- Fix build with clang/libc++

---
 ...Make-provided-vars-for-ar-and-ranlib.patch | 34 +++++++++++++++++++
 ....h-Include-cerrno-for-errno-definiti.patch | 24 +++++++++++++
 recipes-bsp/rwmem/rwmem_1.1.bb                | 13 -------
 recipes-bsp/rwmem/rwmem_1.2.bb                | 27 +++++++++++++++
 4 files changed, 85 insertions(+), 13 deletions(-)
 create mode 100644 recipes-bsp/rwmem/rwmem/0001-Use-CMake-provided-vars-for-ar-and-ranlib.patch
 create mode 100644 recipes-bsp/rwmem/rwmem/0001-librwmem-helpers.h-Include-cerrno-for-errno-definiti.patch
 delete mode 100644 recipes-bsp/rwmem/rwmem_1.1.bb
 create mode 100644 recipes-bsp/rwmem/rwmem_1.2.bb
recipes-bsp/rwmem/rwmem/0001-Use-CMake-provided-vars-for-ar-and-ranlib.patch new file +34 -0
new file mode 100644
index 00000000..79968f32
@@ -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: Submitted [https://github.com/tomba/rwmem/pull/5]
+
+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/0001-librwmem-helpers.h-Include-cerrno-for-errno-definiti.patch new file +24 -0
new file mode 100644
index 00000000..9f33fa5e
@@ -0,0 +1,24 @@
+From 9f1d52590336caeab8038cdd015294df2e5d8c1f Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Fri, 1 Feb 2019 23:47:04 -0800
+Subject: [PATCH] librwmem/helpers.h: Include <cerrno> for errno definitions
+
+this is found with libc++
+
+Upstream-Status: Submitted [https://github.com/tomba/rwmem/pull/5]
+Signed-off-by: Khem Raj <[email protected]>
+---
+ librwmem/helpers.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/librwmem/helpers.h b/librwmem/helpers.h
+index ccc6c9e..686943e 100644
+--- a/librwmem/helpers.h
++++ b/librwmem/helpers.h
+@@ -1,5 +1,6 @@
+ #pragma once
+ 
++#include <cerrno>
+ #include <string>
+ #include <vector>
+ #include <string.h>
recipes-bsp/rwmem/rwmem_1.1.bb deleted +0 -13
deleted file mode 100644
index 2848e1cd..00000000
@@ -1,13 +0,0 @@
-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"
-
-S = "${WORKDIR}/git"
-
-do_install() {
-	install -d ${D}${bindir}
-	install -m 0755 rwmem ${D}${bindir}
-}
recipes-bsp/rwmem/rwmem_1.2.bb new file +27 -0
new file mode 100644
index 00000000..c4d2bc49
@@ -0,0 +1,27 @@
+SUMMARY = "A small tool to read/write memory"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+PV .= "+git${SRCPV}"
+
+SRCREV_rwmem = "7e5ca9802c1b8ff1f6407c19dfd0b9415501bb11"
+SRCREV_inih = "4b10c654051a86556dfdb634c891b6c3224c4109"
+SRCREV_pybind11 = "9a19306fbf30642ca331d0ec88e7da54a96860f9"
+
+SRCREV_FORMAT = "rwmem_inih_pybind11"
+
+SRC_URI = "git://github.com/tomba/rwmem.git;protocol=https;name=rwmem \
+           git://github.com/benhoyt/inih.git;protocol=https;name=inih;nobranch=1;destsuffix=git/ext/inih \
+           git://github.com/pybind/pybind11.git;protocol=https;name=pybind11;nobranch=1;destsuffix=git/ext/pybind11 \
+           file://0001-Use-CMake-provided-vars-for-ar-and-ranlib.patch \
+           file://0001-librwmem-helpers.h-Include-cerrno-for-errno-definiti.patch \
+           "
+
+S = "${WORKDIR}/git"
+
+inherit cmake pkgconfig python3native
+
+do_install() {
+	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.23.0
#1 lore raw

Thanks! It's been on my todo list lately...

There's pybind11 recipe in meta-openembedded/meta-python that I originally submitted back in 2016, but unfortunately meta-ti does not depend on that layer and probably shouldn't for now.

Quoted 146 lines · Khem Raj

- New versions uses CMake and extra modules
- Correct detection of nm/ranlib/ar for LTO
- Fix build with clang/libc++

---
 ...Make-provided-vars-for-ar-and-ranlib.patch | 34 +++++++++++++++++++
 ....h-Include-cerrno-for-errno-definiti.patch | 24 +++++++++++++
 recipes-bsp/rwmem/rwmem_1.1.bb                | 13 -------
 recipes-bsp/rwmem/rwmem_1.2.bb                | 27 +++++++++++++++
 4 files changed, 85 insertions(+), 13 deletions(-)
 create mode 100644 recipes-bsp/rwmem/rwmem/0001-Use-CMake-provided-vars-for-ar-and-ranlib.patch
 create mode 100644 recipes-bsp/rwmem/rwmem/0001-librwmem-helpers.h-Include-cerrno-for-errno-definiti.patch
 delete mode 100644 recipes-bsp/rwmem/rwmem_1.1.bb
 create mode 100644 recipes-bsp/rwmem/rwmem_1.2.bb
recipes-bsp/rwmem/rwmem/0001-Use-CMake-provided-vars-for-ar-and-ranlib.patch new file +34 -0
new file mode 100644
index 00000000..79968f32
@@ -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: Submitted [https://github.com/tomba/rwmem/pull/5]
+
+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/0001-librwmem-helpers.h-Include-cerrno-for-errno-definiti.patch new file +24 -0
new file mode 100644
index 00000000..9f33fa5e
@@ -0,0 +1,24 @@
+From 9f1d52590336caeab8038cdd015294df2e5d8c1f Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Fri, 1 Feb 2019 23:47:04 -0800
+Subject: [PATCH] librwmem/helpers.h: Include <cerrno> for errno definitions
+
+this is found with libc++
+
+Upstream-Status: Submitted [https://github.com/tomba/rwmem/pull/5]
+Signed-off-by: Khem Raj <[email protected]>
+---
+ librwmem/helpers.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/librwmem/helpers.h b/librwmem/helpers.h
+index ccc6c9e..686943e 100644
+--- a/librwmem/helpers.h
++++ b/librwmem/helpers.h
+@@ -1,5 +1,6 @@
+ #pragma once
+ 
++#include <cerrno>
+ #include <string>
+ #include <vector>
+ #include <string.h>
recipes-bsp/rwmem/rwmem_1.1.bb deleted +0 -13
deleted file mode 100644
index 2848e1cd..00000000
@@ -1,13 +0,0 @@
-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"
-
-S = "${WORKDIR}/git"
-
-do_install() {
-	install -d ${D}${bindir}
-	install -m 0755 rwmem ${D}${bindir}
-}
recipes-bsp/rwmem/rwmem_1.2.bb new file +27 -0
new file mode 100644
index 00000000..c4d2bc49
@@ -0,0 +1,27 @@
+SUMMARY = "A small tool to read/write memory"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+PV .= "+git${SRCPV}"
+
+SRCREV_rwmem = "7e5ca9802c1b8ff1f6407c19dfd0b9415501bb11"
+SRCREV_inih = "4b10c654051a86556dfdb634c891b6c3224c4109"
+SRCREV_pybind11 = "9a19306fbf30642ca331d0ec88e7da54a96860f9"
+
+SRCREV_FORMAT = "rwmem_inih_pybind11"
+
+SRC_URI = "git://github.com/tomba/rwmem.git;protocol=https;name=rwmem \
+           git://github.com/benhoyt/inih.git;protocol=https;name=inih;nobranch=1;destsuffix=git/ext/inih \
+           git://github.com/pybind/pybind11.git;protocol=https;name=pybind11;nobranch=1;destsuffix=git/ext/pybind11 \
+           file://0001-Use-CMake-provided-vars-for-ar-and-ranlib.patch \
+           file://0001-librwmem-helpers.h-Include-cerrno-for-errno-definiti.patch \
+           "
+
+S = "${WORKDIR}/git"
+
+inherit cmake pkgconfig python3native
+
+do_install() {
+	install -D -m 0755 ${B}/bin/rwmem ${D}${bindir}/rwmem
+	install -D -m 0644 ${B}/lib/librwmem.a ${D}${libdir}/librwmem.a
+}
Signature · 7 lines
2.23.0

-- 
_______________________________________________
meta-ti mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-ti
author
#2 lore raw
Quoted 7 lines · Denys Dmytriyenko

Thanks! It's been on my todo list lately...

There's pybind11 recipe in meta-openembedded/meta-python that I originally submitted back in 2016, but unfortunately meta-ti does not depend on that layer and probably shouldn't for now.

yeah I think this recipe should actually move out to a common layer since there seems
to be nothing SOC specific in it.

Quoted 148 lines · Khem Raj
Quoted 146 lines

- New versions uses CMake and extra modules
- Correct detection of nm/ranlib/ar for LTO
- Fix build with clang/libc++

---
 ...Make-provided-vars-for-ar-and-ranlib.patch | 34 +++++++++++++++++++
 ....h-Include-cerrno-for-errno-definiti.patch | 24 +++++++++++++
 recipes-bsp/rwmem/rwmem_1.1.bb                | 13 -------
 recipes-bsp/rwmem/rwmem_1.2.bb                | 27 +++++++++++++++
 4 files changed, 85 insertions(+), 13 deletions(-)
 create mode 100644 recipes-bsp/rwmem/rwmem/0001-Use-CMake-provided-vars-for-ar-and-ranlib.patch
 create mode 100644 recipes-bsp/rwmem/rwmem/0001-librwmem-helpers.h-Include-cerrno-for-errno-definiti.patch
 delete mode 100644 recipes-bsp/rwmem/rwmem_1.1.bb
 create mode 100644 recipes-bsp/rwmem/rwmem_1.2.bb
recipes-bsp/rwmem/rwmem/0001-Use-CMake-provided-vars-for-ar-and-ranlib.patch new file +34 -0
new file mode 100644
index 00000000..79968f32
@@ -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: Submitted [https://github.com/tomba/rwmem/pull/5]
+
+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/0001-librwmem-helpers.h-Include-cerrno-for-errno-definiti.patch new file +24 -0
new file mode 100644
index 00000000..9f33fa5e
@@ -0,0 +1,24 @@
+From 9f1d52590336caeab8038cdd015294df2e5d8c1f Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Fri, 1 Feb 2019 23:47:04 -0800
+Subject: [PATCH] librwmem/helpers.h: Include <cerrno> for errno definitions
+
+this is found with libc++
+
+Upstream-Status: Submitted [https://github.com/tomba/rwmem/pull/5]
+Signed-off-by: Khem Raj <[email protected]>
+---
+ librwmem/helpers.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/librwmem/helpers.h b/librwmem/helpers.h
+index ccc6c9e..686943e 100644
+--- a/librwmem/helpers.h
++++ b/librwmem/helpers.h
+@@ -1,5 +1,6 @@
+ #pragma once
+
++#include <cerrno>
+ #include <string>
+ #include <vector>
+ #include <string.h>
recipes-bsp/rwmem/rwmem_1.1.bb deleted +0 -13
deleted file mode 100644
index 2848e1cd..00000000
@@ -1,13 +0,0 @@
-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"
-
-S = "${WORKDIR}/git"
-
-do_install() {
-     install -d ${D}${bindir}
-     install -m 0755 rwmem ${D}${bindir}
-}
recipes-bsp/rwmem/rwmem_1.2.bb new file +27 -1
new file mode 100644
index 00000000..c4d2bc49
@@ -0,0 +1,27 @@
+SUMMARY = "A small tool to read/write memory"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+PV .= "+git${SRCPV}"
+
+SRCREV_rwmem = "7e5ca9802c1b8ff1f6407c19dfd0b9415501bb11"
+SRCREV_inih = "4b10c654051a86556dfdb634c891b6c3224c4109"
+SRCREV_pybind11 = "9a19306fbf30642ca331d0ec88e7da54a96860f9"
+
+SRCREV_FORMAT = "rwmem_inih_pybind11"
+
+SRC_URI = "git://github.com/tomba/rwmem.git;protocol=https;name=rwmem \
+           git://github.com/benhoyt/inih.git;protocol=https;name=inih;nobranch=1;destsuffix=git/ext/inih \
+           git://github.com/pybind/pybind11.git;protocol=https;name=pybind11;nobranch=1;destsuffix=git/ext/pybind11 \
+           file://0001-Use-CMake-provided-vars-for-ar-and-ranlib.patch \
+           file://0001-librwmem-helpers.h-Include-cerrno-for-errno-definiti.patch \
+           "
+
+S = "${WORKDIR}/git"
+
+inherit cmake pkgconfig python3native
+
+do_install() {
+     install -D -m 0755 ${B}/bin/rwmem ${D}${bindir}/rwmem
+     install -D -m 0644 ${B}/lib/librwmem.a ${D}${libdir}/librwmem.a
+}
--

2.23.0

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

#3 lore raw
In reply to Khem Raj

Does this need:

DEPENDS += "python3"

Otherwise do_configure fails:

-- Checking for module 'python3'
-- No package 'python3' found

Quoted 146 lines · Khem Raj

- New versions uses CMake and extra modules
- Correct detection of nm/ranlib/ar for LTO
- Fix build with clang/libc++

---
 ...Make-provided-vars-for-ar-and-ranlib.patch | 34 +++++++++++++++++++
 ....h-Include-cerrno-for-errno-definiti.patch | 24 +++++++++++++
 recipes-bsp/rwmem/rwmem_1.1.bb                | 13 -------
 recipes-bsp/rwmem/rwmem_1.2.bb                | 27 +++++++++++++++
 4 files changed, 85 insertions(+), 13 deletions(-)
 create mode 100644 recipes-bsp/rwmem/rwmem/0001-Use-CMake-provided-vars-for-ar-and-ranlib.patch
 create mode 100644 recipes-bsp/rwmem/rwmem/0001-librwmem-helpers.h-Include-cerrno-for-errno-definiti.patch
 delete mode 100644 recipes-bsp/rwmem/rwmem_1.1.bb
 create mode 100644 recipes-bsp/rwmem/rwmem_1.2.bb
recipes-bsp/rwmem/rwmem/0001-Use-CMake-provided-vars-for-ar-and-ranlib.patch new file +34 -0
new file mode 100644
index 00000000..79968f32
@@ -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: Submitted [https://github.com/tomba/rwmem/pull/5]
+
+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/0001-librwmem-helpers.h-Include-cerrno-for-errno-definiti.patch new file +24 -0
new file mode 100644
index 00000000..9f33fa5e
@@ -0,0 +1,24 @@
+From 9f1d52590336caeab8038cdd015294df2e5d8c1f Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Fri, 1 Feb 2019 23:47:04 -0800
+Subject: [PATCH] librwmem/helpers.h: Include <cerrno> for errno definitions
+
+this is found with libc++
+
+Upstream-Status: Submitted [https://github.com/tomba/rwmem/pull/5]
+Signed-off-by: Khem Raj <[email protected]>
+---
+ librwmem/helpers.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/librwmem/helpers.h b/librwmem/helpers.h
+index ccc6c9e..686943e 100644
+--- a/librwmem/helpers.h
++++ b/librwmem/helpers.h
+@@ -1,5 +1,6 @@
+ #pragma once
+ 
++#include <cerrno>
+ #include <string>
+ #include <vector>
+ #include <string.h>
recipes-bsp/rwmem/rwmem_1.1.bb deleted +0 -13
deleted file mode 100644
index 2848e1cd..00000000
@@ -1,13 +0,0 @@
-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"
-
-S = "${WORKDIR}/git"
-
-do_install() {
-	install -d ${D}${bindir}
-	install -m 0755 rwmem ${D}${bindir}
-}
recipes-bsp/rwmem/rwmem_1.2.bb new file +27 -0
new file mode 100644
index 00000000..c4d2bc49
@@ -0,0 +1,27 @@
+SUMMARY = "A small tool to read/write memory"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+PV .= "+git${SRCPV}"
+
+SRCREV_rwmem = "7e5ca9802c1b8ff1f6407c19dfd0b9415501bb11"
+SRCREV_inih = "4b10c654051a86556dfdb634c891b6c3224c4109"
+SRCREV_pybind11 = "9a19306fbf30642ca331d0ec88e7da54a96860f9"
+
+SRCREV_FORMAT = "rwmem_inih_pybind11"
+
+SRC_URI = "git://github.com/tomba/rwmem.git;protocol=https;name=rwmem \
+           git://github.com/benhoyt/inih.git;protocol=https;name=inih;nobranch=1;destsuffix=git/ext/inih \
+           git://github.com/pybind/pybind11.git;protocol=https;name=pybind11;nobranch=1;destsuffix=git/ext/pybind11 \
+           file://0001-Use-CMake-provided-vars-for-ar-and-ranlib.patch \
+           file://0001-librwmem-helpers.h-Include-cerrno-for-errno-definiti.patch \
+           "
+
+S = "${WORKDIR}/git"
+
+inherit cmake pkgconfig python3native
+
+do_install() {
+	install -D -m 0755 ${B}/bin/rwmem ${D}${bindir}/rwmem
+	install -D -m 0644 ${B}/lib/librwmem.a ${D}${libdir}/librwmem.a
+}
Signature · 7 lines
2.23.0

-- 
_______________________________________________
meta-ti mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-ti
author
#4 lore raw
Quoted 9 lines · Denys Dmytriyenko

Does this need:

DEPENDS += "python3"

Otherwise do_configure fails:

-- Checking for module 'python3'
-- No package 'python3' found

it was looking for that on build system so inherit python3native should have fixed it. Sent a v2 just now

Quoted 148 lines · Khem Raj
Quoted 146 lines

- New versions uses CMake and extra modules
- Correct detection of nm/ranlib/ar for LTO
- Fix build with clang/libc++

---
  ...Make-provided-vars-for-ar-and-ranlib.patch | 34 +++++++++++++++++++
  ....h-Include-cerrno-for-errno-definiti.patch | 24 +++++++++++++
  recipes-bsp/rwmem/rwmem_1.1.bb                | 13 -------
  recipes-bsp/rwmem/rwmem_1.2.bb                | 27 +++++++++++++++
  4 files changed, 85 insertions(+), 13 deletions(-)

create mode 100644 recipes-bsp/rwmem/rwmem/0001-Use-CMake-provided-vars-for-ar-and-ranlib.patch create mode 100644 recipes-bsp/rwmem/rwmem/0001-librwmem-helpers.h-Include-cerrno-for-errno-definiti.patch delete mode 100644 recipes-bsp/rwmem/rwmem_1.1.bb
create mode 100644 recipes-bsp/rwmem/rwmem_1.2.bb

recipes-bsp/rwmem/rwmem/0001-Use-CMake-provided-vars-for-ar-and-ranlib.patch new file +34 -0
new file mode 100644
index 00000000..79968f32
@@ -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: Submitted [https://github.com/tomba/rwmem/pull/5]
+
+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/0001-librwmem-helpers.h-Include-cerrno-for-errno-definiti.patch new file +24 -0
new file mode 100644
index 00000000..9f33fa5e
@@ -0,0 +1,24 @@
+From 9f1d52590336caeab8038cdd015294df2e5d8c1f Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Fri, 1 Feb 2019 23:47:04 -0800
+Subject: [PATCH] librwmem/helpers.h: Include <cerrno> for errno definitions
+
+this is found with libc++
+
+Upstream-Status: Submitted [https://github.com/tomba/rwmem/pull/5]
+Signed-off-by: Khem Raj <[email protected]>
+---
+ librwmem/helpers.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/librwmem/helpers.h b/librwmem/helpers.h
+index ccc6c9e..686943e 100644
+--- a/librwmem/helpers.h
++++ b/librwmem/helpers.h
+@@ -1,5 +1,6 @@
+ #pragma once
+
++#include <cerrno>
+ #include <string>
+ #include <vector>
+ #include <string.h>
recipes-bsp/rwmem/rwmem_1.1.bb deleted +0 -13
deleted file mode 100644
index 2848e1cd..00000000
@@ -1,13 +0,0 @@
-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"
-
-S = "${WORKDIR}/git"
-
-do_install() {
-	install -d ${D}${bindir}
-	install -m 0755 rwmem ${D}${bindir}
-}
recipes-bsp/rwmem/rwmem_1.2.bb new file +27 -0
new file mode 100644
index 00000000..c4d2bc49
@@ -0,0 +1,27 @@
+SUMMARY = "A small tool to read/write memory"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+PV .= "+git${SRCPV}"
+
+SRCREV_rwmem = "7e5ca9802c1b8ff1f6407c19dfd0b9415501bb11"
+SRCREV_inih = "4b10c654051a86556dfdb634c891b6c3224c4109"
+SRCREV_pybind11 = "9a19306fbf30642ca331d0ec88e7da54a96860f9"
+
+SRCREV_FORMAT = "rwmem_inih_pybind11"
+
+SRC_URI = "git://github.com/tomba/rwmem.git;protocol=https;name=rwmem \
+           git://github.com/benhoyt/inih.git;protocol=https;name=inih;nobranch=1;destsuffix=git/ext/inih \
+           git://github.com/pybind/pybind11.git;protocol=https;name=pybind11;nobranch=1;destsuffix=git/ext/pybind11 \
+           file://0001-Use-CMake-provided-vars-for-ar-and-ranlib.patch \
+           file://0001-librwmem-helpers.h-Include-cerrno-for-errno-definiti.patch \
+           "
+
+S = "${WORKDIR}/git"
+
+inherit cmake pkgconfig python3native
+
+do_install() {
+	install -D -m 0755 ${B}/bin/rwmem ${D}${bindir}/rwmem
+	install -D -m 0644 ${B}/lib/librwmem.a ${D}${libdir}/librwmem.a
+}
Signature · 7 lines
2.23.0

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

Does this need:

DEPENDS += "python3"

Quoted 8 lines
Quoted 5 lines

Otherwise do_configure fails:

-- Checking for module 'python3'
-- No package 'python3' found

it was looking for that on build system so inherit python3native should have fixed it. Sent a v2 just now

inherit python3native was already in v1 and it was giving me that error anyway.

Quoted 148 lines
Quoted 147 lines · Khem Raj
Quoted 146 lines

- New versions uses CMake and extra modules
- Correct detection of nm/ranlib/ar for LTO
- Fix build with clang/libc++

---
 ...Make-provided-vars-for-ar-and-ranlib.patch | 34 +++++++++++++++++++
 ....h-Include-cerrno-for-errno-definiti.patch | 24 +++++++++++++
 recipes-bsp/rwmem/rwmem_1.1.bb                | 13 -------
 recipes-bsp/rwmem/rwmem_1.2.bb                | 27 +++++++++++++++
 4 files changed, 85 insertions(+), 13 deletions(-)
 create mode 100644 recipes-bsp/rwmem/rwmem/0001-Use-CMake-provided-vars-for-ar-and-ranlib.patch
 create mode 100644 recipes-bsp/rwmem/rwmem/0001-librwmem-helpers.h-Include-cerrno-for-errno-definiti.patch
 delete mode 100644 recipes-bsp/rwmem/rwmem_1.1.bb
 create mode 100644 recipes-bsp/rwmem/rwmem_1.2.bb
recipes-bsp/rwmem/rwmem/0001-Use-CMake-provided-vars-for-ar-and-ranlib.patch new file +34 -0
new file mode 100644
index 00000000..79968f32
@@ -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: Submitted [https://github.com/tomba/rwmem/pull/5]
+
+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/0001-librwmem-helpers.h-Include-cerrno-for-errno-definiti.patch new file +24 -0
new file mode 100644
index 00000000..9f33fa5e
@@ -0,0 +1,24 @@
+From 9f1d52590336caeab8038cdd015294df2e5d8c1f Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Fri, 1 Feb 2019 23:47:04 -0800
+Subject: [PATCH] librwmem/helpers.h: Include <cerrno> for errno definitions
+
+this is found with libc++
+
+Upstream-Status: Submitted [https://github.com/tomba/rwmem/pull/5]
+Signed-off-by: Khem Raj <[email protected]>
+---
+ librwmem/helpers.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/librwmem/helpers.h b/librwmem/helpers.h
+index ccc6c9e..686943e 100644
+--- a/librwmem/helpers.h
++++ b/librwmem/helpers.h
+@@ -1,5 +1,6 @@
+ #pragma once
+
++#include <cerrno>
+ #include <string>
+ #include <vector>
+ #include <string.h>
recipes-bsp/rwmem/rwmem_1.1.bb deleted +0 -13
deleted file mode 100644
index 2848e1cd..00000000
@@ -1,13 +0,0 @@
-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"
-
-S = "${WORKDIR}/git"
-
-do_install() {
-	install -d ${D}${bindir}
-	install -m 0755 rwmem ${D}${bindir}
-}
recipes-bsp/rwmem/rwmem_1.2.bb new file +27 -0
new file mode 100644
index 00000000..c4d2bc49
@@ -0,0 +1,27 @@
+SUMMARY = "A small tool to read/write memory"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+PV .= "+git${SRCPV}"
+
+SRCREV_rwmem = "7e5ca9802c1b8ff1f6407c19dfd0b9415501bb11"
+SRCREV_inih = "4b10c654051a86556dfdb634c891b6c3224c4109"
+SRCREV_pybind11 = "9a19306fbf30642ca331d0ec88e7da54a96860f9"
+
+SRCREV_FORMAT = "rwmem_inih_pybind11"
+
+SRC_URI = "git://github.com/tomba/rwmem.git;protocol=https;name=rwmem \
+           git://github.com/benhoyt/inih.git;protocol=https;name=inih;nobranch=1;destsuffix=git/ext/inih \
+           git://github.com/pybind/pybind11.git;protocol=https;name=pybind11;nobranch=1;destsuffix=git/ext/pybind11 \
+           file://0001-Use-CMake-provided-vars-for-ar-and-ranlib.patch \
+           file://0001-librwmem-helpers.h-Include-cerrno-for-errno-definiti.patch \
+           "
+
+S = "${WORKDIR}/git"
+
+inherit cmake pkgconfig python3native
+
+do_install() {
+	install -D -m 0755 ${B}/bin/rwmem ${D}${bindir}/rwmem
+	install -D -m 0644 ${B}/lib/librwmem.a ${D}${libdir}/librwmem.a
+}
Signature · 7 lines
2.23.0

-- 
_______________________________________________
meta-ti mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-ti
author
#6 lore raw
Quoted 13 lines · Denys Dmytriyenko
Quoted 11 lines · Khem Raj
Quoted 9 lines · Denys Dmytriyenko

Does this need:

DEPENDS += "python3"

Otherwise do_configure fails:

-- Checking for module 'python3'
-- No package 'python3' found

Quoted 5 lines
Quoted 2 lines

it was looking for that on build system so inherit python3native should have fixed it. Sent a v2 just now

inherit python3native was already in v1 and it was giving me that error anyway.

hmmm a clean build shows it here as well. Sending v3

Quoted 150 lines
Quoted 150 lines
Quoted 149 lines · Khem Raj
Quoted 146 lines

- New versions uses CMake and extra modules
- Correct detection of nm/ranlib/ar for LTO
- Fix build with clang/libc++

---
 ...Make-provided-vars-for-ar-and-ranlib.patch | 34 +++++++++++++++++++
 ....h-Include-cerrno-for-errno-definiti.patch | 24 +++++++++++++
 recipes-bsp/rwmem/rwmem_1.1.bb                | 13 -------
 recipes-bsp/rwmem/rwmem_1.2.bb                | 27 +++++++++++++++
 4 files changed, 85 insertions(+), 13 deletions(-)
 create mode 100644 recipes-bsp/rwmem/rwmem/0001-Use-CMake-provided-vars-for-ar-and-ranlib.patch
 create mode 100644 recipes-bsp/rwmem/rwmem/0001-librwmem-helpers.h-Include-cerrno-for-errno-definiti.patch
 delete mode 100644 recipes-bsp/rwmem/rwmem_1.1.bb
 create mode 100644 recipes-bsp/rwmem/rwmem_1.2.bb
recipes-bsp/rwmem/rwmem/0001-Use-CMake-provided-vars-for-ar-and-ranlib.patch new file +34 -0
new file mode 100644
index 00000000..79968f32
@@ -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: Submitted [https://github.com/tomba/rwmem/pull/5]
+
+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/0001-librwmem-helpers.h-Include-cerrno-for-errno-definiti.patch new file +24 -0
new file mode 100644
index 00000000..9f33fa5e
@@ -0,0 +1,24 @@
+From 9f1d52590336caeab8038cdd015294df2e5d8c1f Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Fri, 1 Feb 2019 23:47:04 -0800
+Subject: [PATCH] librwmem/helpers.h: Include <cerrno> for errno definitions
+
+this is found with libc++
+
+Upstream-Status: Submitted [https://github.com/tomba/rwmem/pull/5]
+Signed-off-by: Khem Raj <[email protected]>
+---
+ librwmem/helpers.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/librwmem/helpers.h b/librwmem/helpers.h
+index ccc6c9e..686943e 100644
+--- a/librwmem/helpers.h
++++ b/librwmem/helpers.h
+@@ -1,5 +1,6 @@
+ #pragma once
+
++#include <cerrno>
+ #include <string>
+ #include <vector>
+ #include <string.h>
recipes-bsp/rwmem/rwmem_1.1.bb deleted +0 -13
deleted file mode 100644
index 2848e1cd..00000000
@@ -1,13 +0,0 @@
-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"
-
-S = "${WORKDIR}/git"
-
-do_install() {
-   install -d ${D}${bindir}
-   install -m 0755 rwmem ${D}${bindir}
-}
recipes-bsp/rwmem/rwmem_1.2.bb new file +27 -1
new file mode 100644
index 00000000..c4d2bc49
@@ -0,0 +1,27 @@
+SUMMARY = "A small tool to read/write memory"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+PV .= "+git${SRCPV}"
+
+SRCREV_rwmem = "7e5ca9802c1b8ff1f6407c19dfd0b9415501bb11"
+SRCREV_inih = "4b10c654051a86556dfdb634c891b6c3224c4109"
+SRCREV_pybind11 = "9a19306fbf30642ca331d0ec88e7da54a96860f9"
+
+SRCREV_FORMAT = "rwmem_inih_pybind11"
+
+SRC_URI = "git://github.com/tomba/rwmem.git;protocol=https;name=rwmem \
+           git://github.com/benhoyt/inih.git;protocol=https;name=inih;nobranch=1;destsuffix=git/ext/inih \
+           git://github.com/pybind/pybind11.git;protocol=https;name=pybind11;nobranch=1;destsuffix=git/ext/pybind11 \
+           file://0001-Use-CMake-provided-vars-for-ar-and-ranlib.patch \
+           file://0001-librwmem-helpers.h-Include-cerrno-for-errno-definiti.patch \
+           "
+
+S = "${WORKDIR}/git"
+
+inherit cmake pkgconfig python3native
+
+do_install() {
+   install -D -m 0755 ${B}/bin/rwmem ${D}${bindir}/rwmem
+   install -D -m 0644 ${B}/lib/librwmem.a ${D}${libdir}/librwmem.a
+}
--

2.23.0

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