From patchwork Sun Nov 25 09:20:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergio Prado X-Patchwork-Id: 1002773 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) 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=e-labworks.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=e-labworks-com.20150623.gappssmtp.com header.i=@e-labworks-com.20150623.gappssmtp.com header.b="OVcqDMY3"; dkim-atps=neutral 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 432l055FkWz9s1c for ; Sun, 25 Nov 2018 20:20:53 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 11B942281B; Sun, 25 Nov 2018 09:20:52 +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 jzkR+GLuWCtK; Sun, 25 Nov 2018 09:20:50 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 818C521FA8; Sun, 25 Nov 2018 09:20:50 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 37FB51BF382 for ; Sun, 25 Nov 2018 09:20:49 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 33A7E21FA8 for ; Sun, 25 Nov 2018 09:20:49 +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 MrnoCtTZF-6r for ; Sun, 25 Nov 2018 09:20:48 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-qt1-f194.google.com (mail-qt1-f194.google.com [209.85.160.194]) by silver.osuosl.org (Postfix) with ESMTPS id A4AFB2155F for ; Sun, 25 Nov 2018 09:20:48 +0000 (UTC) Received: by mail-qt1-f194.google.com with SMTP id n21so14450788qtl.6 for ; Sun, 25 Nov 2018 01:20:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=e-labworks-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=1jMg0gQrAPYz0iSSWkKByGzvh/BBMwS9QkbWl2BDvd8=; b=OVcqDMY3aCPafa+KrgdujiWSu5y8HZfspsHXxovvrqMim857+1o1/dpoYikbHfcU3u e97l/LCgPefoUJK+t3mvWVJn1kaRTr/eWlKvDH7TxOaEWJO2tEbuFV0lWNabKJbSEBss giPD/CR7oLtskSZrpZhouM25YX5ikFeQfltaB5hdqXmanwK/U2rA9VN42Ji6BeFDaalI YUKzQfRI1E5lfyxeetyJ/0lHliJb/tBlQ+uEC/kMXTgJaBlnh/MXqc4YWzXBu2ZUpmF9 uZWXMIpEDobQGGQNgrh4BhX5Pl5lSkHAKmmbP5r8FURshiCWO07kEYC4fNN83ncskR28 cnMw== 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; bh=1jMg0gQrAPYz0iSSWkKByGzvh/BBMwS9QkbWl2BDvd8=; b=FxsnJiVHds3JHQqca8VdXOodl+7tSE9YT7i6Rk3mnARJ5oIzgn2jWUp8lH9v3CAHo5 +++91lA7rTs65xnTCB9uHfKYXYglCe+/ppdfqqVIFeZon4zuu1323ur6S0d3/Pnb0y/r 9i8f7Ay+q9JfGBZObLpYtX0sBVP7YAwAQUGAJiKGA6F9EUbc4Jjv/2pq6ewvMeDyhyOG IH9OckRtlePGH1xtDaLH/wIY6MHKpA4A+Z/OuIsAbkEsCG5mu0PNhkJtrglAFVHAzTZE jtMOWyvSaKxRHWKbzcc5IUCa9lDZAPRIPsiz1Z1E7XQHtgjfqarmNZkItNudVtZ2nPlp GgyA== X-Gm-Message-State: AA+aEWarUqaBOO+1Pxc6jIJUoKoUX3jxloq6Q2PKkmevKhytDmgbIUw3 homEkrsbl50C414XmgoQmO3OHPJjhpM= X-Google-Smtp-Source: AFSGD/Uy5Ef+NjeF/dTvq51drl7ApyzVL3MiEl7jeplhdCISkYTcy0sLclAamjYcUu6D/nG9NVgfpw== X-Received: by 2002:ac8:7094:: with SMTP id y20mr19869434qto.380.1543137647484; Sun, 25 Nov 2018 01:20:47 -0800 (PST) Received: from localhost.localdomain ([177.81.27.202]) by smtp.gmail.com with ESMTPSA id m193sm24444007qke.61.2018.11.25.01.20.45 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 25 Nov 2018 01:20:46 -0800 (PST) From: Sergio Prado To: buildroot@buildroot.org Date: Sun, 25 Nov 2018 07:20:27 -0200 Message-Id: <20181125092027.5824-1-sergio.prado@e-labworks.com> X-Mailer: git-send-email 2.17.1 Subject: [Buildroot] [PATCH] package/wolfssl: enable ARMv8 hardware acceleration 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: rod@wolfssl.com, jacob@wolfssl.com, Sergio Prado MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Enable hardware acceleration for ARMv8 targets. When ARMv8 hardware acceleration is enabled without any additional flags, the build fails with the following messages: /tmp/cciv7Oei.s: Assembler messages: /tmp/cciv7Oei.s:580: Error: invalid addressing mode at operand 2 -- `ld1 {v0.2d},[x0,256]' /tmp/cciv7Oei.s:616: Error: invalid addressing mode at operand 2 -- `st1 {v0.2d},[x0,256]' /tmp/cciv7Oei.s:629: Error: invalid addressing mode at operand 2 -- `ld1 {v0.2d},[x0,256]' /tmp/cciv7Oei.s:669: Error: invalid addressing mode at operand 2 -- `st1 {v0.2d},[x0,256]' /tmp/cciv7Oei.s:1211: Error: invalid addressing mode at operand 2 -- `ld1 {v16.2d},[x0,304]' /tmp/cciv7Oei.s:1368: Error: invalid addressing mode at operand 2 -- `ld1 {v17.16b},[x19,304]' /tmp/cciv7Oei.s:1554: Error: invalid addressing mode at operand 2 -- `ld1 {v16.2d},[x0,304]' /tmp/cciv7Oei.s:1719: Error: invalid addressing mode at operand 2 -- `ld1 {v17.16b},[x19,304]' /tmp/cciv7Oei.s:1870: Error: invalid addressing mode at operand 2 -- `ld1 {v16.2d},[x0,304]' /tmp/cciv7Oei.s:2043: Error: invalid addressing mode at operand 2 -- `ld1 {v17.16b},[x19,304]' make[3]: *** [Makefile:3801: wolfcrypt/src/port/arm/src_libwolfssl_la-armv8-aes.lo] Error 1 This is because of some inline assembly in parts of the AES structure using the "m" constraint. So lets use the flag -mstrict-align to prevent this error. Signed-off-by: Sergio Prado --- package/wolfssl/wolfssl.mk | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/package/wolfssl/wolfssl.mk b/package/wolfssl/wolfssl.mk index 68b638c3e2a8..ab5f5ea4550c 100644 --- a/package/wolfssl/wolfssl.mk +++ b/package/wolfssl/wolfssl.mk @@ -30,7 +30,14 @@ else WOLFSSL_CONF_OPTS += --disable-sslv3 endif -# build fails when ARMv8 hardware acceleration is enabled +# enable ARMv8 hardware acceleration (the flag -mstrict-align is +# needed to prevent build errors caused by some inline assembly +# in parts of the AES structure using the "m" constraint) +ifeq ($(BR2_ARM_CPU_ARMV8A),y) +WOLFSSL_CONF_OPTS += --enable-armasm +WOLFSSL_CONF_ENV += CPPFLAGS="$(TARGET_CPPFLAGS) -mstrict-align" +else WOLFSSL_CONF_OPTS += --disable-armasm +endif $(eval $(autotools-package))