From patchwork Wed Sep 18 09:11:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Giulio Benetti X-Patchwork-Id: 1163869 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.133; helo=hemlock.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="WIuP4+38"; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 46YDtr6K7Hz9sN1 for ; Wed, 18 Sep 2019 19:19:00 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 3D54B87A60; Wed, 18 Sep 2019 09:18:58 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id b9gAYzSFcQ7w; Wed, 18 Sep 2019 09:18:57 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id B895D87AEE; Wed, 18 Sep 2019 09:18:57 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 66E2D1BF41E for ; Wed, 18 Sep 2019 09:18:56 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 63D6487AEE for ; Wed, 18 Sep 2019 09:18:56 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Pw+czhzkO3pC for ; Wed, 18 Sep 2019 09:18:54 +0000 (UTC) X-Greylist: delayed 00:07:06 by SQLgrey-1.7.6 Received: from smtpcmd0871.aruba.it (smtpcmd0871.aruba.it [62.149.156.71]) by hemlock.osuosl.org (Postfix) with ESMTP id 4913F87A60 for ; Wed, 18 Sep 2019 09:18:54 +0000 (UTC) Received: from ubuntu.localdomain ([88.149.228.83]) by smtpcmd08.ad.aruba.it with bizsmtp id 2xBj2100m1oc9G801xBjpE; Wed, 18 Sep 2019 11:11:46 +0200 From: Giulio Benetti To: buildroot@buildroot.org Date: Wed, 18 Sep 2019 11:11:42 +0200 Message-Id: <20190918091142.79696-1-giulio.benetti@benettiengineering.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aruba.it; s=a1; t=1568797906; bh=iw32e+2d39ixGLh2lids6br1hPewjvCUssaTzfrF0Hw=; h=From:To:Subject:Date:MIME-Version; b=WIuP4+38OidESYCsrb9HBoRDE7NmsxQNQG0FqtSBsE9BpUvmcw5YFtJwibReYtcR1 WgMBN7Hxq6ZhcC7kApiETZxX4Kwqj3oWvsTgnOl8FKkAZqyqjEJOlAV5wjJKH3g0Br 54F1voPrhBWnysjlhRvWL2IGoIntRMo33AkAQOeAt5AENQ8Hz+u7iSymZ5CRVMCouc BpQB2bZc2egdFFJP0ZNzMTPlH8KudhlBsWnJC7k7XucwOiIqsKHfYFDD4y0Tind9RY gnurjhQTPtjPcwDVw/IpUvau//Ya7kyx64g9cnuZeur/AWxWxRDNFgglpj1q7ra9Ng SWHKNw06lsNEw== Subject: [Buildroot] [PATCH] package/protobuf: work around gcc bug 85180 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 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" With Microblaze Gcc version < 8.x the build hangs due to gcc bug 85180: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85180. The bug shows up when building protobuf with optimization but not when building with -O0. To work around this, if BR2_TOOLCHAIN_HAS_GCC_BUG_85180=y we force using -O0. Fixes: http://autobuild.buildroot.net/results/73dc9610a13d6e14eec58d529617210d93d5dec4/ Signed-off-by: Giulio Benetti --- package/protobuf/protobuf.mk | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/package/protobuf/protobuf.mk b/package/protobuf/protobuf.mk index e698bac228..699735ce37 100644 --- a/package/protobuf/protobuf.mk +++ b/package/protobuf/protobuf.mk @@ -17,6 +17,14 @@ PROTOBUF_LICENSE_FILES = LICENSE PROTOBUF_DEPENDENCIES = host-protobuf PROTOBUF_CONF_OPTS = --with-protoc=$(HOST_DIR)/bin/protoc +PROTOBUF_CXXFLAGS = $(TARGET_CXXFLAGS) + +ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_85180),y) +PROTOBUF_CXXFLAGS += -O0 +endif + +PROTOBUF_CONF_ENV = CXXFLAGS="$(OPUS_CFXXLAGS)" + ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y) PROTOBUF_CONF_ENV += LIBS=-latomic endif