* [PATCH] nasm: Use only with x86_64
@ 2025-10-24 16:42 Adolf Belka
2025-10-25 13:02 ` Michael Tremer
0 siblings, 1 reply; 2+ messages in thread
From: Adolf Belka @ 2025-10-24 16:42 UTC (permalink / raw)
To: development; +Cc: Adolf Belka
- nasm is linked in to syslinux and libjpeg.
- libjpeg will only require nasm if CET has been enabled in glibc and the architecture is
x86_64. CET is not enabled in IPFire, therefore libjpeg does not require nasm for
building in x86_64 and is not required at all for libjpeg under aarch64 or riscv64
- syslinux requires nasm to build but only in x86_64.
- This patch sets the supported architecture to x86_64 only. The build of nasm will be
skipped in aarch64 and riscv64.
- The x86_64 build ran as normal. The build was also tested for aarch64 and the build of
nasm was skipped. syslinux is skipped and libjpeg built successfully confirming that
nasm does not need to be built for aarch64 or riscv64.
- The patch is removed as it is only required for building nasm for an arm architecture
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
---
lfs/nasm | 2 +-
...00_fix_typo_in_le32toh_function_name.patch | 20 -------------------
2 files changed, 1 insertion(+), 21 deletions(-)
delete mode 100644 src/patches/nasm-3.00_fix_typo_in_le32toh_function_name.patch
diff --git a/lfs/nasm b/lfs/nasm
index bd56757d9..26f91cc1b 100644
--- a/lfs/nasm
+++ b/lfs/nasm
@@ -31,6 +31,7 @@ DL_FILE = $(THISAPP).tar.xz
DL_FROM = $(URL_IPFIRE)
DIR_APP = $(DIR_SRC)/$(THISAPP)
TARGET = $(DIR_INFO)/$(THISAPP)
+SUP_ARCH = x86_64
###############################################################################
# Top-level Rules
@@ -70,7 +71,6 @@ $(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
deleted file mode 100644
index 3b198b2d8..000000000
--- a/src/patches/nasm-3.00_fix_typo_in_le32toh_function_name.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- 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.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] nasm: Use only with x86_64
2025-10-24 16:42 [PATCH] nasm: Use only with x86_64 Adolf Belka
@ 2025-10-25 13:02 ` Michael Tremer
0 siblings, 0 replies; 2+ messages in thread
From: Michael Tremer @ 2025-10-25 13:02 UTC (permalink / raw)
To: Adolf Belka; +Cc: development
Hello Adolf,
Yes this makes sense. Although it does compile on the other architectures, we simply don’t need to ever create any x86 assembly there.
For completeness, I have move the root file, too:
https://git.ipfire.org/?p=ipfire-2.x.git;a=commitdiff;h=ed737ca7b89ade1e23aa512d2fa5596a2df01a1d
-Michael
> On 24 Oct 2025, at 17:42, Adolf Belka <adolf.belka@ipfire.org> wrote:
>
> - nasm is linked in to syslinux and libjpeg.
> - libjpeg will only require nasm if CET has been enabled in glibc and the architecture is
> x86_64. CET is not enabled in IPFire, therefore libjpeg does not require nasm for
> building in x86_64 and is not required at all for libjpeg under aarch64 or riscv64
> - syslinux requires nasm to build but only in x86_64.
> - This patch sets the supported architecture to x86_64 only. The build of nasm will be
> skipped in aarch64 and riscv64.
> - The x86_64 build ran as normal. The build was also tested for aarch64 and the build of
> nasm was skipped. syslinux is skipped and libjpeg built successfully confirming that
> nasm does not need to be built for aarch64 or riscv64.
> - The patch is removed as it is only required for building nasm for an arm architecture
>
> Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
> ---
> lfs/nasm | 2 +-
> ...00_fix_typo_in_le32toh_function_name.patch | 20 -------------------
> 2 files changed, 1 insertion(+), 21 deletions(-)
> delete mode 100644 src/patches/nasm-3.00_fix_typo_in_le32toh_function_name.patch
>
> diff --git a/lfs/nasm b/lfs/nasm
> index bd56757d9..26f91cc1b 100644
> --- a/lfs/nasm
> +++ b/lfs/nasm
> @@ -31,6 +31,7 @@ DL_FILE = $(THISAPP).tar.xz
> DL_FROM = $(URL_IPFIRE)
> DIR_APP = $(DIR_SRC)/$(THISAPP)
> TARGET = $(DIR_INFO)/$(THISAPP)
> +SUP_ARCH = x86_64
>
> ###############################################################################
> # Top-level Rules
> @@ -70,7 +71,6 @@ $(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
> deleted file mode 100644
> index 3b198b2d8..000000000
> --- a/src/patches/nasm-3.00_fix_typo_in_le32toh_function_name.patch
> +++ /dev/null
> @@ -1,20 +0,0 @@
> ---- 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.1
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-10-25 13:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-10-24 16:42 [PATCH] nasm: Use only with x86_64 Adolf Belka
2025-10-25 13:02 ` Michael Tremer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox