summaryrefslogtreecommitdiff
path: root/lang/parrot/patches
diff options
context:
space:
mode:
authorhe <he>2009-04-17 19:54:39 +0000
committerhe <he>2009-04-17 19:54:39 +0000
commit975bfe18e90ac0ad7c380afaa79e782f29c5369a (patch)
treee1fd51e87ee51204e474f865a01ac56f75fb9234 /lang/parrot/patches
parent21ddf7663d24895527c453584ffbf4de757bd304 (diff)
downloadpkgsrc-975bfe18e90ac0ad7c380afaa79e782f29c5369a.tar.gz
Two minor changes to the adaptation for NetBSD/powerpc, resulting
in no code change and adding portability to NetBSD 3.x, so no revision bump: o Let the workaround for missing R_PPC_ADDR16{HI,LO} work for other systems who also define R_PPC_16_{HI,LO} instead. o Add portability to NetBSD/powerpc 3.x, which has a very minimalist <powerpc/elf_machdep.h> file.
Diffstat (limited to 'lang/parrot/patches')
-rw-r--r--lang/parrot/patches/patch-ab35
1 files changed, 26 insertions, 9 deletions
diff --git a/lang/parrot/patches/patch-ab b/lang/parrot/patches/patch-ab
index e78667d61ca..31f7532942a 100644
--- a/lang/parrot/patches/patch-ab
+++ b/lang/parrot/patches/patch-ab
@@ -1,18 +1,35 @@
-$NetBSD: patch-ab,v 1.4 2009/03/25 23:01:48 he Exp $
+$NetBSD: patch-ab,v 1.5 2009/04/17 19:54:39 he Exp $
-Handle a few ELF-related symbols named differently in NetBSD
-compared to Linux.
+The R_PPC_ADDR16{HI,LO} constants are named something else on
+NetBSD, and might be elsewhere.
+Also add workarounds for NetBSD/powerpc 3.x, which has a minimal
+<powerpc/elf_machdep.h> file.
---- src/exec_save.c.orig 2009-03-08 21:32:43.000000000 +0100
+--- src/exec_save.c.orig 2009-03-08 20:32:43.000000000 +0000
+++ src/exec_save.c
-@@ -30,6 +30,11 @@ static void save_int(FILE *fp, int i);
+@@ -30,6 +30,26 @@ static void save_int(FILE *fp, int i);
static void save_short(FILE *fp, short s);
static void save_struct(FILE *fp, void *sp, size_t size);
-+#if defined(PARROT_PPC) && defined(__NetBSD__)
-+#define R_PPC_ADDR16_HI R_PPC_16_HI
-+#define R_PPC_ADDR16_LO R_PPC_16_LO
-+#endif /* PARROT_PPC && __NetBSD__ */
++#if defined(PARROT_PPC)
++#if !defined(R_PPC_ADDR16_HI) && !defined(R_PPC_ADDR16_LO) && \
++ defined(R_PPC_16_HI) && defined(R_PPC_16_LO)
++# define R_PPC_ADDR16_HI R_PPC_16_HI
++# define R_PPC_ADDR16_LO R_PPC_16_LO
++#endif
++/*
++ * NetBSD/powerpc 3.x doesn't define these constants,
++ * so add some workarounds for it.
++ */
++#if !defined(R_PPC_ADDR16_HI) && !defined(R_PPC_ADDR16_LO) && \
++ defined(__NetBSD__)
++# define R_PPC_ADDR16_HI 5
++# define R_PPC_ADDR16_LO 4
++#endif
++#if !defined(R_PPC_REL24) && defined(__NetBSD__)
++# define R_PPC_REL24 10
++#endif
++#endif /* PARROT_PPC */
+
#ifdef EXEC_A_OUT