0033-configure-support-c-0x-standard-for-directfd.patch 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. configure: support c++0x standard for directfd
  2. While directfd upgrade to 1.7.6, it always includes directfb++ utils
  3. when C++ is used and set c++0x as c++ standard.
  4. (In git://git.directfb.org/git/directfb/core/DirectFB.git
  5. commit b444bcae3197be9faf883460dcc239ef757d5922, and commit
  6. 522beeb76f2a8d2dee30d928d2a5955bd06cf25c)
  7. The directfd in qt4 is c++, and there was a build failure:
  8. ...
  9. | qdirectfbwindowsurface.cpp:336:69: error: in C++98 'rect' must be
  10. initialized by constructor, not by '{...}'
  11. | const DFBRectangle rect = { r.x(), r.y(), r.width(), r.height() };
  12. ...
  13. The g++ used c++98 as default c++ standard, we should
  14. explicitly set c++0x for directfd in qt4.
  15. Upstream-Status: Pending
  16. Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
  17. ---
  18. configure | 1 +
  19. 1 file changed, 1 insertion(+)
  20. diff --git a/configure b/configure
  21. index 5724bd6..ecc2f8b 100755
  22. --- a/configure
  23. +++ b/configure
  24. @@ -6656,6 +6656,7 @@ if [ "$PLATFORM_QWS" = "yes" ]; then
  25. if [ "${screen}" = "directfb" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
  26. if test -n "$PKG_CONFIG" && "$PKG_CONFIG" --exists directfb 2>/dev/null; then
  27. QT_CFLAGS_DIRECTFB=`$PKG_CONFIG --cflags directfb 2>/dev/null`
  28. + QT_CFLAGS_DIRECTFB="$QT_CFLAGS_DIRECTFB -std=c++0x"
  29. QT_LIBS_DIRECTFB=`$PKG_CONFIG --libs directfb 2>/dev/null`
  30. elif directfb-config --version >/dev/null 2>&1; then
  31. QT_CFLAGS_DIRECTFB=`directfb-config --cflags 2>/dev/null`
  32. --
  33. 1.9.1