From patchwork Fri Jun 14 21:03:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Giulio Benetti X-Patchwork-Id: 1116280 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.138; helo=whitealder.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=micronovasrl.com Authentication-Results: ozlabs.org; dkim=fail reason="key not found in DNS" (0-bit key; unprotected) header.d=micronovasrl.com header.i=@micronovasrl.com header.b="HMz0bSGg"; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45QY551F1Fz9s3Z for ; Sat, 15 Jun 2019 07:04:24 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 10BD587DA6; Fri, 14 Jun 2019 21:04:22 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZvLN8jA0ugTt; Fri, 14 Jun 2019 21:04:19 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id CE4998550D; Fri, 14 Jun 2019 21:04:19 +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 47DF41BF834 for ; Fri, 14 Jun 2019 21:04:18 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 4174C86A99 for ; Fri, 14 Jun 2019 21:04:18 +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 5AHY0CunNmCg for ; Fri, 14 Jun 2019 21:04:17 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail.micronovasrl.com (mail.micronovasrl.com [212.103.203.10]) by fraxinus.osuosl.org (Postfix) with ESMTP id 6F8A286A32 for ; Fri, 14 Jun 2019 21:04:17 +0000 (UTC) Received: from mail.micronovasrl.com (mail.micronovasrl.com [127.0.0.1]) by mail.micronovasrl.com (Postfix) with ESMTP id 8B811B017CB for ; Fri, 14 Jun 2019 23:04:16 +0200 (CEST) Authentication-Results: mail.micronovasrl.com (amavisd-new); dkim=pass reason="pass (just generated, assumed good)" header.d=micronovasrl.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=micronovasrl.com; h=references:in-reply-to:x-mailer:message-id:date:date:subject :subject:to:from:from; s=dkim; t=1560546255; x=1561410256; bh=Vo 9Zsm6LDfpcmXA9ui6487EAzDkCgcWCgwkUQMeDbpg=; b=HMz0bSGgFSWhi8/SAt aecZ99kuA3ycJb2pudBxV4G5hJwMWIajrcRvqEV+YdDAwrNwyic8ozU1b/tprjqJ M+mQllqohh4O9vQzDUw2jDmrgvKuRFMQj5/gnJdm572K/QsHK4lzJCpBs37k+vhX uJIXqjwyhrpTiKPGuAHS9u+NQ= X-Virus-Scanned: Debian amavisd-new at mail.micronovasrl.com Received: from mail.micronovasrl.com ([127.0.0.1]) by mail.micronovasrl.com (mail.micronovasrl.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id WuOTd-dxy_nh for ; Fri, 14 Jun 2019 23:04:15 +0200 (CEST) Received: from ubuntu.localdomain (88-149-228-83.v4.ngi.it [88.149.228.83]) by mail.micronovasrl.com (Postfix) with ESMTPSA id 0FACBB0163E; Fri, 14 Jun 2019 23:03:56 +0200 (CEST) From: Giulio Benetti To: buildroot@buildroot.org Date: Fri, 14 Jun 2019 23:03:23 +0200 Message-Id: <20190614210346.121013-5-giulio.benetti@micronovasrl.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190614210346.121013-1-giulio.benetti@micronovasrl.com> References: <20190614210346.121013-1-giulio.benetti@micronovasrl.com> Subject: [Buildroot] [PATCH 04/27] package/libnss: re-enable package on microblaze 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: Joseph Kogut , Bernd Kuhls , Sergio Prado , Marcin Bis , Maxime Ripard , Davide Viti , Peter Seiderer , =?utf-8?q?Ga=C3=ABl_Portay?= , Thomas Petazzoni , Jeremy Rosen , Romain Naour , Fabrice Fontaine , "Yann E . MORIN" , Thomas De Schampheleire MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" With Microblaze Gcc version < 8.x the build hangs due to bug 85862: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85862 To avoid this, the libnss package has a !BR2_TOOLCHAIN_HAS_GCC_BUG_85862 dependency. However, gcc bug 85862 only triggers when optimization is enabled, so we can work around the issue by passing -O0, which is what we do in other Buildroot packages to work around this bug. Signed-off-by: Giulio Benetti --- package/libnss/Config.in | 4 ---- package/libnss/libnss.mk | 8 +++++++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/package/libnss/Config.in b/package/libnss/Config.in index 34ddb91dfa..599c9a6536 100644 --- a/package/libnss/Config.in +++ b/package/libnss/Config.in @@ -3,7 +3,6 @@ config BR2_PACKAGE_LIBNSS depends on BR2_TOOLCHAIN_HAS_THREADS # libnspr depends on BR2_PACKAGE_LIBNSPR_ARCH_SUPPORT # libnspr depends on !BR2_STATIC_LIBS - depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_85862 select BR2_PACKAGE_LIBNSPR select BR2_PACKAGE_SQLITE select BR2_PACKAGE_ZLIB @@ -19,6 +18,3 @@ config BR2_PACKAGE_LIBNSS comment "libnss needs a toolchain w/ threads, dynamic library" depends on BR2_PACKAGE_LIBNSPR_ARCH_SUPPORT depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS - -comment "libnss needs a toolchain not affected by GCC bug 85862" - depends on BR2_TOOLCHAIN_HAS_GCC_BUG_85862 diff --git a/package/libnss/libnss.mk b/package/libnss/libnss.mk index 484c79e9da..893ff80154 100644 --- a/package/libnss/libnss.mk +++ b/package/libnss/libnss.mk @@ -13,9 +13,15 @@ LIBNSS_DEPENDENCIES = libnspr sqlite zlib LIBNSS_LICENSE = MPL-2.0 LIBNSS_LICENSE_FILES = nss/COPYING +LIBNSS_CFLAGS = $(TARGET_CFLAGS) + +ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_85862),y) +LIBNSS_CFLAGS += -O0 +endif + # Need to pass down TARGET_CFLAGS and TARGET_LDFLAGS define LIBNSS_FIXUP_LINUX_MK - echo 'OS_CFLAGS += ${TARGET_CFLAGS}' >> $(@D)/nss/coreconf/Linux.mk + echo 'OS_CFLAGS += ${LIBNSS_CFLAGS}' >> $(@D)/nss/coreconf/Linux.mk echo 'LDFLAGS += ${TARGET_LDFLAGS}' >> $(@D)/nss/coreconf/Linux.mk endef