From patchwork Mon Dec 22 09:04:31 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Hunleth X-Patchwork-Id: 423309 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id CBC291400E7 for ; Mon, 22 Dec 2014 20:05:37 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 9F15DA13A6; Mon, 22 Dec 2014 09:05:36 +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 6lhY-fpQPAGg; Mon, 22 Dec 2014 09:05:34 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 70E18A135D; Mon, 22 Dec 2014 09:05:34 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id B121A1C22D1 for ; Mon, 22 Dec 2014 09:05:33 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id A82BE8941E for ; Mon, 22 Dec 2014 09:05:33 +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 lmrczL3gsiJe for ; Mon, 22 Dec 2014 09:05:32 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-qc0-f175.google.com (mail-qc0-f175.google.com [209.85.216.175]) by hemlock.osuosl.org (Postfix) with ESMTPS id 9888C893E2 for ; Mon, 22 Dec 2014 09:05:32 +0000 (UTC) Received: by mail-qc0-f175.google.com with SMTP id b13so3491435qcw.6 for ; Mon, 22 Dec 2014 01:05:31 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=g568GnDYkiywWlgQ+mIm68sTFvxJSefee4UM9r50qHs=; b=QoQFBmIFyaJCl3UmGtU08o/iMFgOtMdRRtiQgpZyJIboucq/ipgDBpHZSwmuTS1nSv kor6eCcaT0Jo8rJUYr8edvqXeoR7DxAtqT4sMLH/YXo113Dy6O0/ImYJ4pb/VDK7SAcx nIkpToPcVI4fI029EbKW6VSv+PEnh6Ajmsgq0udna5YYSiO9hw9vY3NE8wS7LbyNUv4/ 64sZSRhskGbTJGBqa7GpFpj2af2O64VHW9Y0Tb7FdVsUsJF39jOBwAKQOhjNxbYfLBB9 J2MOGEC3numQ0eCsvygrWJr98RoxLl4tBPDDFggNyVbAGBNro+PSwTJqDeeb2RLpo9UP HdKg== X-Gm-Message-State: ALoCoQk/Odz9YpkEB2vbjv3an8zWFX6EUonn/BND/0aBtMmaVwtLy7M3sYcnIhUT8FRGKZIvRgRP X-Received: by 10.140.97.102 with SMTP id l93mr3478732qge.48.1419239131645; Mon, 22 Dec 2014 01:05:31 -0800 (PST) Received: from halfmarathon.home.hunleth.com (c-68-50-186-80.hsd1.dc.comcast.net. [68.50.186.80]) by mx.google.com with ESMTPSA id p4sm15986054qar.48.2014.12.22.01.05.30 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 22 Dec 2014 01:05:30 -0800 (PST) From: Frank Hunleth To: buildroot@buildroot.org Date: Mon, 22 Dec 2014 04:04:31 -0500 Message-Id: <1419239071-4637-1-git-send-email-fhunleth@troodon-software.com> X-Mailer: git-send-email 1.9.1 Subject: [Buildroot] [PATCH] erlang: selectively enable libatomic_ops 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" Erlang can use either the system libatomic_ops or its own version. However, if using the system version, it must find implementations for AO_compare_and_swap() and other calls. Since these are not available on all platforms, selectively enable the use of the system libatomic_ops. Fixes: http://autobuild.buildroot.net/results/eba/eba5bf85e9ff98916cd3638b5f13ab5bd54564d8/ http://autobuild.buildroot.net/results/c74/c743cfca629fb332bbb1327cf4ea360f0a4e4bfe/ http://autobuild.buildroot.net/results/095/095348d4d309c2a408a3b297b4325348ed1dd7e8/ Signed-off-by: Frank Hunleth --- package/erlang/Config.in | 10 ++++++++++ package/erlang/erlang.mk | 4 +++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/package/erlang/Config.in b/package/erlang/Config.in index 56830da..9caf1ec 100644 --- a/package/erlang/Config.in +++ b/package/erlang/Config.in @@ -26,6 +26,16 @@ config BR2_PACKAGE_ERLANG_SMP If you do not need SMP support, turning this option off reduces compile time and the size of the Erlang installation. +config BR2_PACKAGE_ERLANG_USE_LIBATOMIC_OPS + bool + select BR2_PACKAGE_LIBATOMIC_OPS + default y if BR2_ARM_CPU_ARMV7A || BR2_x86_64 + help + Use the system libatomic_ops on platforms that provide + implementations for AO_store(), AO_load(), and AO_compare_and_swap(). + Platforms without support for those functions must still use the + Erlang-provided implementation. + config BR2_PACKAGE_ERLANG_MEGACO bool "install megaco application" help diff --git a/package/erlang/erlang.mk b/package/erlang/erlang.mk index 0b8619e..007053a 100644 --- a/package/erlang/erlang.mk +++ b/package/erlang/erlang.mk @@ -22,9 +22,11 @@ ERLANG_CONF_ENV += erl_xcomp_sysroot=$(STAGING_DIR) ERLANG_CONF_OPTS = --without-javac -ifeq ($(BR2_PACKAGE_LIBATOMIC_OPS),y) +ifeq ($(BR2_PACKAGE_ERLANG_USE_LIBATOMIC_OPS),y) ERLANG_DEPENDENCIES += libatomic_ops ERLANG_CONF_OPTS += --with-libatomic_ops=$(STAGING_DIR)/usr +else +ERLANG_CONF_OPTS += --without-libatomic_ops endif # erlang uses openssl for all things crypto. Since the host tools (such as