The C++ pragma init_priority is enabled for several sparc targets, but not for the generic sparc-elf (--target=sparc-elf). The file gcc/config/sparc/elf.h should include the following lines:
#undef CTORS_SECTION_ASM_OP #undef DTORS_SECTION_ASM_OP #define SUPPORTS_INIT_PRIORITY 1 This problem exists on all gcc-3.x versions, including gcc-3.4.3. Bare-bone operating systems such as eCos use the sparc-elf target and require init_priority to work. -- Summary: C++ init_priority is not enabled for generic sparc-elf target Product: gcc Version: 3.2.3 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: jiri at gaisler dot com CC: gcc-bugs at gcc dot gnu dot org GCC build triplet: any GCC host triplet: any GCC target triplet: sparc-elf http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19715