From patchwork Wed Apr 19 17:48:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Brodkin X-Patchwork-Id: 752395 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3w7Tyg465nz9s2x for ; Thu, 20 Apr 2017 03:49:15 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 4CFB2887BB; Wed, 19 Apr 2017 17:49:13 +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 f0lvL03AYmj9; Wed, 19 Apr 2017 17:49:10 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 416D1887AB; Wed, 19 Apr 2017 17:49:10 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 4E66C1C11D9 for ; Wed, 19 Apr 2017 17:49:08 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 4368B82226 for ; Wed, 19 Apr 2017 17:49:08 +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 h0K1PldiGiuE for ; Wed, 19 Apr 2017 17:49:03 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from smtprelay.synopsys.com (us01smtprelay-2.synopsys.com [198.182.60.111]) by whitealder.osuosl.org (Postfix) with ESMTPS id 5B707895E1 for ; Wed, 19 Apr 2017 17:49:03 +0000 (UTC) Received: from mailhost.synopsys.com (mailhost1.synopsys.com [10.12.238.239]) by smtprelay.synopsys.com (Postfix) with ESMTP id 26BDD10C0C2D; Wed, 19 Apr 2017 10:49:02 -0700 (PDT) Received: from mailhost.synopsys.com (localhost [127.0.0.1]) by mailhost.synopsys.com (Postfix) with ESMTP id F20948C4; Wed, 19 Apr 2017 10:49:01 -0700 (PDT) Received: from ru20arcgnu1.internal.synopsys.com (ru20arcgnu1.internal.synopsys.com [10.121.9.48]) by mailhost.synopsys.com (Postfix) with ESMTP id 71E0D861; Wed, 19 Apr 2017 10:48:59 -0700 (PDT) From: Alexey Brodkin To: buildroot@busybox.net Date: Wed, 19 Apr 2017 20:48:57 +0300 Message-Id: <20170419174857.23185-1-abrodkin@synopsys.com> X-Mailer: git-send-email 2.11.0 Cc: Thomas Petazzoni , Alexey Brodkin Subject: [Buildroot] [PATCH] uclibc: arc: Disable usage of atomic ops if hardware has no LLSC X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Since uClibc-ng v1.0.20 we may force libc to either use llock/scond instructions for atomic ops or if those are missing use kernel-assisted emulation. By defult atomics are used so we disable that feature in libc if we build for target without LLSC. This allows us to build and use NPTL on ARC750 for example which was not possible before. Signed-off-by: Alexey Brodkin Cc: Thomas Petazzoni Cc: Peter Korsgaard --- package/uclibc/uclibc.mk | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/package/uclibc/uclibc.mk b/package/uclibc/uclibc.mk index 45bb6dede..ce7f23f25 100644 --- a/package/uclibc/uclibc.mk +++ b/package/uclibc/uclibc.mk @@ -101,6 +101,12 @@ define UCLIBC_ARC_PAGE_SIZE_CONFIG $(call KCONFIG_ENABLE_OPT,$(UCLIBC_ARC_PAGE_SIZE),$(@D)/.config) endef +ifneq ($(BR2_ARC_ATOMIC_EXT),y) +define UCLIBC_ARC_ATOMICS_CONFIG + $(call KCONFIG_DISABLE_OPT,CONFIG_ARC_HAS_ATOMICS,$(@D)/.config) +endef +endif + endif # arc # @@ -395,6 +401,7 @@ define UCLIBC_KCONFIG_FIXUP_CMDS $(UCLIBC_BINFMT_CONFIG) $(UCLIBC_ARC_TYPE_CONFIG) $(UCLIBC_ARC_PAGE_SIZE_CONFIG) + $(UCLIBC_ARC_ATOMICS_CONFIG) $(UCLIBC_ARM_ABI_CONFIG) $(UCLIBC_ARM_BINFMT_FLAT) $(UCLIBC_ARM_NO_CONTEXT_FUNCS)