qt5-creator: fix build with QMAKE_AR

* now it builds OK at least for qemux86-64, but then do_install fails:

| /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/qt5-creator/4.7.1+gitAUTOINC+8768e39d3c-r0/recipe-sysroot-native/usr/bin/qmake -install qinstall /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/qt5-creator/4.7.1+gitAUTOINC+8768e39d3c-r0/build/share/doc/qtcreator/qtcreator.qch /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/qt5-creator/4.7.1+gitAUTOINC+8768e39d3c-r0/image/usr/share/doc/qtcreator/qtcreator.qch
| Error copying /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/qt5-creator/4.7.1+gitAUTOINC+8768e39d3c-r0/build/share/doc/qtcreator/qtcreator.qch to /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/qt5-creator/4.7.1+gitAUTOINC+8768e39d3c-r0/image/usr/share/doc/qtcreator/qtcreator.qch: Cannot open /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/qt5-creator/4.7.1+gitAUTOINC+8768e39d3c-r0/build/share/doc/qtcreator/qtcreator.qch for input
| Makefile:492: recipe for target 'install_inst_qch_docs' failed

  http://errors.yoctoproject.org/Errors/Build/68948/

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
This commit is contained in:
Martin Jansa
2018-09-26 21:19:26 +00:00
parent 0cf5966d39
commit f11e9420e9
3 changed files with 82 additions and 1 deletions

View File

@@ -0,0 +1,80 @@
From cd006f4a79b3c1435a8a8321b5af9191f104bbb3 Mon Sep 17 00:00:00 2001
From: Martin Jansa <Martin.Jansa@gmail.com>
Date: Wed, 26 Sep 2018 21:14:06 +0000
Subject: [PATCH] botan.pro: pass QMAKE_AR
* otherwise AR from environment sets it with cqs params, e.g.:
x86_64-oe-linux-ar cqs
from QMAKE_AR = ${OE_QMAKE_AR} cqs
but then botan's Makefile will add "crs" after it causing:
http://errors.yoctoproject.org/Errors/Details/194653/
x86_64-oe-linux-ar cqs crs libbotan-2.a build/obj/lib/botan_all.o build/obj/lib/botan_all_ssse3.o
x86_64-oe-linux-ar: libbotan-2.a: No such file or directory
Makefile:79: recipe for target 'libbotan-2.a' failed
make[4]: *** [libbotan-2.a] Error 1
* add --ar-options parameter to botan configure and respect the
value when set (before cc.ar_options and osinfo.ar_options)
then use this to pass empty ar_options as we already include
the options in ar_command
Upstream-Status: Pending
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
src/libs/3rdparty/botan/configure.py | 13 ++++++++++++-
src/libs/botan/botan.pro | 1 +
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/src/libs/3rdparty/botan/configure.py b/src/libs/3rdparty/botan/configure.py
index b09f07bb5e..2b5b9c6417 100755
--- a/src/libs/3rdparty/botan/configure.py
+++ b/src/libs/3rdparty/botan/configure.py
@@ -321,6 +321,9 @@ def process_command_line(args): # pylint: disable=too-many-locals
target_group.add_option('--ar-command', dest='ar_command', metavar='AR', default=None,
help='set path to static archive creator')
+ target_group.add_option('--ar-options', dest='ar_options', metavar='crs', default='crs',
+ help='set options for static archive creator')
+
target_group.add_option('--msvc-runtime', metavar='RT', default=None,
help='specify MSVC runtime (MT, MD, MTd, MDd)')
@@ -1786,6 +1789,14 @@ def create_template_vars(source_paths, build_paths, options, modules, cc, arch,
return osinfo.ar_command
+ def ar_options():
+ if options.ar_options:
+ return options.ar_options
+ if cc.ar_options:
+ return cc.ar_options
+
+ return osinfo.ar_options
+
def choose_endian(arch_info, options):
if options.with_endian != None:
return options.with_endian
@@ -1938,7 +1949,7 @@ def create_template_vars(source_paths, build_paths, options, modules, cc, arch,
'post_link_cmd': '',
'ar_command': ar_command(),
- 'ar_options': cc.ar_options or osinfo.ar_options,
+ 'ar_options': ar_options(),
'ar_output_to': cc.ar_output_to,
'link_to': ' '.join(
diff --git a/src/libs/botan/botan.pro b/src/libs/botan/botan.pro
index 0c939b2a30..e8082c4bbb 100644
--- a/src/libs/botan/botan.pro
+++ b/src/libs/botan/botan.pro
@@ -46,6 +46,7 @@ configure.variable_out = BOTAN_MAKEFILE
configure.commands = cd $$BOTAN_BUILD_DIR_FOR_SHELL && \
python $$CONFIGURE_FILE_PATH_FOR_SHELL \
--cc=$$BOTAN_CC_TYPE --cc-bin=$$shell_quote($$QMAKE_CXX) \
+ --ar-command=$$shell_quote($$QMAKE_AR) --ar-options=$$shell_quote(' ') \
$$BOTAN_ARCH_SWITCH $$BOTAN_OS_SWITCH $$OTHER_FLAGS
QMAKE_EXTRA_COMPILERS += configure

View File

@@ -25,9 +25,10 @@ PV = "4.7.1+git${SRCPV}"
SRC_URI = " \
git://code.qt.io/qt-creator/qt-creator.git;branch=4.7 \
file://0001-Use-correct-path-prefix.patch \
file://0002-botan.pro-pass-QMAKE_AR.patch \
file://qtcreator.desktop.in \
"
SRC_URI_append_libc-musl = " file://0002-Link-with-libexecinfo-on-musl.patch"
SRC_URI_append_libc-musl = " file://0003-Link-with-libexecinfo-on-musl.patch"
S = "${WORKDIR}/git"