* [PATCH] boost: Support enums in hash
@ 2012-09-28 3:40 Khem Raj
2012-09-28 3:40 ` [PATCH] flex,bison: Add nativesdk variants Khem Raj
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Khem Raj @ 2012-09-28 3:40 UTC (permalink / raw)
To: openembedded-core
Fixes builds which were building fine with previous versions of boost
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
meta/recipes-support/boost/boost_1.51.0.bb | 6 ++-
meta/recipes-support/boost/files/hash_enums.patch | 45 +++++++++++++++++++++
2 files changed, 49 insertions(+), 2 deletions(-)
create mode 100644 meta/recipes-support/boost/files/hash_enums.patch
diff --git a/meta/recipes-support/boost/boost_1.51.0.bb b/meta/recipes-support/boost/boost_1.51.0.bb
index 1564b0e..b95049f 100644
--- a/meta/recipes-support/boost/boost_1.51.0.bb
+++ b/meta/recipes-support/boost/boost_1.51.0.bb
@@ -2,8 +2,10 @@ include boost.inc
LIC_FILES_CHKSUM = "file://LICENSE_1_0.txt;md5=e4224ccaecb14d942c71d31bef20d78c"
-PR = "${INC_PR}.0"
+PR = "${INC_PR}.1"
-SRC_URI += "file://arm-intrinsics.patch"
+SRC_URI += "file://arm-intrinsics.patch \
+ file://hash_enums.patch \
+ "
SRC_URI[md5sum] = "4b6bd483b692fd138aef84ed2c8eb679"
SRC_URI[sha256sum] = "fb2d2335a29ee7fe040a197292bfce982af84a645c81688a915c84c925b69696"
diff --git a/meta/recipes-support/boost/files/hash_enums.patch b/meta/recipes-support/boost/files/hash_enums.patch
new file mode 100644
index 0000000..368da96
--- /dev/null
+++ b/meta/recipes-support/boost/files/hash_enums.patch
@@ -0,0 +1,45 @@
+Allow hashing of enums.
+Fixes errors like
+
+/opt/poky/1.3.0-1/sysroots/i586-poky-linux/usr/include/boost/functional/hash/extensions.hpp:257:34: error: no matching function for call to 'hash_value(const myspace::idx&)'
+
+Upstream-Status: Pending
+Singed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Index: boost_1_51_0/boost/functional/hash/hash.hpp
+===================================================================
+--- boost_1_51_0.orig/boost/functional/hash/hash.hpp 2012-07-15 16:28:30.000000000 -0700
++++ boost_1_51_0/boost/functional/hash/hash.hpp 2012-09-26 14:00:57.738364002 -0700
+@@ -15,6 +15,8 @@
+ #include <boost/functional/hash/detail/hash_float.hpp>
+ #include <string>
+ #include <boost/limits.hpp>
++#include <boost/type_traits/is_enum.hpp>
++#include <boost/utility/enable_if.hpp>
+
+ #if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+ #include <boost/type_traits/is_pointer.hpp>
+@@ -89,6 +91,9 @@
+ typename boost::hash_detail::long_numbers<T>::type hash_value(T);
+ template <typename T>
+ typename boost::hash_detail::ulong_numbers<T>::type hash_value(T);
++ template <typename T>
++ typename boost::enable_if<boost::is_enum<T>, std::size_t>::type
++ hash_value(T);
+
+ #if !BOOST_WORKAROUND(__DMC__, <= 0x848)
+ template <class T> std::size_t hash_value(T* const&);
+@@ -178,7 +183,12 @@
+ {
+ return hash_detail::hash_value_unsigned(v);
+ }
+-
++ template <typename T>
++ typename boost::enable_if<boost::is_enum<T>, std::size_t>::type
++ hash_value(T v)
++ {
++ return static_cast<std::size_t>(v);
++ }
+ // Implementation by Alberto Barbati and Dave Harris.
+ #if !BOOST_WORKAROUND(__DMC__, <= 0x848)
+ template <class T> std::size_t hash_value(T* const& v)
--
1.7.9.5
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH] flex,bison: Add nativesdk variants
2012-09-28 3:40 [PATCH] boost: Support enums in hash Khem Raj
@ 2012-09-28 3:40 ` Khem Raj
2012-09-28 12:24 ` Otavio Salvador
2012-09-28 10:24 ` [PATCH] boost: Support enums in hash Richard Purdie
` (2 subsequent siblings)
3 siblings, 1 reply; 7+ messages in thread
From: Khem Raj @ 2012-09-28 3:40 UTC (permalink / raw)
To: openembedded-core
It is needed in some SDKs that we ship own
version of lex/yacc for sdk host
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
meta/recipes-devtools/bison/bison_2.5.1.bb | 2 +-
meta/recipes-devtools/flex/flex_2.5.35.bb | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/meta/recipes-devtools/bison/bison_2.5.1.bb b/meta/recipes-devtools/bison/bison_2.5.1.bb
index d53c1d6..47b4a6c 100644
--- a/meta/recipes-devtools/bison/bison_2.5.1.bb
+++ b/meta/recipes-devtools/bison/bison_2.5.1.bb
@@ -33,4 +33,4 @@ do_install_append_virtclass-native() {
BISON_PKGDATADIR=${STAGING_DATADIR_NATIVE}/bison
}
#bison-native encodes the staging M4 path
-BBCLASSEXTEND = "native"
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-devtools/flex/flex_2.5.35.bb b/meta/recipes-devtools/flex/flex_2.5.35.bb
index 7419f10..2218c91 100644
--- a/meta/recipes-devtools/flex/flex_2.5.35.bb
+++ b/meta/recipes-devtools/flex/flex_2.5.35.bb
@@ -2,7 +2,7 @@ require flex.inc
PR = "r3"
LICENSE="BSD"
LIC_FILES_CHKSUM = "file://COPYING;md5=e4742cf92e89040b39486a6219b68067"
-BBCLASSEXTEND = "native"
+BBCLASSEXTEND = "native nativesdk"
SRC_URI += "file://avoid-FORTIFY-warnings.patch \
file://int-is-not-the-same-size-as-size_t.patch"
--
1.7.9.5
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH] boost: Support enums in hash
2012-09-28 3:40 [PATCH] boost: Support enums in hash Khem Raj
2012-09-28 3:40 ` [PATCH] flex,bison: Add nativesdk variants Khem Raj
@ 2012-09-28 10:24 ` Richard Purdie
2012-09-28 10:24 ` Richard Purdie
2012-09-28 10:32 ` Phil Blundell
3 siblings, 0 replies; 7+ messages in thread
From: Richard Purdie @ 2012-09-28 10:24 UTC (permalink / raw)
To: Khem Raj; +Cc: openembedded-core
On Thu, 2012-09-27 at 20:40 -0700, Khem Raj wrote:
> Fixes builds which were building fine with previous versions of boost
>
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
> meta/recipes-support/boost/boost_1.51.0.bb | 6 ++-
> meta/recipes-support/boost/files/hash_enums.patch | 45 +++++++++++++++++++++
> 2 files changed, 49 insertions(+), 2 deletions(-)
> create mode 100644 meta/recipes-support/boost/files/hash_enums.patch
Merged to master, thanks.
Richard
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] boost: Support enums in hash
2012-09-28 3:40 [PATCH] boost: Support enums in hash Khem Raj
2012-09-28 3:40 ` [PATCH] flex,bison: Add nativesdk variants Khem Raj
2012-09-28 10:24 ` [PATCH] boost: Support enums in hash Richard Purdie
@ 2012-09-28 10:24 ` Richard Purdie
2012-09-28 10:32 ` Phil Blundell
3 siblings, 0 replies; 7+ messages in thread
From: Richard Purdie @ 2012-09-28 10:24 UTC (permalink / raw)
To: Khem Raj; +Cc: openembedded-core
On Thu, 2012-09-27 at 20:40 -0700, Khem Raj wrote:
> Fixes builds which were building fine with previous versions of boost
>
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
> meta/recipes-support/boost/boost_1.51.0.bb | 6 ++-
> meta/recipes-support/boost/files/hash_enums.patch | 45 +++++++++++++++++++++
> 2 files changed, 49 insertions(+), 2 deletions(-)
> create mode 100644 meta/recipes-support/boost/files/hash_enums.patch
Merged to master, thanks.
Richard
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] boost: Support enums in hash
2012-09-28 3:40 [PATCH] boost: Support enums in hash Khem Raj
` (2 preceding siblings ...)
2012-09-28 10:24 ` Richard Purdie
@ 2012-09-28 10:32 ` Phil Blundell
2012-09-28 13:41 ` Khem Raj
3 siblings, 1 reply; 7+ messages in thread
From: Phil Blundell @ 2012-09-28 10:32 UTC (permalink / raw)
To: Khem Raj; +Cc: openembedded-core
On Thu, 2012-09-27 at 20:40 -0700, Khem Raj wrote:
> +Upstream-Status: Pending
> +Singed-off-by: Khem Raj <raj.khem@gmail.com>
The mental picture of a patch being singed off is kind of amusing, but I
guess this was a typo.
p.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-09-28 13:54 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-28 3:40 [PATCH] boost: Support enums in hash Khem Raj
2012-09-28 3:40 ` [PATCH] flex,bison: Add nativesdk variants Khem Raj
2012-09-28 12:24 ` Otavio Salvador
2012-09-28 10:24 ` [PATCH] boost: Support enums in hash Richard Purdie
2012-09-28 10:24 ` Richard Purdie
2012-09-28 10:32 ` Phil Blundell
2012-09-28 13:41 ` Khem Raj
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.