This is the mail archive of the ecos-patches@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

AW: i386 RedBoot patch for GCC 4.x


Hi,

> [mailto:ecos-patches-owner@ecos.sourceware.org]Im Auftrag von Frank
> Pagliughi
> 
> Hello,
> 
> Not to be a pain, but last May I had submit this patch to remove the 
> compiler errors for RedBoot on the i386/PC using a 4.x 
> version of GCC. 
> My message seemed to go completely unnoticed, so I thought 
> I'd try one last time...
...
> diff -urN ecos-2006-05-13/packages/redboot/current/src/main.c 
> ecos/packages/redboot/current/src/main.c
> --- ecos-2006-05-13/packages/redboot/current/src/main.c	
> 2006-05-13 15:55:52.000000000 -0400
> +++ ecos/packages/redboot/current/src/main.c	2006-05-13 
> 16:23:38.000000000 -0400
> @@ -397,7 +397,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,
> +                HAL_THREAD_INIT_CONTEXT(workspace_end,
>                                          breakpoint, trampoline,0);
>  
>                  // switch context to trampoline (get GDB 
> stubs started)
> @@ -597,7 +597,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, 
> +    HAL_THREAD_INIT_CONTEXT(workspace_end, 
>                              entry, trampoline, 0);
>  
>      // switch context to trampoline


We had to do the same, without changing main.c it doesn't compile with gcc 4.1.1.
Using gcc 4.1.1, with your version I get "assignment makes pointer from integer without a cast".
Adding a temporary variable helps in both occurences:

CYG_ADDRWORD _tmp_workspace_end=(CYG_ADDRWORD)workspace_end;
HAL_THREAD_INIT_CONTEXT(_tmp_workspace_end, breakpoint, trampoline,0);

Bye
Alex


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]