From patchwork Fri Oct 30 14:29:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gwenhael Goavec-Merou X-Patchwork-Id: 1391077 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=trabucayre.com Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CN4Tp4VQgz9sPB for ; Sat, 31 Oct 2020 01:30:22 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id AEF61234AA; Fri, 30 Oct 2020 14:30:18 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id EP7E6FRHE-FA; Fri, 30 Oct 2020 14:30:16 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 106552050D; Fri, 30 Oct 2020 14:30:16 +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 14F431BF2A4 for ; Fri, 30 Oct 2020 14:30:15 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 1134085C19 for ; Fri, 30 Oct 2020 14:30:15 +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 2x10gV_mX66x for ; Fri, 30 Oct 2020 14:30:13 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from smtp3-g21.free.fr (smtp3-g21.free.fr [212.27.42.3]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 9A68D85B09 for ; Fri, 30 Oct 2020 14:30:13 +0000 (UTC) Received: from localhost.localdomain (unknown [78.252.129.8]) by smtp3-g21.free.fr (Postfix) with ESMTP id 00023143BAF; Fri, 30 Oct 2020 15:30:09 +0100 (CET) From: Gwenhael Goavec-Merou To: buildroot@buildroot.org Date: Fri, 30 Oct 2020 15:29:45 +0100 Message-Id: <20201030142945.1190031-1-gwenj@trabucayre.com> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Subject: [Buildroot] [PATCH] package/uhd: fix build with ARM 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: Gwenhael Goavec-Merou Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Gwenhael Goavec-Merou UHD has two issues with ARM: 1/ NEON_SIMD_ENABLE is always enabled when architecture is ARM. But NEON isn't necessarily support in the CPU 2/ when NEON is supported -mfpu=neon must be passed to the compiler (not automatically done by UHD) Fixes: - http://autobuild.buildroot.net/results/2519bd075b8c021b440677297b32f16b1c3cc3dd/ - http://autobuild.buildroot.net/results/99d9979be4f37c42390c87b1afd4cd33bac07f5e/ - http://autobuild.buildroot.net/results/cabc7a87ee869d6bac7d092c1a4fcfcdac22a96e/ Signed-off-by: Gwenhael Goavec-Merou --- package/uhd/uhd.mk | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/package/uhd/uhd.mk b/package/uhd/uhd.mk index ec0ec03e9f..17d0dd569b 100644 --- a/package/uhd/uhd.mk +++ b/package/uhd/uhd.mk @@ -38,6 +38,18 @@ UHD_CONF_OPTS = \ -DENABLE_UTILS=OFF \ -DENABLE_X300=OFF +# As soon as architecture is ARM, uhd will try +# to use it. But this doesn't necessarily +# mean we have NEON support in our CPU. +# When CPU support NEON -mfpu=neon must be added to CXX_FLAGS +ifeq ($(BR2_ARM_CPU_HAS_NEON),y) +UHD_CONF_OPTS += -DCMAKE_CXX_FLAGS="$(TARGET_CXXFLAGS) -mfpu=neon" +UHD_CONF_OPTS += -DNEON_SIMD_ENABLE=ON +else +UHD_CONF_OPTS += -Dhave_mfpu_neon=0 +UHD_CONF_OPTS += -DNEON_SIMD_ENABLE=OFF +endif + ifeq ($(BR2_PACKAGE_ORC),y) UHD_DEPENDENCIES += orc endif