From patchwork Sun Sep 3 18:10:34 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 111527 Delivered-To: patch@linaro.org Received: by 10.140.94.166 with SMTP id g35csp616628qge; Sun, 3 Sep 2017 11:10:59 -0700 (PDT) X-Received: by 10.84.129.1 with SMTP id 1mr9852009plb.93.1504462259679; Sun, 03 Sep 2017 11:10:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1504462259; cv=none; d=google.com; s=arc-20160816; b=X2E3C+J/Ggf8aGNjNyzJt71na0WFF/jxz0lVOaDlbd7Veo0b5RHlmfJdM1KeNi6k1r /Cc6+cMtm3AdsSxrGsozHoeqojq5Y5qpZWnIBPRxW7VcMkCYLVm5dL8v5L3WOW4OzTub QujI9qYApMuPQ2zUgVJXWwoeq2WHYF1hVFllgxyk5BCqV80HoIm/kyEuRNJWV3Wmi/st AQzz+XDn9CdRqyNDBfsY1ZmudTcZSauDEFnB8CfS5Lr4RHYWuyD30AMrmL5oUJ/D/IfS ZzWyjyc6JQ+aFxD6uIzJXyJrA8ptiswuCd/Rxy6xA6Cm3o2eK5nQzzV71zQaYd6OcQuo pgog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:dkim-signature :delivered-to:arc-authentication-results; bh=HJLq7SNzLyQ0lVW5qpiTSBh0MgykdShvn834iGJCP0U=; b=YqzVRg2nB0H5X26/KOFKD4hsd9+zCrna4dbsyCdIEEiRCgvEhnn08ZJc7CJHlkpzja /Q6zJ86cNffNFQYxDIjzNZj6oDx2q5ngaiUrzjBLJO+L7FsA4EmnZkkJGNLzwOEWNIph W1F5UpjZPSYVZFCtnSjBGucF2ArXns62YBd0OubTwyQLvaHpllZ2Xb05fQkioh3fhHR2 QTCTtBNUxxYktSKf1yhNjE3jyJQwPqc3WpiOnH/v2pzcX2PWnYM5T7GDakYYjPBZ30vg 1o4vzqjXnoyGCYgkkCAU8/nLMxWlFtFMVB99q6enUYkmTKYFXw5K6j00MorYVl/KKcpI eZnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=khM9+vb6; spf=pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-devel-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id o19si3697488pgk.236.2017.09.03.11.10.58; Sun, 03 Sep 2017 11:10:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=khM9+vb6; spf=pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-devel-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: from review.yoctoproject.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 055C977AB5; Sun, 3 Sep 2017 18:10:51 +0000 (UTC) X-Original-To: openembedded-devel@lists.openembedded.org Delivered-To: openembedded-devel@lists.openembedded.org Received: from mail-pg0-f66.google.com (mail-pg0-f66.google.com [74.125.83.66]) by mail.openembedded.org (Postfix) with ESMTP id 0E11977AB5 for ; Sun, 3 Sep 2017 18:10:47 +0000 (UTC) Received: by mail-pg0-f66.google.com with SMTP id r133so3178784pgr.2 for ; Sun, 03 Sep 2017 11:10:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=CtufEsEQE1fdPEF9hBzm/4tOJucC1clHlszNOJI5nLs=; b=khM9+vb6pNFGbtmVYv65r6mLqb6lgIlN/bZcNxIuMTIvhNBw7EWyTOeymctWvOMpBY 1n3+XiDHQ2yLjSWI1YDhDTkNWKLGcfziW2Nk/kAMMPD7jGB7UUVaFfCrpEhU9zuXlLaO uqu5Bw1+Dm2E3oBulEk8ALkb2BUkmL2ExvOPYtQKpz5/ErUMofHmehkFCZ76scvEzDJK M3mIZbMGNepBCEoQGm+I79JJq/X7ImVhsfsWB2L2ewJRorCEWpAkutsZT5wh6DRB14mt 2hi915PsoRJ7KNeXoU7J318ZXPDFy/Z+ieK8EQQytlqBJENPaSeDSvk3n7GX1dKho5Ye OxWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=CtufEsEQE1fdPEF9hBzm/4tOJucC1clHlszNOJI5nLs=; b=NOu3eNN+rk76QNwkFBWNtuWna80wdk3O+pwx9NWVNudzoX/YQwnlW6z3oEzyP8n8IS tArUbzv2BHpI/R01ftZQXZxAkQ3cklQZnVKn+6O507w/DowU1om433fIGo6DgE5MYKVg 1Msa8xVW5bpgL9zE5mPXkvnwXzzKjjnj0n+rz4PTaVSBd2llIcjtSIXI6SNE9z8kVHoJ cSoJpik8EUfPk2eGxtntVpbYEAjod9bnnTh58DxI8VupbU0EUcbX0NKFDi2q33Jmtsml zex1+BpQS325y8WghlvWSs6rglrdZ0uHLGOGkb1PgRxWup9ewNdiZD7/ODtVIIPg8m5d LkCA== X-Gm-Message-State: AHPjjUj2xvcXTzXRizFIXksShWLErEwJ4X/0tUbKdTH5JklP426FWdyH w/l7bhDSUWXawxgV X-Google-Smtp-Source: ADKCNb6/BHHkaIT7i0yZvLgsf9lvNEt0NRVLUxgEZMJ08nHmX29kEP0lq6mz/3VeS6s0a99sVM8vNg== X-Received: by 10.99.49.8 with SMTP id x8mr3913933pgx.385.1504462248914; Sun, 03 Sep 2017 11:10:48 -0700 (PDT) Received: from localhost.localdomain ([2601:646:8882:b8c::2e06]) by smtp.gmail.com with ESMTPSA id g85sm8141483pfe.77.2017.09.03.11.10.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 03 Sep 2017 11:10:48 -0700 (PDT) From: Khem Raj To: openembedded-devel@lists.openembedded.org Date: Sun, 3 Sep 2017 11:10:34 -0700 Message-Id: <20170903181035.23138-1-raj.khem@gmail.com> X-Mailer: git-send-email 2.14.1 Subject: [oe] [meta-qt5][PATCH 1/2] qtbase: Add OE clang specific mkspecs X-BeenThere: openembedded-devel@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Using the OpenEmbedded metadata to build Distributions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: openembedded-devel-bounces@lists.openembedded.org Errors-To: openembedded-devel-bounces@lists.openembedded.org We can not piggy back clang anymore on existing OE mkspecs since starting 5.9 the configure is asking compiler for include paths and it needs to know if platform is clang-linux or g++-linux Fixes: ERROR: failed to parse default search paths from compiler output Signed-off-by: Khem Raj --- classes/qmake5_base.bbclass | 7 ++- recipes-qt/qt5/qtbase-native_git.bb | 6 +- ...-Add-OE-specific-specs-for-clang-compiler.patch | 72 ++++++++++++++++++++++ recipes-qt/qt5/qtbase_git.bb | 6 +- 4 files changed, 87 insertions(+), 4 deletions(-) create mode 100644 recipes-qt/qt5/qtbase/0010-Add-OE-specific-specs-for-clang-compiler.patch -- 2.14.1 -- _______________________________________________ Openembedded-devel mailing list Openembedded-devel@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-devel diff --git a/classes/qmake5_base.bbclass b/classes/qmake5_base.bbclass index a556f4f..8e1fe20 100644 --- a/classes/qmake5_base.bbclass +++ b/classes/qmake5_base.bbclass @@ -1,6 +1,9 @@ # hardcode linux, because that's what 0001-Add-linux-oe-g-platform.patch adds -OE_QMAKE_PLATFORM_NATIVE = "linux-oe-g++" -OE_QMAKE_PLATFORM = "linux-oe-g++" +XPLATFORM_toolchain-clang = "linux-oe-clang" +XPLATFORM ?= "linux-oe-g++" + +OE_QMAKE_PLATFORM_NATIVE = "${XPLATFORM}" +OE_QMAKE_PLATFORM = "${XPLATFORM}" # Add -d to show debug output from every qmake call, but it prints *a lot*, better to add it only to debugged recipe OE_QMAKE_DEBUG_OUTPUT ?= "" diff --git a/recipes-qt/qt5/qtbase-native_git.bb b/recipes-qt/qt5/qtbase-native_git.bb index 54a0b78..72b977d 100644 --- a/recipes-qt/qt5/qtbase-native_git.bb +++ b/recipes-qt/qt5/qtbase-native_git.bb @@ -38,10 +38,14 @@ SRC_URI += "\ # 5.9.meta-qt5-native.2 SRC_URI += " \ file://0009-Always-build-uic.patch \ + file://0010-Add-OE-specific-specs-for-clang-compiler.patch \ " CLEANBROKEN = "1" +XPLATFORM_toolchain-clang = "linux-oe-clang" +XPLATFORM ?= "linux-oe-g++" + PACKAGECONFIG_CONFARGS = " \ -sysroot ${STAGING_DIR_NATIVE} \ -no-gcc-sysroot \ @@ -79,7 +83,7 @@ PACKAGECONFIG_CONFARGS = " \ -nomake examples \ -nomake tests \ -no-rpath \ - -platform linux-oe-g++ \ + -platform ${XPLATFORM} \ " # for qtbase configuration we need default settings diff --git a/recipes-qt/qt5/qtbase/0010-Add-OE-specific-specs-for-clang-compiler.patch b/recipes-qt/qt5/qtbase/0010-Add-OE-specific-specs-for-clang-compiler.patch new file mode 100644 index 0000000..b019f67 --- /dev/null +++ b/recipes-qt/qt5/qtbase/0010-Add-OE-specific-specs-for-clang-compiler.patch @@ -0,0 +1,72 @@ +From 3a46fb7b47d19c5261e1590f8d70fe41443def64 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sun, 3 Sep 2017 09:11:44 -0700 +Subject: [PATCH] Add OE specific specs for clang compiler + +Signed-off-by: Khem Raj +--- + mkspecs/linux-oe-clang/qmake.conf | 43 ++++++++++++++++++++++++++++++++++ + mkspecs/linux-oe-clang/qplatformdefs.h | 1 + + 2 files changed, 44 insertions(+) + create mode 100644 mkspecs/linux-oe-clang/qmake.conf + create mode 100644 mkspecs/linux-oe-clang/qplatformdefs.h + +diff --git a/mkspecs/linux-oe-clang/qmake.conf b/mkspecs/linux-oe-clang/qmake.conf +new file mode 100644 +index 0000000000..ffc9f051db +--- /dev/null ++++ b/mkspecs/linux-oe-clang/qmake.conf +@@ -0,0 +1,43 @@ ++# ++# qmake configuration for linux-g++ with modifications for building with OpenEmbedded ++# ++ ++MAKEFILE_GENERATOR = UNIX ++CONFIG += incremental ++QMAKE_INCREMENTAL_STYLE = sublib ++ ++include(../common/linux.conf) ++ ++# QMAKE_ (moc, uic, rcc) are gone, overwrite only ar and strip ++QMAKE_AR = $$(OE_QMAKE_AR) cqs ++QMAKE_STRIP = $$(OE_QMAKE_STRIP) ++QMAKE_WAYLAND_SCANNER = $$(OE_QMAKE_WAYLAND_SCANNER) ++ ++include(../common/gcc-base-unix.conf) ++ ++# *FLAGS from gcc-base.conf ++QMAKE_CFLAGS += $$(OE_QMAKE_CFLAGS) ++QMAKE_CXXFLAGS += $$(OE_QMAKE_CXXFLAGS) ++QMAKE_LFLAGS += $$(OE_QMAKE_LDFLAGS) ++ ++include(../common/clang.conf) ++ ++# tc settings from g++-base.conf ++QMAKE_COMPILER = $$(OE_QMAKE_COMPILER) clang ++QMAKE_CC = $$(OE_QMAKE_CC) ++QMAKE_CXX = $$(OE_QMAKE_CXX) ++ ++QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += $$(OE_QMAKE_CFLAGS) ++ ++QMAKE_LINK = $$(OE_QMAKE_LINK) ++QMAKE_LINK_SHLIB = $$(OE_QMAKE_LINK) ++QMAKE_LINK_C = $$(OE_QMAKE_LINK) ++QMAKE_LINK_C_SHLIB = $$(OE_QMAKE_LINK) ++ ++# for the SDK ++isEmpty(QMAKE_QT_CONFIG):QMAKE_QT_CONFIG = $$(OE_QMAKE_QT_CONFIG) ++ ++include(../oe-device-extra.pri) ++ ++load(device_config) ++load(qt_config) +diff --git a/mkspecs/linux-oe-clang/qplatformdefs.h b/mkspecs/linux-oe-clang/qplatformdefs.h +new file mode 100644 +index 0000000000..880c927b21 +--- /dev/null ++++ b/mkspecs/linux-oe-clang/qplatformdefs.h +@@ -0,0 +1 @@ ++#include "../linux-clang/qplatformdefs.h" +-- +2.14.1 + diff --git a/recipes-qt/qt5/qtbase_git.bb b/recipes-qt/qt5/qtbase_git.bb index aaa59f3..25d99e8 100644 --- a/recipes-qt/qt5/qtbase_git.bb +++ b/recipes-qt/qt5/qtbase_git.bb @@ -26,6 +26,7 @@ SRC_URI += "\ file://0006-Pretend-Qt5-wasn-t-found-if-OE_QMAKE_PATH_EXTERNAL_H.patch \ file://0007-Delete-qlonglong-and-qulonglong.patch \ file://0008-Replace-pthread_yield-with-sched_yield.patch \ + file://0010-Add-OE-specific-specs-for-clang-compiler.patch \ file://run-ptest \ " @@ -160,6 +161,9 @@ QT_CONFIG_FLAGS += " \ # since we cannot set empty set filename to a not existent file deltask generate_qt_config_file +XPLATFORM_toolchain-clang = "linux-oe-clang" +XPLATFORM ?= "linux-oe-g++" + do_configure() { # Avoid qmake error "Cannot read [...]/usr/lib/qt5/mkspecs/oe-device-extra.pri: No such file or directory" during configuration touch ${S}/mkspecs/oe-device-extra.pri @@ -188,7 +192,7 @@ do_configure() { -external-hostbindir ${OE_QMAKE_PATH_EXTERNAL_HOST_BINS} \ -hostdatadir ${OE_QMAKE_PATH_HOST_DATA} \ -platform ${OE_QMAKE_PLATFORM_NATIVE} \ - -xplatform linux-oe-g++ \ + -xplatform ${XPLATFORM} \ ${QT_CONFIG_FLAGS} } From patchwork Sun Sep 3 18:10:35 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 111528 Delivered-To: patch@linaro.org Received: by 10.140.94.166 with SMTP id g35csp617148qge; Sun, 3 Sep 2017 11:11:37 -0700 (PDT) X-Received: by 10.99.42.203 with SMTP id q194mr9189210pgq.378.1504462297868; Sun, 03 Sep 2017 11:11:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1504462297; cv=none; d=google.com; s=arc-20160816; b=dIauKegNPzUq9hkqaISvbFbwrLxsKOcakDVwR4QZnoR93TQWTLKAVOnuS6foLAbg10 P9VsM2jB/tQ+Tvowrwg3KTioXK42fi0XvOs/yO3Qo6ORcadE+H3fUSs0KTcdj1+9H1zK Q3jqcduzQWJG3tYXm2DitNSNSbhMFwCl3Gj0yBXljXRfZg7wseOa3xUHDv9UnrylApCA mmyQIVEwzCoj2gLyPNTYGMQevWPTgndMGQPMGbPpjHnzu44eljcm9P4OwVxgUwHR82R0 TvXXrZlth3guImXYjOVs9gK0VIK3PKsdQslLL6ZcRRMCjiX49VwI18iAF/w9nImh3VMG bNnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to:arc-authentication-results; bh=HOqcug5ziyTCCM+NdZIbhY9CgqfhkugX7PbUL+ThFDM=; b=GSNwslUBdSERMFRblfutdyoxPXTnczqNDzNKR/iVN4MRPNgZMelMmo1ErWjYfCfMmQ Dqp88vhyOEhTEhqTddt0dAEAbdfz1H5GJo1Qecz2rwkTItjgVJOfwpxAlQjkAh8ZzOT9 hMGX3/UHEu5STq1lMWpjK0MR/H3MTBVa6z7s2aPSSGSFwDnYQS+v3cvlIliBgXBFnKBe 3oqkM9lTeyQ7UM1yE2/NATSU/yhmw34sEptB+zR5MuEgWUEmcgQ9oN7T0MWcggGTAmfW F1zbnte2VBYbfzcuuG0vmBF6J0Ey5exyPpr9SfVlZ5ewEu5VX8KP2GQxnlrpb1a2EMtq 8Qrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=ePR+ryKx; spf=pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-devel-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id l19si3691269pgc.745.2017.09.03.11.11.37; Sun, 03 Sep 2017 11:11:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=ePR+ryKx; spf=pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-devel-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: from review.yoctoproject.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 3667C7820F; Sun, 3 Sep 2017 18:11:35 +0000 (UTC) X-Original-To: openembedded-devel@lists.openembedded.org Delivered-To: openembedded-devel@lists.openembedded.org Received: from mail-pf0-f195.google.com (mail-pf0-f195.google.com [209.85.192.195]) by mail.openembedded.org (Postfix) with ESMTP id 5F43677AB5 for ; Sun, 3 Sep 2017 18:10:48 +0000 (UTC) Received: by mail-pf0-f195.google.com with SMTP id v22so3125364pfk.1 for ; Sun, 03 Sep 2017 11:10:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=PohjMTmyb03JHKgRhnu/D7+QgCRc2SLTZ6L/HMBLBOw=; b=ePR+ryKxMvGmNuSM0MYjZ7Jh/Lj0udFbrmmKYedGGhCf9hmcIBCfQq9p0J1b12feol yBfamhIKQInSd6665wGaKZZso88AWvpZZbV4zHWA0JbZcXLkvF8F4edeWFaULZ4PAahD 3Z9aZq14C1qx8W7xkW3be1pB4abhIZFst/m52cwjH4l9k+4Eiy47B37jCEXoj1Dym2pT tOgBNviYqwJaZB2DYkftyRj1/s9JVjkYgEJmqzgPTO36i4ZDf2Fh6EEX4vflfpPEtIBf cEFzsNBeFQAqu0u1GYGaCYfMna6YqbvXHn2vyJ5J7UhCRgeL5YLdKkrYI18XWIKQ/J05 NsOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=PohjMTmyb03JHKgRhnu/D7+QgCRc2SLTZ6L/HMBLBOw=; b=PfQARjG0aPKCbv/CCqVV+Tfimq1ZNlP45OwBmudey26a8wqAYdu49Ldk1YlHdqunZt fWjM3GcQY1rXY/qIGiozwu2LCQUFTm3sXWejI66L82Cx9vM4/0O1R2bnMQ2XloHBrKs/ d0vZUzL9SJoi525c2mT1uQHlkq+W5Pp2tf1xkmY+WWcLhgtYSo5emR/LqKA4NcFYbCrw 2EZLL1tnHElyUMxgVTn2ZPJLqKF1cYLae8gU9YiXXGlvWcT25shLB41GqBvS9DXwCk4P CpwkS6LazteZFSL6RuZgc1XE2hdzVedfmhiFOsYqX5hiqe4uDesFAIfBqbB406FCesQq TejQ== X-Gm-Message-State: AHPjjUiqg4eusexfyitavw0S3h0EFbZZcvTcNvr8EYCWRD7ybUR+0dPR mqeVa6zCVuywpdBC X-Google-Smtp-Source: ADKCNb6YyeZ+eqVN2gSmelo9tMEWMNbZZjyxu/4zR3woVNMxqVGtu8XDcH1tCE7Az9DHb0IfpUZEjA== X-Received: by 10.99.1.85 with SMTP id 82mr9307475pgb.392.1504462250013; Sun, 03 Sep 2017 11:10:50 -0700 (PDT) Received: from localhost.localdomain ([2601:646:8882:b8c::2e06]) by smtp.gmail.com with ESMTPSA id g85sm8141483pfe.77.2017.09.03.11.10.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 03 Sep 2017 11:10:49 -0700 (PDT) From: Khem Raj To: openembedded-devel@lists.openembedded.org Date: Sun, 3 Sep 2017 11:10:35 -0700 Message-Id: <20170903181035.23138-2-raj.khem@gmail.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20170903181035.23138-1-raj.khem@gmail.com> References: <20170903181035.23138-1-raj.khem@gmail.com> Subject: [oe] [meta-qt5][PATCH 2/2] qtbase: Fix build with musl/clang X-BeenThere: openembedded-devel@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Using the OpenEmbedded metadata to build Distributions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: openembedded-devel-bounces@lists.openembedded.org Errors-To: openembedded-devel-bounces@lists.openembedded.org Signed-off-by: Khem Raj --- 0001-qtbase-Add-OE-clang-specific-mkspecs.patch | 178 +++++++++++++++++++++ recipes-qt/qt5/qtbase-native_git.bb | 2 + ...-Invert-conditional-for-defining-QT_SOCKL.patch | 35 ++++ ..._qlocale-Enable-QT_USE_FENV-only-on-glibc.patch | 28 ++++ recipes-qt/qt5/qtbase_git.bb | 2 + 5 files changed, 245 insertions(+) create mode 100644 0001-qtbase-Add-OE-clang-specific-mkspecs.patch create mode 100644 recipes-qt/qt5/qtbase/0011-linux-clang-Invert-conditional-for-defining-QT_SOCKL.patch create mode 100644 recipes-qt/qt5/qtbase/0012-tst_qlocale-Enable-QT_USE_FENV-only-on-glibc.patch -- 2.14.1 -- _______________________________________________ Openembedded-devel mailing list Openembedded-devel@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-devel diff --git a/0001-qtbase-Add-OE-clang-specific-mkspecs.patch b/0001-qtbase-Add-OE-clang-specific-mkspecs.patch new file mode 100644 index 0000000..99c5331 --- /dev/null +++ b/0001-qtbase-Add-OE-clang-specific-mkspecs.patch @@ -0,0 +1,178 @@ +From 75aeb71530c456b9800bcc83c104e3906e47e9e4 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sun, 3 Sep 2017 09:29:02 -0700 +Subject: [PATCH] qtbase: Add OE clang specific mkspecs + +We can not piggy back clang anymore on existing +OE mkspecs since starting 5.9 the configure is +asking compiler for include paths and it needs to +know if platform is clang-linux or g++-linux + +Fixes: +ERROR: failed to parse default search paths from compiler output + +Signed-off-by: Khem Raj +--- + classes/qmake5_base.bbclass | 7 ++- + recipes-qt/qt5/qtbase-native_git.bb | 6 +- + ...-Add-OE-specific-specs-for-clang-compiler.patch | 72 ++++++++++++++++++++++ + recipes-qt/qt5/qtbase_git.bb | 6 +- + 4 files changed, 87 insertions(+), 4 deletions(-) + create mode 100644 recipes-qt/qt5/qtbase/0010-Add-OE-specific-specs-for-clang-compiler.patch + +diff --git a/classes/qmake5_base.bbclass b/classes/qmake5_base.bbclass +index a556f4f..8e1fe20 100644 +--- a/classes/qmake5_base.bbclass ++++ b/classes/qmake5_base.bbclass +@@ -1,6 +1,9 @@ + # hardcode linux, because that's what 0001-Add-linux-oe-g-platform.patch adds +-OE_QMAKE_PLATFORM_NATIVE = "linux-oe-g++" +-OE_QMAKE_PLATFORM = "linux-oe-g++" ++XPLATFORM_toolchain-clang = "linux-oe-clang" ++XPLATFORM ?= "linux-oe-g++" ++ ++OE_QMAKE_PLATFORM_NATIVE = "${XPLATFORM}" ++OE_QMAKE_PLATFORM = "${XPLATFORM}" + + # Add -d to show debug output from every qmake call, but it prints *a lot*, better to add it only to debugged recipe + OE_QMAKE_DEBUG_OUTPUT ?= "" +diff --git a/recipes-qt/qt5/qtbase-native_git.bb b/recipes-qt/qt5/qtbase-native_git.bb +index 54a0b78..72b977d 100644 +--- a/recipes-qt/qt5/qtbase-native_git.bb ++++ b/recipes-qt/qt5/qtbase-native_git.bb +@@ -38,10 +38,14 @@ SRC_URI += "\ + # 5.9.meta-qt5-native.2 + SRC_URI += " \ + file://0009-Always-build-uic.patch \ ++ file://0010-Add-OE-specific-specs-for-clang-compiler.patch \ + " + + CLEANBROKEN = "1" + ++XPLATFORM_toolchain-clang = "linux-oe-clang" ++XPLATFORM ?= "linux-oe-g++" ++ + PACKAGECONFIG_CONFARGS = " \ + -sysroot ${STAGING_DIR_NATIVE} \ + -no-gcc-sysroot \ +@@ -79,7 +83,7 @@ PACKAGECONFIG_CONFARGS = " \ + -nomake examples \ + -nomake tests \ + -no-rpath \ +- -platform linux-oe-g++ \ ++ -platform ${XPLATFORM} \ + " + + # for qtbase configuration we need default settings +diff --git a/recipes-qt/qt5/qtbase/0010-Add-OE-specific-specs-for-clang-compiler.patch b/recipes-qt/qt5/qtbase/0010-Add-OE-specific-specs-for-clang-compiler.patch +new file mode 100644 +index 0000000..b019f67 +--- /dev/null ++++ b/recipes-qt/qt5/qtbase/0010-Add-OE-specific-specs-for-clang-compiler.patch +@@ -0,0 +1,72 @@ ++From 3a46fb7b47d19c5261e1590f8d70fe41443def64 Mon Sep 17 00:00:00 2001 ++From: Khem Raj ++Date: Sun, 3 Sep 2017 09:11:44 -0700 ++Subject: [PATCH] Add OE specific specs for clang compiler ++ ++Signed-off-by: Khem Raj ++--- ++ mkspecs/linux-oe-clang/qmake.conf | 43 ++++++++++++++++++++++++++++++++++ ++ mkspecs/linux-oe-clang/qplatformdefs.h | 1 + ++ 2 files changed, 44 insertions(+) ++ create mode 100644 mkspecs/linux-oe-clang/qmake.conf ++ create mode 100644 mkspecs/linux-oe-clang/qplatformdefs.h ++ ++diff --git a/mkspecs/linux-oe-clang/qmake.conf b/mkspecs/linux-oe-clang/qmake.conf ++new file mode 100644 ++index 0000000000..ffc9f051db ++--- /dev/null +++++ b/mkspecs/linux-oe-clang/qmake.conf ++@@ -0,0 +1,43 @@ +++# +++# qmake configuration for linux-g++ with modifications for building with OpenEmbedded +++# +++ +++MAKEFILE_GENERATOR = UNIX +++CONFIG += incremental +++QMAKE_INCREMENTAL_STYLE = sublib +++ +++include(../common/linux.conf) +++ +++# QMAKE_ (moc, uic, rcc) are gone, overwrite only ar and strip +++QMAKE_AR = $$(OE_QMAKE_AR) cqs +++QMAKE_STRIP = $$(OE_QMAKE_STRIP) +++QMAKE_WAYLAND_SCANNER = $$(OE_QMAKE_WAYLAND_SCANNER) +++ +++include(../common/gcc-base-unix.conf) +++ +++# *FLAGS from gcc-base.conf +++QMAKE_CFLAGS += $$(OE_QMAKE_CFLAGS) +++QMAKE_CXXFLAGS += $$(OE_QMAKE_CXXFLAGS) +++QMAKE_LFLAGS += $$(OE_QMAKE_LDFLAGS) +++ +++include(../common/clang.conf) +++ +++# tc settings from g++-base.conf +++QMAKE_COMPILER = $$(OE_QMAKE_COMPILER) clang +++QMAKE_CC = $$(OE_QMAKE_CC) +++QMAKE_CXX = $$(OE_QMAKE_CXX) +++ +++QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += $$(OE_QMAKE_CFLAGS) +++ +++QMAKE_LINK = $$(OE_QMAKE_LINK) +++QMAKE_LINK_SHLIB = $$(OE_QMAKE_LINK) +++QMAKE_LINK_C = $$(OE_QMAKE_LINK) +++QMAKE_LINK_C_SHLIB = $$(OE_QMAKE_LINK) +++ +++# for the SDK +++isEmpty(QMAKE_QT_CONFIG):QMAKE_QT_CONFIG = $$(OE_QMAKE_QT_CONFIG) +++ +++include(../oe-device-extra.pri) +++ +++load(device_config) +++load(qt_config) ++diff --git a/mkspecs/linux-oe-clang/qplatformdefs.h b/mkspecs/linux-oe-clang/qplatformdefs.h ++new file mode 100644 ++index 0000000000..880c927b21 ++--- /dev/null +++++ b/mkspecs/linux-oe-clang/qplatformdefs.h ++@@ -0,0 +1 @@ +++#include "../linux-clang/qplatformdefs.h" ++-- ++2.14.1 ++ +diff --git a/recipes-qt/qt5/qtbase_git.bb b/recipes-qt/qt5/qtbase_git.bb +index aaa59f3..25d99e8 100644 +--- a/recipes-qt/qt5/qtbase_git.bb ++++ b/recipes-qt/qt5/qtbase_git.bb +@@ -26,6 +26,7 @@ SRC_URI += "\ + file://0006-Pretend-Qt5-wasn-t-found-if-OE_QMAKE_PATH_EXTERNAL_H.patch \ + file://0007-Delete-qlonglong-and-qulonglong.patch \ + file://0008-Replace-pthread_yield-with-sched_yield.patch \ ++ file://0010-Add-OE-specific-specs-for-clang-compiler.patch \ + file://run-ptest \ + " + +@@ -160,6 +161,9 @@ QT_CONFIG_FLAGS += " \ + # since we cannot set empty set filename to a not existent file + deltask generate_qt_config_file + ++XPLATFORM_toolchain-clang = "linux-oe-clang" ++XPLATFORM ?= "linux-oe-g++" ++ + do_configure() { + # Avoid qmake error "Cannot read [...]/usr/lib/qt5/mkspecs/oe-device-extra.pri: No such file or directory" during configuration + touch ${S}/mkspecs/oe-device-extra.pri +@@ -188,7 +192,7 @@ do_configure() { + -external-hostbindir ${OE_QMAKE_PATH_EXTERNAL_HOST_BINS} \ + -hostdatadir ${OE_QMAKE_PATH_HOST_DATA} \ + -platform ${OE_QMAKE_PLATFORM_NATIVE} \ +- -xplatform linux-oe-g++ \ ++ -xplatform ${XPLATFORM} \ + ${QT_CONFIG_FLAGS} + } + +-- +2.14.1 + diff --git a/recipes-qt/qt5/qtbase-native_git.bb b/recipes-qt/qt5/qtbase-native_git.bb index 72b977d..5137dee 100644 --- a/recipes-qt/qt5/qtbase-native_git.bb +++ b/recipes-qt/qt5/qtbase-native_git.bb @@ -39,6 +39,8 @@ SRC_URI += "\ SRC_URI += " \ file://0009-Always-build-uic.patch \ file://0010-Add-OE-specific-specs-for-clang-compiler.patch \ + file://0011-linux-clang-Invert-conditional-for-defining-QT_SOCKL.patch \ + file://0012-tst_qlocale-Enable-QT_USE_FENV-only-on-glibc.patch \ " CLEANBROKEN = "1" diff --git a/recipes-qt/qt5/qtbase/0011-linux-clang-Invert-conditional-for-defining-QT_SOCKL.patch b/recipes-qt/qt5/qtbase/0011-linux-clang-Invert-conditional-for-defining-QT_SOCKL.patch new file mode 100644 index 0000000..0c7fb87 --- /dev/null +++ b/recipes-qt/qt5/qtbase/0011-linux-clang-Invert-conditional-for-defining-QT_SOCKL.patch @@ -0,0 +1,35 @@ +From 8394ad48f454aa292e4da57b3b75a3701dadcf96 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sun, 3 Sep 2017 09:44:48 -0700 +Subject: [PATCH] linux-clang: Invert conditional for defining QT_SOCKLEN_T + +This helps to make sure that QT_SOCKLEN_T is defined to be 'int' +only when its glibc < 2 and not for other libcswhich may define +it as per standards but are not glibc, e.g. musl + +Signed-off-by: Khem Raj +--- + mkspecs/linux-clang/qplatformdefs.h | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/mkspecs/linux-clang/qplatformdefs.h b/mkspecs/linux-clang/qplatformdefs.h +index d29225f12f..a0cdb57343 100644 +--- a/mkspecs/linux-clang/qplatformdefs.h ++++ b/mkspecs/linux-clang/qplatformdefs.h +@@ -84,10 +84,10 @@ + + #undef QT_SOCKLEN_T + +-#if defined(__GLIBC__) && (__GLIBC__ >= 2) +-#define QT_SOCKLEN_T socklen_t +-#else ++#if defined(__GLIBC__) && (__GLIBC__ < 2) + #define QT_SOCKLEN_T int ++#else ++#define QT_SOCKLEN_T socklen_t + #endif + + #if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500) +-- +2.14.1 + diff --git a/recipes-qt/qt5/qtbase/0012-tst_qlocale-Enable-QT_USE_FENV-only-on-glibc.patch b/recipes-qt/qt5/qtbase/0012-tst_qlocale-Enable-QT_USE_FENV-only-on-glibc.patch new file mode 100644 index 0000000..a177625 --- /dev/null +++ b/recipes-qt/qt5/qtbase/0012-tst_qlocale-Enable-QT_USE_FENV-only-on-glibc.patch @@ -0,0 +1,28 @@ +From 30076434a9f651614db8c3e5db32d4acae54c600 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sun, 3 Sep 2017 10:11:50 -0700 +Subject: [PATCH] tst_qlocale: Enable QT_USE_FENV only on glibc + +musl does not have feenableexcept function + +Signed-off-by: Khem Raj +--- + tests/auto/corelib/tools/qlocale/tst_qlocale.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp b/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp +index 10d78b1f2f..a59f358f80 100644 +--- a/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp ++++ b/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp +@@ -46,7 +46,7 @@ + #include + #include + +-#if defined(Q_OS_LINUX) && !defined(__UCLIBC__) ++#if defined(Q_OS_LINUX) && defined(__GLIBC__) + # define QT_USE_FENV + #endif + +-- +2.14.1 + diff --git a/recipes-qt/qt5/qtbase_git.bb b/recipes-qt/qt5/qtbase_git.bb index 25d99e8..dce2d77 100644 --- a/recipes-qt/qt5/qtbase_git.bb +++ b/recipes-qt/qt5/qtbase_git.bb @@ -27,6 +27,8 @@ SRC_URI += "\ file://0007-Delete-qlonglong-and-qulonglong.patch \ file://0008-Replace-pthread_yield-with-sched_yield.patch \ file://0010-Add-OE-specific-specs-for-clang-compiler.patch \ + file://0011-linux-clang-Invert-conditional-for-defining-QT_SOCKL.patch \ + file://0012-tst_qlocale-Enable-QT_USE_FENV-only-on-glibc.patch \ file://run-ptest \ "