[PATCH]Add include guard to sparc.h when using assembly

Joel Sherrill Joel.Sherrill at OARcorp.com
Tue Sep 24 19:31:23 UTC 2013


I think it is acceptable but sparc.h may have items valid to use from asm. Does it? Or if it completely C?

Gedare Bloom <gedare at rtems.org> wrote:


Is it acceptable for an application to include rtems/asm.h? This seems
suspect to me.

On Mon, Sep 23, 2013 at 9:50 PM, Mohammed Khoory <mkhoory at eiast.ae> wrote:
> Hi,
>
> While working on a LEON3-based application, I was writing an assembly file
> and so I included <rtems/asm.h> in order to use macros like PUBLIC() and
> SYM(). When I tried to assemble my file (with sparc-rtems4.10-as) I got a
> lot of "unknown opcode: typedef" errors. Looking at the headers I noticed
> that it was including sparc.h, which has a bunch of typedefs.
>
> This tiny patch fixes this problem by adding an #ifndef ASM around the
> sparc.h include line.
>
> If there are any comments let me know.
>
> Regards,
> Mohammed Khoory
>
> _______________________________________________
> rtems-devel mailing list
> rtems-devel at rtems.org
> http://www.rtems.org/mailman/listinfo/rtems-devel
>
_______________________________________________
rtems-devel mailing list
rtems-devel at rtems.org
http://www.rtems.org/mailman/listinfo/rtems-devel




More information about the devel mailing list