From patchwork Wed Oct 2 22:24:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Giulio Benetti X-Patchwork-Id: 1170940 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.137; helo=fraxinus.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=benettiengineering.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=aruba.it header.i=@aruba.it header.b="Ez5tfBNF"; dkim-atps=neutral Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 46k9ps4k3Gz9sN1 for ; Thu, 3 Oct 2019 08:31:31 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 41C9886702; Wed, 2 Oct 2019 22:31:30 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6FjVAHQwwgsp; Wed, 2 Oct 2019 22:31:29 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 7DE0A865AB; Wed, 2 Oct 2019 22:31:29 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 6028F1BF96B for ; Wed, 2 Oct 2019 22:31:27 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 5D22586559 for ; Wed, 2 Oct 2019 22:31:27 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id AzJyWC38g7Tl for ; Wed, 2 Oct 2019 22:31:25 +0000 (UTC) X-Greylist: delayed 00:07:07 by SQLgrey-1.7.6 Received: from smtpcmd14161.aruba.it (smtpcmd14161.aruba.it [62.149.156.161]) by fraxinus.osuosl.org (Postfix) with ESMTP id 49D30865AB for ; Wed, 2 Oct 2019 22:31:25 +0000 (UTC) Received: from ubuntu.localdomain ([88.149.228.83]) by smtpcmd14.ad.aruba.it with bizsmtp id 8mQE2100h1oc9G801mQEfa; Thu, 03 Oct 2019 00:24:15 +0200 From: Giulio Benetti To: buildroot@buildroot.org Date: Thu, 3 Oct 2019 00:24:13 +0200 Message-Id: <20191002222413.8382-1-giulio.benetti@benettiengineering.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <910c787-a8f7-53d7-0a89-fe99985c40b9@benettiengineering.com> References: <910c787-a8f7-53d7-0a89-fe99985c40b9@benettiengineering.com> MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aruba.it; s=a1; t=1570055055; bh=wpwpQrqPf9odELM1btIOCVN0NGujJPAg6YX2cWoi7rs=; h=From:To:Subject:Date:MIME-Version; b=Ez5tfBNFOgRkA7v3dtCBYHS5gvCSHmHyoAK245dzqPvJawKRj/fv3xKmnu+JWHbcJ JVXVrSivghWG1xIf0Ga+lpFiVLFvagDTMy6Jy1NG0/A8X0ICoYRaAuWjZxBWzDAg8X 9/PZgUWjKuHpGM1fBTwdjtqD2W2gU1hLGR6gM8gWHLWChNGAgK10Ho8weepHp58PqS R9APxhtenxrfF8sjuCeAbKBpOL8iwOwHBv5lF66PiDHLEFg09gEVIc5OaLGEASWBGA bTZy1Sp9dv5PDVoPcmAE0Q/gS/mlbQmXsSEWgpKh4dLJaw+R1E8eWRyV3qvDbkYVxc C8zPe/+ophxkg== Subject: [Buildroot] [PATCH v2] package/qt5base: fix building with correct optimization X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Giulio Benetti , Peter Seiderer Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" In Qt5 mkspecs/features/default_post.prf(included after our qmake.conf): debug { QMAKE_CFLAGS += $$QMAKE_CFLAGS_DEBUG QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_DEBUG QMAKE_LFLAGS += $$QMAKE_LFLAGS_DEBUG QMAKE_LIBFLAGS += $$QMAKE_LIBFLAGS_DEBUG } else { QMAKE_CFLAGS += $$QMAKE_CFLAGS_RELEASE QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_RELEASE QMAKE_LFLAGS += $$QMAKE_LFLAGS_RELEASE QMAKE_LIBFLAGS += $$QMAKE_LIBFLAGS_RELEASE } QMAKE_CFLAGS is set to QMAKE_CFLAGS_RELEASE that in order is set to one of QMAKE_CFLAGS_OPTIMIZE depending on qt5 optimization chosen. Unfortunately patch: https://git.buildroot.net/buildroot/commit/?id=7c0aa83527e0b0179f9e3f73a3e63df1fdc5a6e6 is not enough, since QMAKE_CFLAGS_RELEASE is set to QMAKE_CFLAGS_OPTIMIZE in a unique file, resulting in resetting QMAKE_CFLAGS_OPTIMIZE only after QMAKE_FLAGS_RELEASE is set. The only way is to directly reset: QMAKE_CFLAGS_RELEASE QMAKE_CFLAGS_DEBUG QMAKE_CXXFLAGS_RELEASE QMAKE_CXXFLAGS_DEBUG in our qmake.conf.in. This package is also affected by BR2_TOOLCHAIN_HAS_GCC_BUG_90620 and it's been worked around by appending -O0 to CFLAGS/CXXFLAGS. This bug prevented workaround to work overriding optimization flags, so solving this also solves workaround problem. Fixes: http://autobuild.buildroot.net/results/ada/adaa9b4bcc6f9d2b5e82c479859a07e8abf5cf13/ http://autobuild.buildroot.net/results/a83/a83bdd1f3bf309c07abebe871b017c331ed36e67/ Signed-off-by: Giulio Benetti --- V1->V2: * rewritten entire commit log --- package/qt5/qt5base/qmake.conf.in | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/package/qt5/qt5base/qmake.conf.in b/package/qt5/qt5base/qmake.conf.in index 2eb564e172..ae25b2e20f 100644 --- a/package/qt5/qt5base/qmake.conf.in +++ b/package/qt5/qt5base/qmake.conf.in @@ -19,6 +19,10 @@ QMAKE_CFLAGS_OPTIMIZE = QMAKE_CFLAGS_OPTIMIZE_DEBUG = QMAKE_CFLAGS_OPTIMIZE_FULL = QMAKE_CFLAGS_OPTIMIZE_SIZE = +QMAKE_CFLAGS_DEBUG = +QMAKE_CXXFLAGS_DEBUG = +QMAKE_CFLAGS_RELEASE = +QMAKE_CXXFLAGS_RELEASE = CONFIG += nostrip QMAKE_LIBS += -lrt -lpthread -ldl