From patchwork Tue Apr 14 10:26:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Asaf Kahlon X-Patchwork-Id: 1270219 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.138; helo=whitealder.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=C6WWN9+x; 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 491hW80V6yz9sSG for ; Tue, 14 Apr 2020 20:27:16 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id CF8428666F; Tue, 14 Apr 2020 10:27:12 +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 oN4IjXF5ZTda; Tue, 14 Apr 2020 10:27:11 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 91B81854D8; Tue, 14 Apr 2020 10:27:11 +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 0E6971BF255 for ; Tue, 14 Apr 2020 10:27:10 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 01DB1854D8 for ; Tue, 14 Apr 2020 10:27:10 +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 uoo4BpqZZJhh for ; Tue, 14 Apr 2020 10:27:09 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) by whitealder.osuosl.org (Postfix) with ESMTPS id 371C78527F for ; Tue, 14 Apr 2020 10:27:09 +0000 (UTC) Received: by mail-wm1-f67.google.com with SMTP id a81so13305849wmf.5 for ; Tue, 14 Apr 2020 03:27:09 -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=S3mwHA/N1O/GIy3ASapo7sb1XY3S5HysbFMwiMJGXr8=; b=C6WWN9+xxFfVLAsw2oxzbVaSwQtw1Y3cl55I0AdhXh72r/P56ApSARirCMyvsdOnXK F/WONWNpe7d5ezB+eMlcCBEu9eXnK2t1PVKvQeWaTb946exrWdRUyoofUvNno1CxKOWQ cL8tgFKplOd/nIJ1Z7STFx04q2zph7lXuiWjen4CwOdCnYg4U4PiGdkbAvXIVWqqzD6e luvxv9UCSjcJ/Y9T2ceGje8BtSWFNhpGYQIEnEyTPFsU24Yh7zqYDGtJQseDxCfTY/q4 Bho2NuduRxkhhFP2L/Q/P401y3ZWybzJSH+bbCxermqtLbIi9DTlp/9g+laBiWCuF2Ri yrpQ== 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=S3mwHA/N1O/GIy3ASapo7sb1XY3S5HysbFMwiMJGXr8=; b=fc1xmOp2B3wt3osFHgAaeLeSnOXEAXgdKi0ZA6It/nqB4qj6m3kQ7f4+yuoe0l7Z8v MxNaIM87pzKipVp9Avd4kFdxygGd5tlvnx0IN6Y6SQHaYa4ULGbBElYJAiToyAzGzspA 8RGTBIUI6109rExDVYiHdIhnjch9ELXJPjdMU803Vmcfi+8NGfE57YrNkio9+DUqa1zJ RIKH0vPWjb1EiFqf6hM44mPViXqeETHsU4GMlpLy+gxPcVTn8Et04YTYVhT+wCrF3O94 QxOutKPlc8ERzY8GbNMLWBAAeTRpfGBomBDXgqvEab4tbEsz3mYkURgfwP0srfa8h2tK wgcQ== X-Gm-Message-State: AGi0PuYD0+s6KoaJa6smoUy3FrGg7KnwpHXNqMRABoulKZnctae6FX1Z qfTeWxNxyN6bug94EGXt2lC79/AmI8s= X-Google-Smtp-Source: APiQypL5BJwQBBudDhfRDUlQVxbceoTURAY5IJyl69Liv4g89QekKzXE8vHGuMZGbIGQIKhusBLHMQ== X-Received: by 2002:a7b:cb03:: with SMTP id u3mr21566928wmj.12.1586860027512; Tue, 14 Apr 2020 03:27:07 -0700 (PDT) Received: from localhost.localdomain (bzq-84-108-4-25.cablep.bezeqint.net. [84.108.4.25]) by smtp.gmail.com with ESMTPSA id h2sm18609511wmf.34.2020.04.14.03.27.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Apr 2020 03:27:07 -0700 (PDT) From: Asaf Kahlon To: buildroot@buildroot.org Date: Tue, 14 Apr 2020 13:26:21 +0300 Message-Id: <20200414102621.18804-1-asafka7@gmail.com> X-Mailer: git-send-email 2.26.0 MIME-Version: 1.0 Subject: [Buildroot] [PATCH 1/1] package/python-argon2-cffi: use -msse2 only when supported 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: James Hilliard , Asaf Kahlon Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" The package adds the '-msse2' flag according to the result of the pythonic "platform.machine()" statement, which runs on the host and doesn't necessarily reflects the existence of this flag on the target compiler. Hence, we'll set the 'optimzed' variable in setup.py only when we know SSE2 is supported. Fixes: http://autobuild.buildroot.net/results/8c8aee8c8a0062575f489042bb11cc8515cbe48c/ Signed-off-by: Asaf Kahlon --- package/python-argon2-cffi/python-argon2-cffi.mk | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/package/python-argon2-cffi/python-argon2-cffi.mk b/package/python-argon2-cffi/python-argon2-cffi.mk index 099574e9c3..9f73e75c1e 100644 --- a/package/python-argon2-cffi/python-argon2-cffi.mk +++ b/package/python-argon2-cffi/python-argon2-cffi.mk @@ -12,4 +12,10 @@ PYTHON_ARGON2_CFFI_LICENSE = MIT PYTHON_ARGON2_CFFI_LICENSE_FILES = LICENSE PYTHON_ARGON2_CFFI_DEPENDENCIES = host-python-cffi +define PYTHON_ARGON2_CFFI_SET_OPTIMZED_FLAG + $(SED) 's;^\(optimized = *\)\(.*\);\1$(if $(BR2_X86_CPU_HAS_SSE2),True,False);' $(@D)/setup.py +endef + +PYTHON_ARGON2_CFFI_POST_PATCH_HOOKS += PYTHON_ARGON2_CFFI_SET_OPTIMZED_FLAG + $(eval $(python-package))