Bump buidlroot version to 2018.02.6

This commit is contained in:
jbnadal
2018-10-22 14:55:59 +02:00
parent 222960cedb
commit bec94fdb63
6150 changed files with 84803 additions and 117446 deletions

View File

@@ -1,105 +0,0 @@
From 7a912823158a4113256c3113a34c38d6b241d275 Mon Sep 17 00:00:00 2001
From: Alexey Brodkin <abrodkin@synopsys.com>
Date: Wed, 13 Jan 2016 20:15:36 +0300
Subject: [PATCH] Fix library inclusion order when building statically
When building application statically it's important to keep
libraries we're linking against in order. Otherwise if libA depends on
libB but it is mentioned after libB in linker command line
there will be unresolved symbols.
Consider real example - configuration of Qt with glib for static build.
Initially reported by Buildroot autobuilder here:
http://autobuild.buildroot.net/results/174/174c6e47eb761f9897275b6fedff742ace2f3081
What happens here:
[1] Qt's configuration script tries to build glib test app
(in config.tests/unix/glib)
[2] For that it first asks which libs to use during linkage this way:
QT_LIBS_GLIB=`$PKG_CONFIG --libs glib-2.0 gthread-2.0 2>/dev/null`
In our case we're getting something like this:
-L/.../sysroot/usr/lib -lintl -lgthread-2.0 -pthread -lglib-2.0 \
-lintl -pthread -lintl
Note "-lintl" is mentioned 3 times because libgthread depends on
libthread and both of them plus libglib all depend on libintl - so
we're getting "lintl" for each separate library mentioned above.
[3] Now we execute "compileTest" for real heavy lifting this way:
compileTest unix/glib "Glib" $QT_CFLAGS_GLIB $QT_LIBS_GLIB ...
[4] compileTest (the one for unix) parses command-line passed to it
groups all entries with "-l" prefix and puts them in LFLAGS
variable. And finally executes qmake passing it that kind of
construction:
$OUTDIR/bin/qmake ..."LIBS*=$LFLAGS"
[5] When qmake sees construction "MYVAR*=MYVAL" it populates MYVAR with
unique values from MYVAL string.
[6] As a result qmake generated Makefile with the following:
LIBS = $(SUBLIBS) -pthread -L/.../sysroot/usr/lib -lintl -lgthread-2.0 \
-lglib-2.0
[7] And essentially on attempt to link glib test app a failure happens
because libglib needs libintl, i.e. "-lintl" must follow "-lglib-2.0":
-------------------->8------------------
linking glib
g++ -static -Wl,-O1 -o glib glib.o -pthread -L/.../sysroot/usr/lib \
-lintl -lgthread-2.0 -lglib-2.0
/.../sysroot/usr/lib/libglib-2.0.a(libglib_2_0_la-ggettext.o): In function '_g_dgettext_should_translate':
ggettext.c:(.text+0x28): undefined reference to `libintl_textdomain'
ggettext.c:(.text+0x36): undefined reference to `libintl_gettext'
/.../sysroot/usr/lib/libglib-2.0.a(libglib_2_0_la-ggettext.o): In function `ensure_gettext_initialized':
ggettext.c:(.text+0xe6): undefined reference to `libintl_bindtextdomain'
ggettext.c:(.text+0xf6): undefined reference to `libintl_bind_textdomain_codeset'
/.../sysroot/usr/lib/libglib-2.0.a(libglib_2_0_la-ggettext.o): In function `g_dgettext':
ggettext.c:(.text+0x148): undefined reference to `libintl_dgettext'
/.../sysroot/usr/lib/libglib-2.0.a(libglib_2_0_la-ggettext.o): In function `g_dcgettext':
ggettext.c:(.text+0x2dc): undefined reference to `libintl_dcgettext'
/.../sysroot/usr/lib/libglib-2.0.a(libglib_2_0_la-ggettext.o): In function `g_dngettext':
ggettext.c:(.text+0x32a): undefined reference to `libintl_dngettext'
collect2: error: ld returned 1 exit status
Makefile:99: recipe for target 'glib' failed
make: *** [glib] Error 1
Glib disabled.
Glib support cannot be enabled due to functionality tests!
Turn on verbose messaging (-v) to ./configure to see the final report.
If you believe this message is in error you may use the continue
switch (-continue) to ./configure to continue.
-------------------->8------------------
Solution to this problem is simple we have to pass all libraries exactly
in order of their initial mention by upper layers.
Change-Id: I7ff00901031a8eb85b4fbd7889b0e0c02be806bb
This fix was sent to Qt Gerrit for review here:
https://codereview.qt-project.org/#/c/145967/
---
config.tests/unix/compile.test | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/config.tests/unix/compile.test b/config.tests/unix/compile.test
index f484f03..dac0a4f 100755
--- a/config.tests/unix/compile.test
+++ b/config.tests/unix/compile.test
@@ -73,7 +73,7 @@ test -r Makefile && $MAKE distclean >/dev/null 2>&1
rm -f "$EXE" "${EXE}.exe"
echo "QT_BUILD_TREE = $OUTDIR" > "$OUTDIR/$TEST/.qmake.cache"
-"$OUTDIR/bin/qmake" -spec "$QMKSPEC" "CONFIG+=$QMAKE_CONFIG" "CONFIG-=debug_and_release" "LIBS*=$LFLAGS" "LIBS+=$MAC_ARCH_LFLAGS" "INCLUDEPATH*=$INCLUDEPATH" "QMAKE_CXXFLAGS*=$CXXFLAGS" "QMAKE_CXXFLAGS+=$MAC_ARCH_CXXFLAGS" "$SRCDIR/$TEST/$EXE.pro" -o "$OUTDIR/$TEST/Makefile"
+"$OUTDIR/bin/qmake" -spec "$QMKSPEC" "CONFIG+=$QMAKE_CONFIG" "CONFIG-=debug_and_release" "LIBS=$LFLAGS" "LIBS+=$MAC_ARCH_LFLAGS" "INCLUDEPATH*=$INCLUDEPATH" "QMAKE_CXXFLAGS*=$CXXFLAGS" "QMAKE_CXXFLAGS+=$MAC_ARCH_CXXFLAGS" "$SRCDIR/$TEST/$EXE.pro" -o "$OUTDIR/$TEST/Makefile"
if [ "$VERBOSE" = "yes" ]; then
$MAKE
--
2.4.3

View File

@@ -0,0 +1,146 @@
From 02e9698c96ca78342b82fa7239e93bab4aa45db2 Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Fri, 17 Nov 2017 22:20:06 +0100
Subject: [PATCH] configure: fix build on non-x86 platforms
When building for an uncommon platform on a ppc64le machine, Qt build
fails because it builds qmake with the target compiler instead of
using the host compiler. This is due to the fact that Qt configure
script believes that both the host and target platforms are "powerpc",
even though the target really is Xtensa or ARC for example.
Qt's configure script defines a variable called PLATFORM that points to
the mkspecs describing the host machine. For x86, its value is
qws/linux-x86-g++ and for x86-64, its value is
qws/linux-x86_64-g++. For any other host architecture, its value is
qws/linux-generic-g++.
In parallel to this, Qt's configure script defines a variable called
XPLATFORM that points to the mkspecs describing the target machine. It
points to qws/linux-${CFG_EMBEDDED}-g++, where CFG_EMBEDDED is
simply "generic" for most uncommon architectures.
Therefore, when we're building for an uncommon architecture, on a
ppc64le machine, we have:
PLATFORM = qws/linux-generic-g++
XPLATFORM = qws/linux-generic-g++
i.e, both values are equal. Due to this, the following condition is
false:
if [ "$PLATFORM" != "$XPLATFORM" -a "$CFG_EMBEDDED" != "no" ]; then
which causes Qt's configure script to fallback to:
elif [ "$PLATFORM_MAC" = "yes" ] || [ -z "$CFG_ARCH" ]; then
CFG_ARCH=$CFG_HOST_ARCH
fi
because CFG_ARCH is not defined, and therefore gets defined to
CFG_HOST_ARCH. So we have CFG_ARCH == CFG_HOST_ARCH, and Qt believes
we're doing a native build.
Therefore, we need to ensure that PLATFORM and XPLATFORM always have a
different value. To achieve this, we create a
qws/linux-host-generic-g++ mkspecs, which is always used as
PLATFORM. It is identical to qws/linux-x86-g++. Compared to
qws/linux-x86_64-g++, the only difference is that we're not passing
the -m64 flag, but that isn't needed when building host tools.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
configure | 8 +----
mkspecs/qws/linux-host-generic-g++/qmake.conf | 10 ++++++
mkspecs/qws/linux-host-generic-g++/qplatformdefs.h | 42 ++++++++++++++++++++++
3 files changed, 53 insertions(+), 7 deletions(-)
create mode 100644 mkspecs/qws/linux-host-generic-g++/qmake.conf
create mode 100644 mkspecs/qws/linux-host-generic-g++/qplatformdefs.h
diff --git a/configure b/configure
index 10ad7ca0b0..d25f90be1e 100755
--- a/configure
+++ b/configure
@@ -2806,14 +2806,8 @@ if [ "$CFG_EMBEDDED" != "no" ]; then
Linux:*)
if [ -z "$PLATFORM" ]; then
case "$UNAME_MACHINE" in
- *86)
- PLATFORM=qws/linux-x86-g++
- ;;
- *86_64)
- PLATFORM=qws/linux-x86_64-g++
- ;;
*)
- PLATFORM=qws/linux-generic-g++
+ PLATFORM=qws/linux-host-generic-g++
;;
esac
fi
diff --git a/mkspecs/qws/linux-host-generic-g++/qmake.conf b/mkspecs/qws/linux-host-generic-g++/qmake.conf
new file mode 100644
index 0000000000..55011ec52b
--- /dev/null
+++ b/mkspecs/qws/linux-host-generic-g++/qmake.conf
@@ -0,0 +1,10 @@
+#
+# qmake configuration for building with linux-g++
+#
+
+include(../../common/linux.conf)
+include(../../common/gcc-base-unix.conf)
+include(../../common/g++-unix.conf)
+include(../../common/qws.conf)
+
+load(qt_config)
diff --git a/mkspecs/qws/linux-host-generic-g++/qplatformdefs.h b/mkspecs/qws/linux-host-generic-g++/qplatformdefs.h
new file mode 100644
index 0000000000..a654aa78a2
--- /dev/null
+++ b/mkspecs/qws/linux-host-generic-g++/qplatformdefs.h
@@ -0,0 +1,42 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "../../linux-g++/qplatformdefs.h"
--
2.13.6

View File

@@ -20,12 +20,12 @@ comment "directfb Qt driver not available (need directfb)"
depends on !BR2_PACKAGE_DIRECTFB
config BR2_PACKAGE_QT_GFX_DIRECTFB
depends on BR2_PACKAGE_DIRECTFB
bool "directFB"
depends on BR2_PACKAGE_DIRECTFB
config BR2_PACKAGE_QT_GFX_POWERVR
bool "powervr"
depends on BR2_PACKAGE_QT_OPENGL_ES
depends on BR2_PACKAGE_HAS_POWERVR
bool "powervr"
endmenu

View File

@@ -3,7 +3,7 @@ comment "qt needs a toolchain w/ C++, threads"
depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS
menuconfig BR2_PACKAGE_QT
bool "Qt"
bool "Qt (obsolete)"
depends on BR2_USE_MMU # fork
depends on BR2_INSTALL_LIBSTDCPP
depends on BR2_TOOLCHAIN_HAS_THREADS
@@ -23,8 +23,8 @@ choice
config BR2_PACKAGE_QT_EMBEDDED
bool "Qt embedded"
help
The embedded Qt installation targets embedded systems without X.org.
Provides backends for framebuffer.
The embedded Qt installation targets embedded systems
without X.org. Provides backends for framebuffer.
If unsure, say Y.
comment "Qt standard (X11) not available (need X.org)"
@@ -33,7 +33,6 @@ comment "Qt standard (X11) not available (need X.org)"
config BR2_PACKAGE_QT_X11
bool "Qt standard (X11)"
depends on BR2_PACKAGE_XORG7
depends on !BR2_TOOLCHAIN_HAS_BINUTILS_BUG_19405 # Qt GUI module
select BR2_PACKAGE_FONTCONFIG
select BR2_PACKAGE_XLIB_LIBXI
select BR2_PACKAGE_XLIB_LIBX11
@@ -45,8 +44,8 @@ config BR2_PACKAGE_QT_X11
select BR2_PACKAGE_QT_SYSTEMFREETYPE
select BR2_PACKAGE_QT_GUI_MODULE
help
The standard Qt installation provides X.org backend. If you don't want to
use X.org, say N.
The standard Qt installation provides X.org backend. If you
don't want to use X.org, say N.
endchoice
@@ -57,7 +56,6 @@ config BR2_PACKAGE_QT_DEBUG
config BR2_PACKAGE_QT_DEMOS
bool "Compile and install Qt demos (with code)"
depends on !BR2_TOOLCHAIN_HAS_BINUTILS_BUG_19405 # Qt GUI module
select BR2_PACKAGE_QT_GUI_MODULE
help
If unsure, say N.
@@ -71,7 +69,6 @@ config BR2_PACKAGE_QT_TRANSLATION_FILES
config BR2_PACKAGE_QT_EXAMPLES
bool "Compile and install Qt examples (with code)"
depends on !BR2_TOOLCHAIN_HAS_BINUTILS_BUG_19405 # Qt GUI module
select BR2_PACKAGE_QT_GUI_MODULE
help
If unsure, say N.
@@ -86,30 +83,20 @@ config BR2_PACKAGE_QT_SHARED
depends on !BR2_STATIC_LIBS
help
Create and use shared Qt libraries.
If you have multiple programs that depend on Qt or intend to use
plugins, say Y.
If you have multiple programs that depend on Qt or intend to
use plugins, say Y.
config BR2_PACKAGE_QT_STATIC
bool "Static Library"
help
Create and use static Qt libraries.
If you don't have multiple programs on the target that depends on
Qt, then this will save you quite some of storage space.
If you don't have multiple programs on the target that
depends on Qt, then this will save you quite some of storage
space.
If unsure, say Y.
endchoice
config BR2_PACKAGE_QT_LICENSE_APPROVED
bool "Approve free license"
help
Select this if you approve one of the available free licenses for the
Qt4 library.
By doing this you will not be asked while the library is compiled.
Please read and understand the license terms before approving this.
LGPL v2.1: http://doc.trolltech.com/4.5/lgpl.html
GPL v3.0: http://doc.trolltech.com/4.5/gpl.html
config BR2_PACKAGE_QT_CONFIG_FILE
string "Config file"
help
@@ -128,21 +115,17 @@ config BR2_PACKAGE_QT_QT3SUPPORT
depends on BR2_PACKAGE_QT_GUI_MODULE
select BR2_PACKAGE_QT_SQL_MODULE
help
Turns on support for older Qt3. This will create an additional
library with proxy code and increase the space required on target.
If unsure say n.
Turns on support for older Qt3. This will create an
additional library with proxy code and increase the space
required on target. If unsure say n.
config BR2_PACKAGE_QT_GUI_MODULE
bool "Gui Module"
depends on !BR2_TOOLCHAIN_HAS_BINUTILS_BUG_19405 # nios2 Binutils 2.25.1 bug
select BR2_PACKAGE_QT_NETWORK
default y
select BR2_PACKAGE_QT_NETWORK
help
Turns on support for Gui applications. If your board doesn't have
video output, or you don't require Qt GUI, say n.
comment "Qt Gui Module needs a toolchain not affected by Binutils bug 19405"
depends on BR2_TOOLCHAIN_HAS_BINUTILS_BUG_19405
Turns on support for Gui applications. If your board doesn't
have video output, or you don't require Qt GUI, say n.
if BR2_PACKAGE_QT_GUI_MODULE
@@ -185,6 +168,14 @@ endmenu
menu "Fonts"
config BR2_PACKAGE_QT_FONT_TRUETYPE
bool "dejavu/vera"
default y
depends on BR2_PACKAGE_QT_QTFREETYPE || BR2_PACKAGE_QT_SYSTEMFREETYPE
comment "dejavu/vera fonts need freetype support"
depends on !BR2_PACKAGE_QT_QTFREETYPE && !BR2_PACKAGE_QT_SYSTEMFREETYPE
config BR2_PACKAGE_QT_FONT_MICRO
bool "micro"
default y
@@ -258,8 +249,8 @@ config BR2_PACKAGE_QT_NOJPEG
Disable JPEG support
config BR2_PACKAGE_QT_SYSTEMJPEG
select BR2_PACKAGE_JPEG
bool "System libjpeg"
select BR2_PACKAGE_JPEG
help
Link against system libjpeg
@@ -338,9 +329,9 @@ endif
config BR2_PACKAGE_QT_PHONON
bool "Phonon Module"
default y
depends on BR2_PACKAGE_GSTREAMER
select BR2_PACKAGE_GST_PLUGINS_BASE
default y
help
Build the Phonon module. Support for different audio/video
formats can be configured at the GStreamer package.
@@ -358,9 +349,9 @@ config BR2_PACKAGE_QT_PHONON_BACKEND
config BR2_PACKAGE_QT_OPENGL
bool "OpenGL support"
default y
depends on (BR2_PACKAGE_HAS_LIBGL && BR2_PACKAGE_QT_X11) || \
(BR2_PACKAGE_HAS_LIBEGL && BR2_PACKAGE_HAS_LIBGLES)
default y
help
This option enables OpenGL support.
@@ -396,9 +387,9 @@ endif
config BR2_PACKAGE_QT_DBUS
bool "DBus Module"
select BR2_PACKAGE_DBUS
depends on BR2_TOOLCHAIN_HAS_THREADS # dbus
depends on BR2_USE_MMU # dbus
select BR2_PACKAGE_DBUS
help
Build the Qt DBus module.
@@ -428,8 +419,8 @@ config BR2_PACKAGE_QT_MULTIMEDIA
config BR2_PACKAGE_QT_AUDIO_BACKEND
bool "QtMultimedia Audio backend"
depends on BR2_PACKAGE_QT_MULTIMEDIA
select BR2_PACKAGE_ALSA_LIB
depends on BR2_TOOLCHAIN_HAS_THREADS # alsa-lib
select BR2_PACKAGE_ALSA_LIB
help
Build the ALSA audio backend into QtMultimedia
@@ -449,17 +440,14 @@ config BR2_PACKAGE_QT_NETWORK
config BR2_PACKAGE_QT_ARCH_SUPPORTS_WEBKIT
bool
depends on BR2_TOOLCHAIN_HAS_SYNC_4
# see src/3rdparty/webkit/Source/JavaScriptCore/wtf/Platform.h
# see http://lists.busybox.net/pipermail/buildroot/2014-November/112605.html
default y if BR2_arc || BR2_arm || BR2_armeb || BR2_i386 || BR2_microblazeel || \
BR2_microblazebe || BR2_mips || BR2_mipsel || \
(BR2_mips64 || BR2_mips64el) && !BR2_MIPS_NABI32 || BR2_powerpc || \
BR2_powerpc64 || BR2_powerpc64le || BR2_x86_64
# The CodeSourcery SuperH toolchain fails to build Webkit,
# with an assertion failure in binutils.
default y if (BR2_sh4 || BR2_sh4eb || BR2_sh4a || BR2_sh4aeb) && \
!BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH
BR2_powerpc64 || BR2_powerpc64le || BR2_x86_64 || \
BR2_sh4 || BR2_sh4eb || BR2_sh4a || BR2_sh4aeb
depends on BR2_TOOLCHAIN_HAS_SYNC_4
config BR2_PACKAGE_QT_WEBKIT
bool "WebKit Module"
@@ -505,19 +493,19 @@ config BR2_PACKAGE_QT_OPENSSL
config BR2_PACKAGE_QT_ARCH_SUPPORTS_SCRIPT
bool
depends on BR2_TOOLCHAIN_HAS_SYNC_4
# see http://lists.busybox.net/pipermail/buildroot/2014-November/112605.html
default y if BR2_arc || BR2_arm || BR2_armeb || BR2_aarch64 || BR2_i386 || \
BR2_microblazeel || BR2_microblazebe || BR2_mips || BR2_mipsel || \
BR2_mips64 || BR2_mips64el || BR2_nios2 || BR2_powerpc || \
BR2_powerpc64 || BR2_powerpc64le || BR2_sh4 || BR2_sh4eb || \
BR2_sh4a || BR2_sh4aeb || BR2_x86_64
depends on BR2_TOOLCHAIN_HAS_SYNC_4
config BR2_PACKAGE_QT_SCRIPT
bool "Script Module"
default y
depends on BR2_PACKAGE_QT_ARCH_SUPPORTS_SCRIPT
depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # needs pthread_getattr_np()
default y
help
Build the Qt Script module.
if unsure, say y.

View File

@@ -12,10 +12,6 @@ config BR2_PACKAGE_QT_MOUSE_LINUXINPUT
config BR2_PACKAGE_QT_MOUSE_TSLIB
bool "tslib"
select BR2_PACKAGE_TSLIB
depends on !BR2_STATIC_LIBS # tslib
comment "tslib support needs a toolchain w/ dynamic library"
depends on BR2_STATIC_LIBS
config BR2_PACKAGE_QT_MOUSE_QVFB
bool "qvfb"

View File

@@ -6,21 +6,14 @@ menuconfig BR2_PACKAGE_QT_SQL_MODULE
if BR2_PACKAGE_QT_SQL_MODULE
config BR2_PACKAGE_QT_MYSQL
bool "MySQL Driver"
depends on BR2_USE_MMU # mysql
select BR2_PACKAGE_MYSQL
select BR2_PACKAGE_NCURSES
select BR2_PACKAGE_READLINE
depends on BR2_USE_MMU # mysql
help
Build MySQL driver
If unsure, say n.
config BR2_PACKAGE_QT_IBASE
bool "iBase Driver"
depends on BROKEN # libfbclient not in BR
help
Build iBase driver
If unsure, say n.
config BR2_PACKAGE_QT_ODBC
bool "ODBC Driver"
select BR2_PACKAGE_UNIXODBC
@@ -30,8 +23,8 @@ config BR2_PACKAGE_QT_ODBC
config BR2_PACKAGE_QT_PSQL
bool "PostgreSQL Driver"
select BR2_PACKAGE_POSTGRESQL
depends on !BR2_STATIC_LIBS
select BR2_PACKAGE_POSTGRESQL
help
Build PostgreSQL driver
If unsure, say n.

View File

@@ -1,13 +1,6 @@
################################################################################
#
# Qt Embedded for Linux
#
# This makefile was originally composed by Thomas Lundquist <thomasez@zelow.no>
# Later heavily modified by buildroot developers
#
# BTW, this uses alot of FPU calls and it's pretty slow if you use
# the kernels FPU emulation so it's better to choose soft float in the
# buildroot config (and uClibc.config of course, if you have your own.)
# qt
#
################################################################################
@@ -18,15 +11,11 @@ QT_SITE = http://download.qt-project.org/official_releases/qt/$(QT_VERSION_MAJOR
QT_DEPENDENCIES = host-pkgconf
QT_INSTALL_STAGING = YES
QT_LICENSE := LGPLv2.1 with exceptions or GPLv3
ifneq ($(BR2_PACKAGE_QT_LICENSE_APPROVED),y)
QT_LICENSE := $(QT_LICENSE) or Digia Qt Commercial license
endif
QT_LICENSE := LGPL-2.1 with exceptions or GPL-3.0
QT_LICENSE_FILES = LICENSE.LGPL LGPL_EXCEPTION.txt LICENSE.GPL3
ifeq ($(BR2_PACKAGE_QT_LICENSE_APPROVED),y)
# Opensource licenses are the only one we catter about
QT_CONFIGURE_OPTS += -opensource -confirm-license
endif
QT_CONFIG_FILE = $(call qstrip,$(BR2_PACKAGE_QT_CONFIG_FILE))
@@ -43,6 +32,15 @@ QT_LDFLAGS = $(TARGET_LDFLAGS)
# use an older c++ standard to prevent build failure
QT_CXXFLAGS += -std=gnu++98
# gcc bug internal compiler error: in validate_condition_mode, at
# config/rs6000/rs6000.c:180744. Bug is fixed since gcc 7.
# Workaround is to set -mno-isel, see
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60818 and
# https://gcc.gnu.org/ml/gcc-patches/2016-02/msg01036.html
ifeq ($(BR2_powerpc_8540)$(BR2_powerpc_8548)$(BR2_powerpc_e500mc)$(BR2_powerpc_e5500):$(BR2_TOOLCHAIN_GCC_AT_LEAST_7),y:)
QT_CXXFLAGS += -mno-isel
endif
# Qt has some assembly function that are not present in thumb1 mode:
# Error: selected processor does not support Thumb mode `swp r3,r7,[r4]'
# so, we desactivate thumb mode
@@ -76,7 +74,6 @@ else
QT_CONFIGURE_OPTS += -no-glib
endif
### Pixel depths
QT_PIXEL_DEPTHS = # empty
ifeq ($(BR2_PACKAGE_QT_PIXEL_DEPTH_1),y)
@@ -356,9 +353,6 @@ endif
# Qt SQL Drivers
ifeq ($(BR2_PACKAGE_QT_SQL_MODULE),y)
ifeq ($(BR2_PACKAGE_QT_IBASE),y)
QT_CONFIGURE_OPTS += -qt-sql-ibase
endif
ifeq ($(BR2_PACKAGE_QT_MYSQL),y)
QT_CONFIGURE_OPTS += -qt-sql-mysql -mysql_config $(STAGING_DIR)/usr/bin/mysql_config
QT_DEPENDENCIES += mysql
@@ -476,7 +470,7 @@ endif
# End of workaround.
# Variable for other Qt applications to use
QT_QMAKE = $(HOST_DIR)/usr/bin/qmake -spec qws/linux-$(QT_EMB_PLATFORM)-g++
QT_QMAKE = $(HOST_DIR)/bin/qmake -spec qws/linux-$(QT_EMB_PLATFORM)-g++
################################################################################
# QT_QMAKE_SET -- helper macro to set <variable> = <value> in
@@ -517,7 +511,7 @@ define QT_CONFIGURE_CMDS
$(call QT_QMAKE_SET,QMAKE_CFLAGS,$(QT_CFLAGS),$(@D))
$(call QT_QMAKE_SET,QMAKE_CXXFLAGS,$(QT_CXXFLAGS),$(@D))
$(call QT_QMAKE_SET,QMAKE_LFLAGS,$(QT_LDFLAGS),$(@D))
$(call QT_QMAKE_SET,PKG_CONFIG,$(HOST_DIR)/usr/bin/pkg-config,$(@D))
$(call QT_QMAKE_SET,PKG_CONFIG,$(HOST_DIR)/bin/pkg-config,$(@D))
# Don't use TARGET_CONFIGURE_OPTS here, qmake would be compiled for the target
# instead of the host then. So set PKG_CONFIG* manually.
(cd $(@D); \
@@ -547,7 +541,6 @@ define QT_BUILD_CMDS
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
endef
# Build the list of libraries and plugins to install to the target
QT_INSTALL_LIBS += QtCore
@@ -606,7 +599,7 @@ ifeq ($(BR2_PACKAGE_QT_TEST),y)
QT_INSTALL_LIBS += QtTest
endif
QT_CONF_FILE = $(HOST_DIR)/usr/bin/qt.conf
QT_CONF_FILE = $(HOST_DIR)/bin/qt.conf
# Since host programs and spec files have been moved to $(HOST_DIR),
# we need to tell qmake the new location of the various elements,
@@ -614,11 +607,11 @@ QT_CONF_FILE = $(HOST_DIR)/usr/bin/qt.conf
define QT_INSTALL_QT_CONF
mkdir -p $(dir $(QT_CONF_FILE))
echo "[Paths]" > $(QT_CONF_FILE)
echo "Prefix=$(HOST_DIR)/usr" >> $(QT_CONF_FILE)
echo "Prefix=$(HOST_DIR)" >> $(QT_CONF_FILE)
echo "Headers=$(STAGING_DIR)/usr/include" >> $(QT_CONF_FILE)
echo "Libraries=$(STAGING_DIR)/usr/lib" >> $(QT_CONF_FILE)
echo "Data=$(HOST_DIR)/usr" >> $(QT_CONF_FILE)
echo "Binaries=$(HOST_DIR)/usr/bin" >> $(QT_CONF_FILE)
echo "Data=$(HOST_DIR)" >> $(QT_CONF_FILE)
echo "Binaries=$(HOST_DIR)/bin" >> $(QT_CONF_FILE)
endef
# After running Qt normal installation process (which installs
@@ -630,12 +623,12 @@ endef
# automatically.
define QT_INSTALL_STAGING_CMDS
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install
mkdir -p $(HOST_DIR)/usr/bin
mv $(addprefix $(STAGING_DIR)/usr/bin/,$(QT_HOST_PROGRAMS)) $(HOST_DIR)/usr/bin
ln -sf $(STAGING_DIR)/usr/mkspecs $(HOST_DIR)/usr/mkspecs
mkdir -p $(HOST_DIR)/bin
mv $(addprefix $(STAGING_DIR)/usr/bin/,$(QT_HOST_PROGRAMS)) $(HOST_DIR)/bin
ln -sf $(STAGING_DIR)/usr/mkspecs $(HOST_DIR)/mkspecs
$(QT_INSTALL_QT_CONF)
for i in moc uic rcc lupdate lrelease ; do \
$(SED) "s,^$${i}_location=.*,$${i}_location=$(HOST_DIR)/usr/bin/$${i}," \
$(SED) "s,^$${i}_location=.*,$${i}_location=$(HOST_DIR)/bin/$${i}," \
$(STAGING_DIR)/usr/lib/pkgconfig/Qt*.pc ; \
done
$(SED) "s,$(STAGING_DIR)/,,g" $(STAGING_DIR)/usr/lib/pkgconfig/Qt*.pc
@@ -689,7 +682,7 @@ QT_LICENSE_FILES += src/3rdparty/fonts/COPYRIGHT.Unifont
endif
endif # QT_FONTS
ifeq ($(BR2_PACKAGE_QT_QTFREETYPE)$(BR2_PACKAGE_QT_SYSTEMFREETYPE),y)
ifeq ($(BR2_PACKAGE_QT_FONT_TRUETYPE),y)
define QT_INSTALL_TARGET_FONTS_TTF
mkdir -p $(TARGET_DIR)/usr/lib/fonts
cp -dpf $(STAGING_DIR)/usr/lib/fonts/*.ttf $(TARGET_DIR)/usr/lib/fonts