From: Adolf Belka <adolf.belka@ipfire.org>
To: development@lists.ipfire.org
Cc: Adolf Belka <adolf.belka@ipfire.org>
Subject: [PATCH] nasm: Add patch fix for typo in le32toh function name
Date: Mon,  6 Oct 2025 17:32:37 +0200	[thread overview]
Message-ID: <20251006153237.2443560-1-adolf.belka@ipfire.org> (raw)
- nasm failed to build with aarch64 due to a typo in the 3.00 source tarball where
   l32toh had been written in bytesex.h instead of le32toh
- This patch includes the fix for that. The applied patch will be able to be removed
   when the next release after 3.00 is issued.
- Tested the build on the aarch64 builder and nasm successfully built with the patch
   applied.
- Update of rootfile not required
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
---
 lfs/nasm                                      |  1 +
 ...00_fix_typo_in_le32toh_function_name.patch | 20 +++++++++++++++++++
 2 files changed, 21 insertions(+)
 create mode 100644 src/patches/nasm-3.00_fix_typo_in_le32toh_function_name.patch
diff --git a/lfs/nasm b/lfs/nasm
index daeb44535..bd56757d9 100644
--- a/lfs/nasm
+++ b/lfs/nasm
@@ -70,6 +70,7 @@ $(subst %,%_BLAKE2,$(objects)) :
 $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
 	@$(PREBUILD)
 	@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE)
+	cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/nasm-3.00_fix_typo_in_le32toh_function_name.patch
 	cd $(DIR_APP) && ./configure \
 				--prefix=/usr
 	cd $(DIR_APP) && make $(MAKETUNING)
diff --git a/src/patches/nasm-3.00_fix_typo_in_le32toh_function_name.patch b/src/patches/nasm-3.00_fix_typo_in_le32toh_function_name.patch
new file mode 100644
index 000000000..3b198b2d8
--- /dev/null
+++ b/src/patches/nasm-3.00_fix_typo_in_le32toh_function_name.patch
@@ -0,0 +1,20 @@
+--- nasm-3.00/include/bytesex.h.orig	2025-10-03 21:41:41.000000000 +0200
++++ nasm-3.00/include/bytesex.h	2025-10-06 15:03:06.434849426 +0200
+@@ -215,7 +215,7 @@
+ } __attribute__((packed));
+ static inline uint32_t getu32(const void *p)
+ {
+-    return l32toh(((const struct unaligned32 *)p)->v);
++    return le32toh(((const struct unaligned32 *)p)->v);
+ }
+ static inline uint32_t setu32(void *p, uint32_t v)
+ {
+@@ -253,7 +253,7 @@
+ static inline uint32_t getu32(const void *p)
+ {
+     const uint32_t _unaligned *pp = p;
+-    return l32toh(*pp);
++    return le32toh(*pp);
+ }
+ static inline uint32_t setu32(void *p, uint32_t v)
+ {
-- 
2.51.0
next             reply	other threads:[~2025-10-06 15:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-06 15:32 Adolf Belka [this message]
2025-10-06 15:33 ` Michael Tremer
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=20251006153237.2443560-1-adolf.belka@ipfire.org \
    --to=adolf.belka@ipfire.org \
    --cc=development@lists.ipfire.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox