Building RedBoot with gcc4 aborts because a cast expression is used as
an lvalue in an assignment. The attached patch fixes this.
Note that this issue was fixed by a similar patch almost 2.5 years ago,
but it was removed a month later to fix some compiler warnings.
(revisions 1.61 and 1.62 of /ecos/packages/redboot/current/src/main.c)
--
%SYSTEM-F-ANARCHISM, The operating system has been overthrown
Index: redboot/current/src/main.c
===================================================================
RCS file: /cvs/ecos/ecos/packages/redboot/current/src/main.c,v
retrieving revision 1.66
diff -u -r1.66 main.c
--- redboot/current/src/main.c 20 Jul 2006 20:27:47 -0000 1.66
+++ redboot/current/src/main.c 1 Jun 2007 11:11:03 -0000
@@ -394,8 +394,7 @@
CYGACC_CALL_IF_SET_CONSOLE_COMM(cur);
// set up a temporary context that will take us to the
trampoline
- HAL_THREAD_INIT_CONTEXT((CYG_ADDRWORD)workspace_end,
- breakpoint, trampoline,0);
+ HAL_THREAD_INIT_CONTEXT(workspace_end, breakpoint,
trampoline,0);
// switch context to trampoline (get GDB stubs started)
HAL_THREAD_SWITCH_CONTEXT(&saved_context, &workspace_end);
@@ -600,8 +599,7 @@
HAL_ICACHE_INVALIDATE_ALL();
HAL_DCACHE_INVALIDATE_ALL();
// set up a temporary context that will take us to the trampoline
- HAL_THREAD_INIT_CONTEXT((CYG_ADDRWORD)workspace_end,
- entry, trampoline, 0);
+ HAL_THREAD_INIT_CONTEXT(workspace_end, entry, trampoline, 0);
// switch context to trampoline
HAL_THREAD_SWITCH_CONTEXT(&saved_context, &workspace_end);