All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Jansa <martin.jansa@gmail.com>
To: openembedded-devel@lists.openembedded.org
Subject: Re: [meta-qt5][PATCH 1/3] qtbase: Fix build with clang
Date: Mon, 24 Aug 2015 14:42:18 +0200	[thread overview]
Message-ID: <20150824124218.GD2446@jama> (raw)
In-Reply-To: <1440391979-3469-1-git-send-email-raj.khem@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 6857 bytes --]

On Sun, Aug 23, 2015 at 09:52:57PM -0700, Khem Raj wrote:
> This patch is a backport from upstream qt5 fixes building with clang
> from meta-clang

I've just merged upgrade to 5.5 can you please rebase your changes and 
re-submit?

Thanks

> 
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
>  recipes-qt/qt5/qtbase-native_git.bb                |  1 +
>  .../qt5/qtbase/0015-Fix-build-with-clang-3.7.patch | 71 ++++++++++++++++++++++
>  recipes-qt/qt5/qtbase_git.bb                       |  7 ++-
>  3 files changed, 76 insertions(+), 3 deletions(-)
>  create mode 100644 recipes-qt/qt5/qtbase/0015-Fix-build-with-clang-3.7.patch
> 
> diff --git a/recipes-qt/qt5/qtbase-native_git.bb b/recipes-qt/qt5/qtbase-native_git.bb
> index f84f38e..034a314 100644
> --- a/recipes-qt/qt5/qtbase-native_git.bb
> +++ b/recipes-qt/qt5/qtbase-native_git.bb
> @@ -27,6 +27,7 @@ SRC_URI += "\
>      file://0008-eglfs-fix-egl-error-for-platforms-only-supporting-on.patch \
>      file://0009-QOpenGLPaintDevice-sub-area-support.patch \
>      file://0010-Make-Qt5GuiConfigExtras.cmake-find-gl-es-include-dir.patch \
> +    file://0015-Fix-build-with-clang-3.7.patch \
>  "
>  
>  # common for qtbase-native and nativesdk-qtbase
> diff --git a/recipes-qt/qt5/qtbase/0015-Fix-build-with-clang-3.7.patch b/recipes-qt/qt5/qtbase/0015-Fix-build-with-clang-3.7.patch
> new file mode 100644
> index 0000000..181d63c
> --- /dev/null
> +++ b/recipes-qt/qt5/qtbase/0015-Fix-build-with-clang-3.7.patch
> @@ -0,0 +1,71 @@
> +This is backport of https://codereview.qt-project.org/#/c/121545/
> +
> +From 6a6acc496728ce96198d27f9ddd44c2367758d42 Mon Sep 17 00:00:00 2001
> +From: Khem Raj <raj.khem@gmail.com>
> +Date: Sun, 23 Aug 2015 15:19:41 -0700
> +Subject: [PATCH] Fix build with clang 3.7
> +
> +Nullable is a language extension in clang 3.7 (indicating whether or
> +not a pointer can be null).
> +http://clang.llvm.org/docs/AttributeReference.html#nullable
> +Using it as a class name breaks building with this compiler
> +
> +/mnt/home/kraj/work/angstrom/build/tmp-angstrom-glibc/work/armv7at2hf-vfp-neon-angstrom-linux-gnueabi/qtbase/5.4.2+gitAUTOINC+2cb17c1fb9-r0/git/src/tools/qlalr/lalr.cpp:241:1: error: declaration of anonymous
> +      struct must be a definition
> +struct _Nullable: public std::unary_function<Name, bool>
> +^
> +/mnt/home/kraj/work/angstrom/build/tmp-angstrom-glibc/work/armv7at2hf-vfp-neon-angstrom-linux-gnueabi/qtbase/5.4.2+gitAUTOINC+2cb17c1fb9-r0/git/src/tools/qlalr/lalr.cpp:241:56: error: expected unqualified-id
> +struct _Nullable: public std::unary_function<Name, bool>
> +                                                       ^
> +/mnt/home/kraj/work/angstrom/build/tmp-angstrom-glibc/work/armv7at2hf-vfp-neon-angstrom-linux-gnueabi/qtbase/5.4.2+gitAUTOINC+2cb17c1fb9-r0/git/src/tools/qlalr/lalr.cpp:303:98: error: expected expression
> +          NameList::iterator nn = std::find_if (rule->rhs.begin (), rule->rhs.end (), std::not1 (_Nullable (this)));
> +                                                                                                 ^
> +/mnt/home/kraj/work/angstrom/build/tmp-angstrom-glibc/work/armv7at2hf-vfp-neon-angstrom-linux-gnueabi/qtbase/5.4.2+gitAUTOINC+2cb17c1fb9-r0/git/src/tools/qlalr/lalr.cpp:638:107: error: expected expression
> +                  NameList::iterator first_not_nullable = std::find_if (dot, rule->rhs.end (), std::not1 (_Nullable (this)));
> +                                                                                                          ^
> +4 errors generated.
> +
> +Signed-off-by: Khem Raj <raj.khem@gmail.com>
> +---
> + src/tools/qlalr/lalr.cpp | 8 ++++----
> + 1 file changed, 4 insertions(+), 4 deletions(-)
> +
> +diff --git a/src/tools/qlalr/lalr.cpp b/src/tools/qlalr/lalr.cpp
> +index be1df7d..55ef056 100644
> +--- a/src/tools/qlalr/lalr.cpp
> ++++ b/src/tools/qlalr/lalr.cpp
> +@@ -238,11 +238,11 @@ void Grammar::buildExtendedGrammar ()
> +   non_terminals.insert (accept_symbol);
> + }
> + 
> +-struct _Nullable: public std::unary_function<Name, bool>
> ++struct Nullable: public std::unary_function<Name, bool>
> + {
> +   Automaton *_M_automaton;
> + 
> +-  _Nullable (Automaton *aut):
> ++  Nullable (Automaton *aut):
> +     _M_automaton (aut) {}
> + 
> +   bool operator () (Name name) const
> +@@ -300,7 +300,7 @@ void Automaton::buildNullables ()
> + 
> +       for (RulePointer rule = _M_grammar->rules.begin (); rule != _M_grammar->rules.end (); ++rule)
> +         {
> +-          NameList::iterator nn = std::find_if (rule->rhs.begin (), rule->rhs.end (), std::not1 (_Nullable (this)));
> ++          NameList::iterator nn = std::find_if (rule->rhs.begin (), rule->rhs.end (), std::not1 (Nullable (this)));
> + 
> +           if (nn == rule->rhs.end ())
> +             changed |= nullables.insert (rule->lhs).second;
> +@@ -635,7 +635,7 @@ void Automaton::buildIncludesDigraph ()
> +                   if (! _M_grammar->isNonTerminal (*A))
> +                     continue;
> + 
> +-                  NameList::iterator first_not_nullable = std::find_if (dot, rule->rhs.end (), std::not1 (_Nullable (this)));
> ++                  NameList::iterator first_not_nullable = std::find_if (dot, rule->rhs.end (), std::not1 (Nullable (this)));
> +                   if (first_not_nullable != rule->rhs.end ())
> +                     continue;
> + 
> +-- 
> +2.1.4
> +
> diff --git a/recipes-qt/qt5/qtbase_git.bb b/recipes-qt/qt5/qtbase_git.bb
> index 33620cb..6814dbe 100644
> --- a/recipes-qt/qt5/qtbase_git.bb
> +++ b/recipes-qt/qt5/qtbase_git.bb
> @@ -22,8 +22,9 @@ SRC_URI += "\
>      file://0009-QOpenGLPaintDevice-sub-area-support.patch \
>      file://0010-Make-Qt5GuiConfigExtras.cmake-find-gl-es-include-dir.patch \
>      file://0014-linux-oe-g-Invert-conditional-for-defining-QT_SOCKLE.patch \
> +    file://0015-Fix-build-with-clang-3.7.patch \
>  "
> - 
> +
>  # specific for qtbase
>  SRC_URI += "\
>      file://0011-qmake-don-t-build-it-in-configure-but-allow-to-build.patch \
> @@ -199,9 +200,9 @@ do_configure() {
>          -hostbindir ${OE_QMAKE_PATH_HOST_BINS} \
>          -hostdatadir ${OE_QMAKE_PATH_HOST_DATA} \
>          -external-hostbindir ${OE_QMAKE_PATH_EXTERNAL_HOST_BINS} \
> +        ${QT_CONFIG_FLAGS} \
>          -platform ${OE_QMAKESPEC} \
> -        -xplatform linux-oe-g++ \
> -        ${QT_CONFIG_FLAGS}
> +        -xplatform linux-oe-g++
>  
>      qmake5_base_do_configure
>  }
> -- 
> 2.1.4
> 
> -- 
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 188 bytes --]

      parent reply	other threads:[~2015-08-24 12:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-24  4:52 [meta-qt5][PATCH 1/3] qtbase: Fix build with clang Khem Raj
2015-08-24  4:52 ` [meta-qt5][PATCH 2/3] qt3d: Fix assimp " Khem Raj
2015-08-24  4:52 ` [meta-qt5][PATCH 3/3] qtwayland: Fix build for raspberryPi Khem Raj
2015-08-24 12:42 ` Martin Jansa [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150824124218.GD2446@jama \
    --to=martin.jansa@gmail.com \
    --cc=openembedded-devel@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.