This is the mail archive of the
ecos-patches@sources.redhat.com
mailing list for the eCos project.
init_priority fix for services/memalloc
- From: Øyvind Harboe <oyvind dot harboe at zylin dot com>
- To: ecos-patches at sources dot redhat dot com
- Date: Mon, 27 Sep 2004 15:27:02 +0200
- Subject: init_priority fix for services/memalloc
The following works w/GCC 3.4.2:
static foo CYGBLD_ATTRIB_INIT_PRI(N) bar;
This does not:
static foo bar CYGBLD_ATTRIB_INIT_PRI(N) ;
--
Øyvind Harboe
http://www.zylin.com
Index: current/ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos/packages/services/memalloc/common/current/ChangeLog,v
retrieving revision 1.31
diff -w -r1.31 ChangeLog
0a1,6
> 2004-09-27 Oyvind Harboe <oyvind.harboe@zylin.com>
>
> * heapgen.tcl: place __attribute((init_priority())) attribute
> in the right position such that it works with GCC 3.4.2.
>
>
Index: current/src/heapgen.tcl
===================================================================
RCS file: /cvs/ecos/ecos/packages/services/memalloc/common/current/src/heapgen.tcl,v
retrieving revision 1.8
diff -w -r1.8 heapgen.tcl
175c175
< puts $cfile [ format "%s cygmem_pool_%s ( (cyg_uint8 *)CYGMEM_SECTION_%s ," \
---
> puts $cfile [ format "%s cygmem_pool_%s CYGBLD_ATTRIB_INIT_PRI(CYG_INIT_MEMALLOC) ( (cyg_uint8 *)CYGMEM_SECTION_%s ," \
179c179
< puts $cfile " CYGBLD_ATTRIB_INIT_PRI(CYG_INIT_MEMALLOC);\n"
---
> puts $cfile " ;\n"
183c183
< puts $cfile [ format "%s cygmem_pool_%s ( (cyg_uint8 *)CYGMEM_SECTION_%s , CYGMEM_SECTION_%s_SIZE ) CYGBLD_ATTRIB_INIT_PRI(CYG_INIT_MEMALLOC);\n" \
---
> puts $cfile [ format "%s cygmem_pool_%s CYGBLD_ATTRIB_INIT_PRI(CYG_INIT_MEMALLOC) ( (cyg_uint8 *)CYGMEM_SECTION_%s , CYGMEM_SECTION_%s_SIZE ) ;\n" \