diff options
Diffstat (limited to 'dev-lang/jwasm/files')
| -rw-r--r-- | dev-lang/jwasm/files/jwasm-2.10-gcc-4.8-fwdecl.patch | 41 | ||||
| -rw-r--r-- | dev-lang/jwasm/files/jwasm-2.10-types-test.patch | 60 | ||||
| -rw-r--r-- | dev-lang/jwasm/files/jwasm-2.10-uint_32-on-amd64.patch | 28 | ||||
| -rw-r--r-- | dev-lang/jwasm/files/jwasm-2.11-types-test.patch | 58 |
4 files changed, 187 insertions, 0 deletions
diff --git a/dev-lang/jwasm/files/jwasm-2.10-gcc-4.8-fwdecl.patch b/dev-lang/jwasm/files/jwasm-2.10-gcc-4.8-fwdecl.patch new file mode 100644 index 000000000000..88bbcb94723c --- /dev/null +++ b/dev-lang/jwasm/files/jwasm-2.10-gcc-4.8-fwdecl.patch @@ -0,0 +1,41 @@ +From c2b789403a1ca833bcabada5347bb18d7bd095c2 Mon Sep 17 00:00:00 2001 +From: Sergei Trofimovich <slyfox@gentoo.org> +Date: Wed, 15 May 2013 22:04:01 +0300 +Subject: [PATCH] fix build failure on gcc-4.8 (missing forward declaration) + +Fixes the following build error: +> gcc -c -IH -D__UNIX__ -DNDEBUG -O2 -o GccUnixR/parser.o parser.c +> In file included from parser.c:35:0: +> H/parser.h:305:48: warning: 'struct expr' declared inside parameter list [enabled by default] +> extern void EmitConstError( const struct expr * ); +> ^ +> H/parser.h:305:48: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default] +> parser.c:790:6: error: conflicting types for 'EmitConstError' +> void EmitConstError( const struct expr *opnd ) +> ^ +> In file included from parser.c:35:0: +> H/parser.h:305:19: note: previous declaration of 'EmitConstError' was here +> extern void EmitConstError( const struct expr * ); +> ^ +> make: *** [GccUnixR/parser.o] Error 1 + +Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> +--- + H/parser.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/H/parser.h b/H/parser.h +index 1744f0d..c2c7b99 100644 +--- a/H/parser.h ++++ b/H/parser.h +@@ -302,6 +302,7 @@ extern int SizeFromMemtype( enum memtype, int, struct asym * ); + extern ret_code MemtypeFromSize( int, enum memtype * );
+ extern int SizeFromRegister( int );
+ extern ret_code GetLangType( int *, struct asm_tok[], enum lang_type * );
++struct expr;
+ extern void EmitConstError( const struct expr * );
+
+ extern void sym_add_table( struct symbol_queue *, struct dsym * );
+-- +1.8.2.1 + diff --git a/dev-lang/jwasm/files/jwasm-2.10-types-test.patch b/dev-lang/jwasm/files/jwasm-2.10-types-test.patch new file mode 100644 index 000000000000..e57c08afc83e --- /dev/null +++ b/dev-lang/jwasm/files/jwasm-2.10-types-test.patch @@ -0,0 +1,60 @@ +From b19339d4356efbd9b49f73e67ed7c09b9dad4b75 Mon Sep 17 00:00:00 2001 +From: Sergei Trofimovich <slyfox@gentoo.org> +Date: Thu, 16 May 2013 12:24:17 +0300 +Subject: [PATCH 1/2] types: add sanity tests for used sizes + +Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> +--- + GccUnix.mak | 2 +- + checks.c | 26 ++++++++++++++++++++++++++ + 2 files changed, 27 insertions(+), 1 deletion(-) + create mode 100644 checks.c + +diff --git a/GccUnix.mak b/GccUnix.mak +index 567b842..bcb2fef 100644 +--- a/GccUnix.mak ++++ b/GccUnix.mak +@@ -44,7 +44,7 @@ proj_obj = $(OUTD)/main.o $(OUTD)/assemble.o $(OUTD)/assume.o \ + $(OUTD)/apiemu.o $(OUTD)/dbgcv.o $(OUTD)/end.o \ + $(OUTD)/backptch.o $(OUTD)/msgtext.o $(OUTD)/tbyte.o \ + $(OUTD)/cpumodel.o $(OUTD)/safeseh.o $(OUTD)/cmdline.o \ +- $(OUTD)/fastpass.o ++ $(OUTD)/fastpass.o $(OUTD)/checks.o + ###### + + #.c.o: +diff --git a/checks.c b/checks.c +new file mode 100644 +index 0000000..af8630f +--- /dev/null ++++ b/checks.c +@@ -0,0 +1,26 @@ ++/****************************************************************************
++*
++* This code is Public Domain.
++*
++* ========================================================================
++*
++* Description: make sure "inttype.h" filelds are of the desired size.
++*
++****************************************************************************/
++
++#include "inttype.h"
++ ++/* fails to compile if type sizes are of unexpected size */ ++static void validate_inttype_sizes() ++{ ++/* try to create */ ++#define T_IS_SIZE(__type, __expected_size, __test_name) \ ++ char __test_name[2 * (sizeof (__type) == (__expected_size)) - 1]; ++ ++ T_IS_SIZE(uint_8, 1, size_of_uint_8_must_be_1_byte); ++ T_IS_SIZE(uint_16, 2, size_of_uint_16_must_be_2_bytes); ++ T_IS_SIZE(uint_32, 4, size_of_uint_32_must_be_4_bytes); ++ T_IS_SIZE(uint_64, 8, size_of_uint_64_must_be_8_bytes); ++ ++#undef T_IS_SIZE ++} +-- +1.8.2.1 + diff --git a/dev-lang/jwasm/files/jwasm-2.10-uint_32-on-amd64.patch b/dev-lang/jwasm/files/jwasm-2.10-uint_32-on-amd64.patch new file mode 100644 index 000000000000..f6100f657fcb --- /dev/null +++ b/dev-lang/jwasm/files/jwasm-2.10-uint_32-on-amd64.patch @@ -0,0 +1,28 @@ +From 4399dabdd55fdf9da08c3604c5b3545391c1d44f Mon Sep 17 00:00:00 2001 +From: Sergei Trofimovich <slyfox@gentoo.org> +Date: Thu, 16 May 2013 12:24:44 +0300 +Subject: [PATCH 2/2] H/inttype.h: make uint_32 be a 32-bit int on x86_64-gcc + +Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> +--- + H/inttype.h | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/H/inttype.h b/H/inttype.h +index 7316cbc..af2ef17 100644 +--- a/H/inttype.h ++++ b/H/inttype.h +@@ -31,6 +31,10 @@ +
+ #ifndef _INTTYPE_H_INCLUDED_
+ #define _INTTYPE_H_INCLUDED_
++/* some autoconfiguration */
++#if defined(__LP64__)
++# define LONG_IS_64BITS 1
++#endif /* __LP64__ */
+
+ typedef unsigned uint;
+
+-- +1.8.2.1 + diff --git a/dev-lang/jwasm/files/jwasm-2.11-types-test.patch b/dev-lang/jwasm/files/jwasm-2.11-types-test.patch new file mode 100644 index 000000000000..047d1d005510 --- /dev/null +++ b/dev-lang/jwasm/files/jwasm-2.11-types-test.patch @@ -0,0 +1,58 @@ +From b19339d4356efbd9b49f73e67ed7c09b9dad4b75 Mon Sep 17 00:00:00 2001 +From: Sergei Trofimovich <slyfox@gentoo.org> +Date: Thu, 16 May 2013 12:24:17 +0300 +Subject: [PATCH 1/2] types: add sanity tests for used sizes + +Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> +--- + GccUnix.mak | 2 +- + checks.c | 26 ++++++++++++++++++++++++++ + 2 files changed, 27 insertions(+), 1 deletion(-) + create mode 100644 checks.c + +diff --git a/gccmod.inc b/gccmod.inc +index 70f388a..86cb2bf 100644 +--- a/gccmod.inc ++++ b/gccmod.inc +@@ -6,6 +6,7 @@ $(OUTD)/atofloat.o \ + $(OUTD)/backptch.o \
+ $(OUTD)/bin.o \
+ $(OUTD)/branch.o \
++$(OUTD)/checks.o \
+ $(OUTD)/cmdline.o \
+ $(OUTD)/codegen.o \
+ $(OUTD)/coff.o \
+diff --git a/checks.c b/checks.c +new file mode 100644 +index 0000000..af8630f +--- /dev/null ++++ b/checks.c +@@ -0,0 +1,26 @@ ++/****************************************************************************
++*
++* This code is Public Domain.
++*
++* ========================================================================
++*
++* Description: make sure "inttype.h" filelds are of the desired size.
++*
++****************************************************************************/
++
++#include "inttype.h"
++ ++/* fails to compile if type sizes are of unexpected size */ ++static void validate_inttype_sizes() ++{ ++/* try to create */ ++#define T_IS_SIZE(__type, __expected_size, __test_name) \ ++ char __test_name[2 * (sizeof (__type) == (__expected_size)) - 1]; ++ ++ T_IS_SIZE(uint_8, 1, size_of_uint_8_must_be_1_byte); ++ T_IS_SIZE(uint_16, 2, size_of_uint_16_must_be_2_bytes); ++ T_IS_SIZE(uint_32, 4, size_of_uint_32_must_be_4_bytes); ++ T_IS_SIZE(uint_64, 8, size_of_uint_64_must_be_8_bytes); ++ ++#undef T_IS_SIZE ++} +-- +1.8.2.1 |
