Files
haikuports/dev-lang/nasm/patches/nasm-2.16.03.patchset
PulkoMandy d022e9ea02 nasm: update to 2.16.03.
Better patch for avoiding running non-working perl scripts.
2025-06-21 15:58:02 +02:00

126 lines
4.2 KiB
Plaintext

From 0b9ea5bb55fdbe5ab770f18b2854857afc17df18 Mon Sep 17 00:00:00 2001
From: Leorize <leorize+oss@disroot.org>
Date: Thu, 23 Jan 2020 12:13:55 -0600
Subject: Makefile.in: use iquote for include paths
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The -I flag used causes gcc to pick headers from NASM instead of system
headers for system includes. Since NASM have headers with names
overlapping with the ones in the C standard library (ie. float.h). This
breaks compilation on certain systems (ie. Haiku).
This commit swap out the -I flags for -iquote, to only prioritise NASM
include paths for quoted includes.
Signed-off-by: Hiếu Lê <leorize+oss@disroot.org>
diff --git a/Makefile.in b/Makefile.in
index 601ad68..ff70bc7 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -22,12 +22,12 @@ CC = @CC@
CFLAGS = @CFLAGS@
CPPFLAGS = @CPPFLAGS@
BUILD_CFLAGS = $(CPPFLAGS) $(CFLAGS) @DEFS@
-INTERNAL_CFLAGS = -I$(srcdir) -I$(objdir) \
- -I$(srcdir)/include -I$(objdir)/include \
- -I$(srcdir)/x86 -I$(objdir)/x86 \
- -I$(srcdir)/asm -I$(objdir)/asm \
- -I$(srcdir)/disasm -I$(objdir)/disasm \
- -I$(srcdir)/output -I$(objdir)/output
+INTERNAL_CFLAGS = -iquote$(srcdir) -iquote$(objdir) \
+ -iquote$(srcdir)/include -iquote$(objdir)/include \
+ -iquote$(srcdir)/x86 -iquote$(objdir)/x86 \
+ -iquote$(srcdir)/asm -iquote$(objdir)/asm \
+ -iquote$(srcdir)/disasm -iquote$(objdir)/disasm \
+ -iquote$(srcdir)/output -iquote$(objdir)/output
ALL_CFLAGS = $(BUILD_CFLAGS) $(INTERNAL_CFLAGS)
LDFLAGS = @LDFLAGS@
ALL_LDFLAGS = $(ALL_CFLAGS) $(LDFLAGS)
--
2.48.1
From d284c98444bbbcaec44eb682de7dfd0774efd92d Mon Sep 17 00:00:00 2001
From: robxnano <89391914+robxnano@users.noreply.github.com>
Date: Sun, 24 Mar 2024 22:59:15 +0000
Subject: Add Haiku definition for path separators
diff --git a/nasmlib/path.c b/nasmlib/path.c
index d228ed1..5d6a5f2 100644
--- a/nasmlib/path.c
+++ b/nasmlib/path.c
@@ -53,7 +53,7 @@
# define curdir "."
#elif defined(unix) || defined(__unix) || defined(__unix__) || \
defined(__UNIX__) || defined(__Unix__) || \
- defined(__MACH__) || defined(__BEOS__)
+ defined(__MACH__) || defined(__BEOS__) || defined(__HAIKU__)
/* Unix and Unix-like operating systems and others using
* the equivalent syntax (slashes as only separators, no concept of volume)
*
--
2.48.1
From 5a06a0552e3ee6fafe668e52df041026bfc8e4b4 Mon Sep 17 00:00:00 2001
From: PulkoMandy <pulkomandy@pulkomandy.tk>
Date: Sat, 21 Jun 2025 15:55:00 +0200
Subject: Remove warnings generation
Not needed, the files are present in the source archive. Seems to cause
problems with make and perl.
diff --git a/Makefile.in b/Makefile.in
index ff70bc7..d080882 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -292,41 +292,6 @@ x86/regs.h: x86/regs.dat x86/regs.pl
$(RUNPERL) $(srcdir)/x86/regs.pl h \
$(srcdir)/x86/regs.dat > x86/regs.h
-# Extract warnings from source code. This is done automatically if any
-# C files have changed; the script is fast enough that that is
-# reasonable, but doesn't update the time stamp if the files aren't
-# changed, to avoid rebuilding everything every time. Track the actual
-# dependency by the empty file asm/warnings.time.
-.PHONY: warnings
-warnings: dirs
- $(RM_F) $(WARNFILES) $(WARNTIMES) asm/warnings.time
- $(MAKE) asm/warnings.time
-
-asm/warnings.time: $(WARNSRCS) asm/warnings.pl
- $(EMPTY) asm/warnings.time
- $(MAKE) $(WARNTIMES)
-
-asm/warnings_c.h.time: asm/warnings.pl asm/warnings.time
- $(RUNPERL) $(srcdir)/asm/warnings.pl c asm/warnings_c.h $(srcdir)
- $(EMPTY) asm/warnings_c.h.time
-
-asm/warnings_c.h: asm/warnings_c.h.time
- @: Side effect
-
-include/warnings.h.time: asm/warnings.pl asm/warnings.time
- $(RUNPERL) $(srcdir)/asm/warnings.pl h include/warnings.h $(srcdir)
- $(EMPTY) include/warnings.h.time
-
-include/warnings.h: include/warnings.h.time
- @: Side effect
-
-doc/warnings.src.time: asm/warnings.pl asm/warnings.time
- $(RUNPERL) $(srcdir)/asm/warnings.pl doc doc/warnings.src $(srcdir)
- $(EMPTY) doc/warnings.src.time
-
-doc/warnings.src : doc/warnings.src.time
- @: Side effect
-
# Assembler token hash
asm/tokhash.c: x86/insns.dat x86/insnsn.c asm/tokens.dat asm/tokhash.pl \
perllib/phash.ph
--
2.48.1