[PATCH]Add include guard to sparc.h when using assembly
Gedare Bloom
gedare at rtems.org
Wed Sep 25 01:13:53 UTC 2013
Thanks! Contributions always welcome. :) So to be clear, the problem
does not affect the 4.10 head?
On Tue, Sep 24, 2013 at 8:45 PM, Mohammed Khoory <mkhoory at eiast.ae> wrote:
> Please ignore my patch. It seems that I found the problem in rtems-4.10.2,
> which is what I'm working with, and I thought I had found the same problem
> in git, so I decided to send in the same fix I did for 4.10.2.. but it seems
> that this issue isn't there in the git version because everything seems to
> be included correctly.
>
> Basedefs.h does have an include guard around stdint.h and the other include
> lines, so I don't think there's a problem there.
>
> Sorry for any time wasted. I'll try harder to make sure that my patches are
> sound next time.
>
>>-----Original Message-----
>>From: gedare at gwmail.gwu.edu [mailto:gedare at gwmail.gwu.edu] On Behalf
>>Of Gedare Bloom
>>Sent: Wednesday, September 25, 2013 4:42 AM
>>To: Joel Sherrill
>>Cc: Mohammed Khoory; rtems-devel at rtems.org
>>Subject: Re: [PATCH]Add include guard to sparc.h when using assembly
>>
>>I don't think the problem is sparc.h, which already does include within it
> some
>>asm guards. Perhaps we should dig into the include to figure out where the
>>breakage occurs. A simple test case would be helpful. I suspect the
> compiler
>>winds up in basedefs.h and there are missing guards there. basedefs.h does
>>not look quite "asm" safe.
>>
>>-Gedare
>>
>>On Tue, Sep 24, 2013 at 3:31 PM, Joel Sherrill <Joel.Sherrill at oarcorp.com>
>>wrote:
>>> 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