All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
To: buildroot@buildroot.org
Subject: [Buildroot] [git commit] package/hiawatha: disable ASM if needed
Date: Mon, 10 Jan 2022 08:17:15 +0100	[thread overview]
Message-ID: <20220110071316.C1D1E82ACC@busybox.osuosl.org> (raw)

commit: https://git.buildroot.net/buildroot/commit/?id=89ecfb3c789b57552373eb323e6b2ac9001295a3
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

Disable ASM as already done in mbedtls package to avoid the following
build failure raised since commit
4e36e8f2081a66f477dd038793082045876d65ee:

In file included from /home/buildroot/autobuild/instance-2/output-1/build/hiawatha-11.1/mbedtls/library/bignum.c:41:
/home/buildroot/autobuild/instance-2/output-1/build/hiawatha-11.1/mbedtls/library/bignum.c: In function 'mpi_mul_hlp':
/home/buildroot/autobuild/instance-2/output-1/build/hiawatha-11.1/mbedtls/library/bn_mul.h:86:13: error: the register 'hi' cannot be clobbered in 'asm' for the current target
   86 | #define asm __asm
      |             ^~~~~

Fixes:
 - http://autobuild.buildroot.org/results/5436b44777c5d417ae427b99602f516fd8f9489d

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
 package/hiawatha/hiawatha.mk | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/package/hiawatha/hiawatha.mk b/package/hiawatha/hiawatha.mk
index ed9f8aba54..14d3c9f1ee 100644
--- a/package/hiawatha/hiawatha.mk
+++ b/package/hiawatha/hiawatha.mk
@@ -22,6 +22,24 @@ HIAWATHA_CONF_OPTS = \
 	-DWEBROOT_DIR=/var/www/hiawatha \
 	-DWORK_DIR=/var/lib/hiawatha
 
+define HIAWATHA_MBEDTLS_DISABLE_ASM
+	$(SED) '/^#define MBEDTLS_AESNI_C/d' \
+		$(@D)/mbedtls/include/mbedtls/mbedtls_config.h
+	$(SED) '/^#define MBEDTLS_HAVE_ASM/d' \
+		$(@D)/mbedtls/include/mbedtls/mbedtls_config.h
+	$(SED) '/^#define MBEDTLS_PADLOCK_C/d' \
+		$(@D)/mbedtls/include/mbedtls/mbedtls_config.h
+endef
+
+# ARM in thumb mode breaks debugging with asm optimizations
+# Microblaze asm optimizations are broken in general
+# MIPS R6 asm is not yet supported
+ifeq ($(BR2_ENABLE_DEBUG)$(BR2_ARM_INSTRUCTIONS_THUMB)$(BR2_ARM_INSTRUCTIONS_THUMB2),yy)
+HIAWATHA_POST_CONFIGURE_HOOKS += HIAWATHA_MBEDTLS_DISABLE_ASM
+else ifeq ($(BR2_microblaze)$(BR2_MIPS_CPU_MIPS32R6)$(BR2_MIPS_CPU_MIPS64R6),y)
+HIAWATHA_POST_CONFIGURE_HOOKS += HIAWATHA_MBEDTLS_DISABLE_ASM
+endif
+
 ifeq ($(BR2_PACKAGE_HIAWATHA_SSL),y)
 HIAWATHA_CONF_OPTS += -DENABLE_TLS=ON
 else
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

                 reply	other threads:[~2022-01-10  7:19 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220110071316.C1D1E82ACC@busybox.osuosl.org \
    --to=arnout@mind.be \
    --cc=buildroot@buildroot.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.