aboutsummaryrefslogtreecommitdiff
path: root/palm
diff options
context:
space:
mode:
authorBoris Samorodov <bsam@FreeBSD.org>2007-11-07 21:45:30 +0000
committerBoris Samorodov <bsam@FreeBSD.org>2007-11-07 21:45:30 +0000
commit479eb783b21fed40d8dbb2885babf1baa3acce72 (patch)
treefcf076fbff7c0577b17997a0273edfa2d34c3976 /palm
parenta64382efe673cdd6f77b57c6e63268d55d456a78 (diff)
downloadports-479eb783b21fed40d8dbb2885babf1baa3acce72.tar.gz
ports-479eb783b21fed40d8dbb2885babf1baa3acce72.zip
Notes
Diffstat (limited to 'palm')
-rw-r--r--palm/prc-tools/Makefile16
-rw-r--r--palm/prc-tools/files/gcc42-patch-binutils-2.14_gas_as.h23
-rw-r--r--palm/prc-tools/files/gcc42-patch-binutils-2.14_gas_tc.h26
-rw-r--r--palm/prc-tools/files/gcc42-patch-gcc-3.3.1_gcc_cp_decl.c104
-rw-r--r--palm/prc-tools/files/gcc42-patch-gcc-3.3.1_include_obstack.h11
-rw-r--r--palm/prc-tools/files/gcc42-patch-gdb-5.3_gdb_remote-palmos.c16
-rw-r--r--palm/prc-tools/files/gcc42-patch-gdb-5.3_include_obstack.h11
7 files changed, 203 insertions, 4 deletions
diff --git a/palm/prc-tools/Makefile b/palm/prc-tools/Makefile
index 24b60641b503..3a64997621cd 100644
--- a/palm/prc-tools/Makefile
+++ b/palm/prc-tools/Makefile
@@ -68,10 +68,6 @@ CFLAGS:= ${CFLAGS:C/-m[-=0-9a-z]*//g}
.include <bsd.port.pre.mk>
-.if ${OSVERSION} >= 700042
-BROKEN= Does not compile with GCC 4.2
-.endif
-
post-extract:
@(cd ${WRKDIR} && ${GZIP_CMD} ${EXTRACT_BEFORE_ARGS} ${_DISTDIR}/${DISTNAME}.tar.gz ${EXTRACT_AFTER_ARGS})
@@ -115,6 +111,18 @@ post-patch:
@cd ${WRKDIR}/gcc-3.3.1 && ${PATCH} -p0 --forward --quiet -E < ${FILESDIR}/post-patch-gcc3-configure.in
@cd ${WRKDIR}/gcc-2.95.3 && ${PATCH} -p0 --forward --quiet -E < ${FILESDIR}/post-patch-gcc2-configure.in
@cd ${WRKDIR}/gdb-5.3 && ${PATCH} -p0 --forward --quiet -E < ${FILESDIR}/post-patch-gdb-configure.in
+.if ${OSVERSION} >= 700042
+ @(cd ${WRKDIR}; \
+ PATCHES_APPLIED="" ; \
+ ${ECHO_MSG} `${ECHO_CMD} ">>> OSVERSION=${OSVERSION}, applying gcc-42 patches."`; \
+ for i in ${FILESDIR}/gcc42-patch-*; do \
+ if ${PATCH} -p0 --forward --quiet -E < $$i; then \
+ PATCHES_APPLIED="$$PATCHES_APPLIED $$i"; \
+ else \
+ ${ECHO_MSG} `${ECHO_CMD} ">> Patch $$i failed to apply cleanly."` ; \
+ fi; \
+ done)
+.endif
pre-configure:
(cd ${WRKDIR}/prc-tools-${PORTVERSION} && \
diff --git a/palm/prc-tools/files/gcc42-patch-binutils-2.14_gas_as.h b/palm/prc-tools/files/gcc42-patch-binutils-2.14_gas_as.h
new file mode 100644
index 000000000000..e098a7dc3cba
--- /dev/null
+++ b/palm/prc-tools/files/gcc42-patch-binutils-2.14_gas_as.h
@@ -0,0 +1,23 @@
+--- binutils-2.14/gas/as.h.ORIG 2007-10-17 11:36:16.000000000 -0400
++++ binutils-2.14/gas/as.h 2007-10-17 11:44:10.000000000 -0400
+@@ -595,7 +595,19 @@
+ struct expressionS;
+ struct fix;
+ typedef struct symbol symbolS;
+-struct relax_type;
++struct relax_type
++{
++ /* Forward reach. Signed number. > 0. */
++ long rlx_forward;
++ /* Backward reach. Signed number. < 0. */
++ long rlx_backward;
++
++ /* Bytes length of this address. */
++ unsigned char rlx_length;
++
++ /* Next longer relax-state. 0 means there is no 'next' relax-state. */
++ relax_substateT rlx_more;
++};
+ typedef struct frag fragS;
+
+ #ifdef BFD_ASSEMBLER
diff --git a/palm/prc-tools/files/gcc42-patch-binutils-2.14_gas_tc.h b/palm/prc-tools/files/gcc42-patch-binutils-2.14_gas_tc.h
new file mode 100644
index 000000000000..6401242e69f5
--- /dev/null
+++ b/palm/prc-tools/files/gcc42-patch-binutils-2.14_gas_tc.h
@@ -0,0 +1,26 @@
+--- binutils-2.14/gas/tc.h.ORIG 2007-10-17 11:36:37.000000000 -0400
++++ binutils-2.14/gas/tc.h 2007-10-17 11:37:19.000000000 -0400
+@@ -24,23 +24,6 @@
+
+ extern const pseudo_typeS md_pseudo_table[];
+
+-/* JF moved this here from as.h under the theory that nobody except MACHINE.c
+- and write.c care about it anyway. */
+-
+-struct relax_type
+-{
+- /* Forward reach. Signed number. > 0. */
+- long rlx_forward;
+- /* Backward reach. Signed number. < 0. */
+- long rlx_backward;
+-
+- /* Bytes length of this address. */
+- unsigned char rlx_length;
+-
+- /* Next longer relax-state. 0 means there is no 'next' relax-state. */
+- relax_substateT rlx_more;
+-};
+-
+ typedef struct relax_type relax_typeS;
+
+ extern const int md_reloc_size; /* Size of a relocation record */
diff --git a/palm/prc-tools/files/gcc42-patch-gcc-3.3.1_gcc_cp_decl.c b/palm/prc-tools/files/gcc42-patch-gcc-3.3.1_gcc_cp_decl.c
new file mode 100644
index 000000000000..a1ebea175cfd
--- /dev/null
+++ b/palm/prc-tools/files/gcc42-patch-gcc-3.3.1_gcc_cp_decl.c
@@ -0,0 +1,104 @@
+--- gcc-3.3.1/gcc/cp/decl.c.ORIG 2007-10-17 11:39:05.000000000 -0400
++++ gcc-3.3.1/gcc/cp/decl.c 2007-10-17 11:26:47.000000000 -0400
+@@ -677,6 +677,13 @@
+ ? cp_function_chain->bindings \
+ : scope_chain->bindings)
+
++#define set_current_binding_level(x) \
++{ \
++ if(cfun && cp_function_chain->bindings) \
++ cp_function_chain->bindings = (x); \
++ else scope_chain->bindings = (x); \
++}
++
+ /* The binding level of the current class, if any. */
+
+ #define class_binding_level scope_chain->class_bindings
+@@ -724,7 +731,7 @@
+ are active. */
+ memset ((char*) newlevel, 0, sizeof (struct cp_binding_level));
+ newlevel->level_chain = current_binding_level;
+- current_binding_level = newlevel;
++ set_current_binding_level(newlevel);
+ newlevel->tag_transparent = tag_transparent;
+ newlevel->more_cleanups_ok = 1;
+
+@@ -780,7 +787,7 @@
+ }
+ {
+ register struct cp_binding_level *level = current_binding_level;
+- current_binding_level = current_binding_level->level_chain;
++ set_current_binding_level(current_binding_level->level_chain);
+ level->level_chain = free_binding_level;
+ if (level->parm_flag != 2)
+ binding_table_free (level->type_decls);
+@@ -797,7 +804,7 @@
+ suspend_binding_level ()
+ {
+ if (class_binding_level)
+- current_binding_level = class_binding_level;
++ set_current_binding_level(class_binding_level);
+
+ if (NAMESPACE_LEVEL (global_namespace))
+ my_friendly_assert (!global_scope_p (current_binding_level), 20030527);
+@@ -816,7 +823,7 @@
+ }
+ is_class_level = 0;
+ }
+- current_binding_level = current_binding_level->level_chain;
++ set_current_binding_level(current_binding_level->level_chain);
+ find_class_binding_level ();
+ }
+
+@@ -829,7 +836,7 @@
+ my_friendly_assert(!class_binding_level, 386);
+ /* Also, resuming a non-directly nested namespace is a no-no. */
+ my_friendly_assert(b->level_chain == current_binding_level, 386);
+- current_binding_level = b;
++ set_current_binding_level(b);
+ if (ENABLE_SCOPE_CHECKING)
+ {
+ b->binding_depth = binding_depth;
+@@ -4529,9 +4536,9 @@
+ else
+ {
+ b = current_binding_level;
+- current_binding_level = level;
++ set_current_binding_level(level);
+ x = pushdecl (x);
+- current_binding_level = b;
++ set_current_binding_level(b);
+ }
+ current_function_decl = function_decl;
+ POP_TIMEVAR_AND_RETURN (TV_NAME_LOOKUP, x);
+@@ -6933,7 +6940,7 @@
+ current_lang_name = lang_name_c;
+
+ current_function_decl = NULL_TREE;
+- current_binding_level = NULL_BINDING_LEVEL;
++ set_current_binding_level(NULL_BINDING_LEVEL);
+ free_binding_level = NULL_BINDING_LEVEL;
+
+ build_common_tree_nodes (flag_signed_char);
+@@ -10766,10 +10773,10 @@
+ if (decl_context == NORMAL && !toplevel_bindings_p ())
+ {
+ struct cp_binding_level *b = current_binding_level;
+- current_binding_level = b->level_chain;
++ set_current_binding_level(b->level_chain);
+ if (current_binding_level != 0 && toplevel_bindings_p ())
+ decl_context = PARM;
+- current_binding_level = b;
++ set_current_binding_level(b);
+ }
+
+ if (name == NULL)
+@@ -14406,7 +14413,7 @@
+ FIXME factor out the non-RTL stuff. */
+ bl = current_binding_level;
+ init_function_start (decl1, input_filename, lineno);
+- current_binding_level = bl;
++ set_current_binding_level(bl);
+
+ /* Even though we're inside a function body, we still don't want to
+ call expand_expr to calculate the size of a variable-sized array.
diff --git a/palm/prc-tools/files/gcc42-patch-gcc-3.3.1_include_obstack.h b/palm/prc-tools/files/gcc42-patch-gcc-3.3.1_include_obstack.h
new file mode 100644
index 000000000000..6bd3fbabb680
--- /dev/null
+++ b/palm/prc-tools/files/gcc42-patch-gcc-3.3.1_include_obstack.h
@@ -0,0 +1,11 @@
+--- gcc-3.3.1/include/obstack.h.ORIG 2007-10-17 11:39:14.000000000 -0400
++++ gcc-3.3.1/include/obstack.h 2007-10-17 09:44:47.000000000 -0400
+@@ -349,7 +349,7 @@
+
+ #define obstack_memory_used(h) _obstack_memory_used (h)
+
+-#if defined __GNUC__ && defined __STDC__ && __STDC__
++#if defined USE_OBSTACK_MACROS && defined __GNUC__ && defined __STDC__ && __STDC__
+ /* NextStep 2.0 cc is really gcc 1.93 but it defines __GNUC__ = 2 and
+ does not implement __extension__. But that compiler doesn't define
+ __GNUC_MINOR__. */
diff --git a/palm/prc-tools/files/gcc42-patch-gdb-5.3_gdb_remote-palmos.c b/palm/prc-tools/files/gcc42-patch-gdb-5.3_gdb_remote-palmos.c
new file mode 100644
index 000000000000..dfb911cde64e
--- /dev/null
+++ b/palm/prc-tools/files/gcc42-patch-gdb-5.3_gdb_remote-palmos.c
@@ -0,0 +1,16 @@
+--- gdb-5.3/gdb/remote-palmos.c.ORIG 2007-10-17 11:46:12.000000000 -0400
++++ gdb-5.3/gdb/remote-palmos.c 2007-10-17 11:46:44.000000000 -0400
+@@ -128,13 +128,6 @@
+
+ extern struct target_ops palmos_ops, pilot_ops; /* Forward decl */
+
+-/* This was 5 seconds, which is a long time to sit and wait.
+- Unless this is going though some terminal server or multiplexer or
+- other form of hairy serial connection, I would think 2 seconds would
+- be plenty. */
+-
+-static int remote_timeout = 2;
+-
+ static CORE_ADDR text_addr=0, data_addr=0, bss_addr=0;
+ static CORE_ADDR save_ssp, save_usp;
+ static enum target_signal wbreakpoint_signo;
diff --git a/palm/prc-tools/files/gcc42-patch-gdb-5.3_include_obstack.h b/palm/prc-tools/files/gcc42-patch-gdb-5.3_include_obstack.h
new file mode 100644
index 000000000000..fdceae6f0bf2
--- /dev/null
+++ b/palm/prc-tools/files/gcc42-patch-gdb-5.3_include_obstack.h
@@ -0,0 +1,11 @@
+--- gdb-5.3/include/obstack.h.ORIG 2007-10-17 11:39:24.000000000 -0400
++++ gdb-5.3/include/obstack.h 2007-10-17 11:30:02.000000000 -0400
+@@ -349,7 +349,7 @@
+
+ #define obstack_memory_used(h) _obstack_memory_used (h)
+
+-#if defined __GNUC__ && defined __STDC__ && __STDC__
++#if defined USE_OBSTACK_MACROS && defined __GNUC__ && defined __STDC__ && __STDC__
+ /* NextStep 2.0 cc is really gcc 1.93 but it defines __GNUC__ = 2 and
+ does not implement __extension__. But that compiler doesn't define
+ __GNUC_MINOR__. */