From patchwork Sat Oct 17 13:46:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabrice Fontaine X-Patchwork-Id: 1383663 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.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=F/KUASkv; 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 4CD47J5wv1z9sSf for ; Sun, 18 Oct 2020 00:46:36 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 0226587716; Sat, 17 Oct 2020 13:46:32 +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 cGOa5xvtlZBG; Sat, 17 Oct 2020 13:46:30 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 6754887720; Sat, 17 Oct 2020 13:46:30 +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 E34071BF5E6 for ; Sat, 17 Oct 2020 13:46:28 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id D552687E04 for ; Sat, 17 Oct 2020 13:46:28 +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 QEzUHyrujZBu for ; Sat, 17 Oct 2020 13:46:28 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by whitealder.osuosl.org (Postfix) with ESMTPS id B3F18878F1 for ; Sat, 17 Oct 2020 13:46:27 +0000 (UTC) Received: by mail-wr1-f66.google.com with SMTP id j7so2454738wrt.9 for ; Sat, 17 Oct 2020 06:46:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=z0kWn8pzm5XuFxExzQyXvHMD4//6MQeljmq7UMwGSXQ=; b=F/KUASkv0FFgVNacjbIPiJBtFDLLxpizIrT0wSLpvjqKk+xOhzjanATFFQtibsnbRj N+8jYApXLuYwWJxIwXd7hVRdSYA76Am1k6at3h5e53woFM6oX1wLp4guCL+pBFiDRweK RfJFQC79Oyvqx2c+U0HCyYS73OatR/TMeYtRkIGKvmVzYve/G4gRrey0N733xQ2DliEA kKoHYKiidERpZ3JD2NPtEBXpygfwlw+H3woUuGV2i6d1TfAGx4u4njGR0Cp+SrGo6brd Acem9QPhsJy7Qzf61AZ1t7MwKtHeBzKWfCbKH5A6g1jF2NU2Zl0O/d9YoiSOZ0oddvBR SI0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=z0kWn8pzm5XuFxExzQyXvHMD4//6MQeljmq7UMwGSXQ=; b=O+QGI9dyMLoAmxje0istBUWigiqp1ekSRmBEFg4KMmz4QbAjYpHK7ZHtLQha13srUA ESgTrdhgghHUkGjWK/imibki9xFYRvXF41oDEljNV3dBk1Ug1VWarEmSH59LFbj2Bm2E E7BbzGn9z1pH56QiEmznLHJml301gAlPvhu6Cjt011ToYmLFOl4xhvOTwzga+e1OV5OU LdxP//dN1Pu/emQ8pTlfih2w7ZFtzf+z70+7Hqcfygden7H52G0bJ3iBunFDYXXSFOGk p6lJA52xjP7euVrMO3tHRPqsvS3NcocJnYgv1y2q0YXZdZrC9aI1cxt6/JOo9kLP4QFk 7iVg== X-Gm-Message-State: AOAM531LO9HI9Xb54TFLzWqx+pAcglu6dfluihwH/Z4oyyiqZP63EFk8 yB7wb0RKQrjLK5jtJqmQzzZQJhGfvYx6DA== X-Google-Smtp-Source: ABdhPJzuIMDjenhKPqCBtKVBoVuFxmFdlQjfrT1cvHXxfJb4yPbrQobI9hMQwcg9yyE4pQxEN48E8A== X-Received: by 2002:adf:d4c5:: with SMTP id w5mr10743535wrk.226.1602942385774; Sat, 17 Oct 2020 06:46:25 -0700 (PDT) Received: from kali.home (2a01cb0881b76d00c2afd0dfa851d2b9.ipv6.abo.wanadoo.fr. [2a01:cb08:81b7:6d00:c2af:d0df:a851:d2b9]) by smtp.gmail.com with ESMTPSA id 71sm9118477wrm.20.2020.10.17.06.46.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Oct 2020 06:46:25 -0700 (PDT) From: Fabrice Fontaine To: buildroot@buildroot.org Date: Sat, 17 Oct 2020 15:46:23 +0200 Message-Id: <20201017134623.3457333-1-fontaine.fabrice@gmail.com> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Subject: [Buildroot] [PATCH v2,1/1] package/opencv3: fix build with atomic 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: Samuel Martin , Fabrice Fontaine Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Restore the atomic workaround that was wrongly removed when bumping to version 3.4.9 in commit f6fb2cae0691d25b034b12a16261ee26096db7d1 as it seems that opencv3 still needs help to detect atomic library Fixes: - http://autobuild.buildroot.org/results/9162b29725f8d9b891eb74fcb8078f211140a841 Signed-off-by: Fabrice Fontaine --- Changes v1 -> v2 (after review of Yann E. Morin): - Restore workaround instead of setting -DHAVE_CXX_ATOMICS_WITHOUT_LIB package/opencv3/opencv3.mk | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/package/opencv3/opencv3.mk b/package/opencv3/opencv3.mk index de89aebca4..648cc66af3 100644 --- a/package/opencv3/opencv3.mk +++ b/package/opencv3/opencv3.mk @@ -13,6 +13,11 @@ OPENCV3_SUPPORTS_IN_SOURCE_BUILD = NO OPENCV3_CXXFLAGS = $(TARGET_CXXFLAGS) +# Uses __atomic_fetch_add_4 +ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y) +OPENCV3_CXXFLAGS += -latomic +endif + # Fix c++11 build with missing std::exception_ptr ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_64735),y) OPENCV3_CXXFLAGS += -DCV__EXCEPTION_PTR=0