Re: [PATCH] libc: Added sig2str/str2sig prototypes

2021-06-17 Thread Eshan Dhawan

> On 17-Jun-2021, at 1:14 PM, Matthew Joyce  wrote:
> 
> Hi Eshan,
> 
> Thanks very much for this...It's really helpful!
> 
> Question on workflow:
> So for this example, I just apply the patch to RSB. Do I understand correctly
> that we need to rebuild the tool chain each and every time I make any
> change?
Yupp that’s one of the reasons it takes time to work on a patch. 
> (Step 7 in
> Vaibhav's Blog) This didn't compile, apparently because of the double
> restricts. Do I need
> to make a change, rebuild the tool chain (around 1.33 hours), and test
> again? Hopefully
> there are shortcuts around that!
You can check for symbols that’s the only way we had 
No shortcuts 
If it builds for newlib you have to build the complete tool chain to see it 
doesn’t break the RSB. 
Also you have to build the complete rtems Kernel 
That’s the only way you can build the test and run on the kernel

Thanks 
- Eshan

> 
> Thanks again for your help.
> 
> Sincerely,
> 
> Matt
> 
>> On Wed, Jun 16, 2021 at 10:40 PM Eshan Dhawan  
>> wrote:
>> 
>> Hi Matt,
>> Since you are making changes only to a header file you don’t need to run 
>> autoreconf.
>> You can directly apply the patch to RSB and it should work
>> You need to run autoreconf when u make changes in makefile
>> That is when u add a .c file
>> 
>>>> On 17-Jun-2021, at 1:53 AM, Matt Joyce  wrote:
>>> 
>>> ***As Requested: For Review Only. Does Not Compile***
>>> 
>>> Added definition of SIG2STR_MAX and function prototypes for sig2str
>>> and str2sig in sys/signal.h in order to improve POSIX compliance.
>>> ---
>>> newlib/libc/include/sys/signal.h | 12 
>>> 1 file changed, 12 insertions(+)
>>> 
>>> diff --git a/newlib/libc/include/sys/signal.h 
>>> b/newlib/libc/include/sys/signal.h
>>> index 45cc0366c..fd2b3c672 100644
>>> --- a/newlib/libc/include/sys/signal.h
>>> +++ b/newlib/libc/include/sys/signal.h
>>> @@ -238,6 +238,18 @@ int sigqueue (pid_t, int, const union sigval);
>>> 
>>> #endif /* __POSIX_VISIBLE >= 199309 */
>>> 
>>> +#if __GNU_VISIBLE
>>> +
>>> +/* 202x_d2-POSIX-Issue-8, p. 327 adds SIG2STR_MAX, p. 332 adds sig2str()
>>> +   and str2sig(). */
>>> +
>>> +#define SIG2STR_MAX 4294967295
>>> +
>>> +int sig2str(int, char *);
>>> +int str2sig(const char *restrict, int *restrict);
>>> +
>>> +#endif /* __GNU_VISIBLE  */
>>> +
>>> #if defined(___AM29K__)
>>> /* These all need to be defined for ANSI C, but I don't think they are
>>>   meaningful.  */
>>> --
>>> 2.31.1
>>> 
>>> ___
>>> devel mailing list
>>> devel@rtems.org
>>> http://lists.rtems.org/mailman/listinfo/devel
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH] libc: Added sig2str/str2sig prototypes

2021-06-16 Thread Eshan Dhawan
Hi Matt,
Since you are making changes only to a header file you don’t need to run 
autoreconf.
You can directly apply the patch to RSB and it should work 
You need to run autoreconf when u make changes in makefile 
That is when u add a .c file 

> On 17-Jun-2021, at 1:53 AM, Matt Joyce  wrote:
> 
> ***As Requested: For Review Only. Does Not Compile***
> 
> Added definition of SIG2STR_MAX and function prototypes for sig2str
> and str2sig in sys/signal.h in order to improve POSIX compliance.
> ---
> newlib/libc/include/sys/signal.h | 12 
> 1 file changed, 12 insertions(+)
> 
> diff --git a/newlib/libc/include/sys/signal.h 
> b/newlib/libc/include/sys/signal.h
> index 45cc0366c..fd2b3c672 100644
> --- a/newlib/libc/include/sys/signal.h
> +++ b/newlib/libc/include/sys/signal.h
> @@ -238,6 +238,18 @@ int sigqueue (pid_t, int, const union sigval);
> 
> #endif /* __POSIX_VISIBLE >= 199309 */
> 
> +#if __GNU_VISIBLE
> +
> +/* 202x_d2-POSIX-Issue-8, p. 327 adds SIG2STR_MAX, p. 332 adds sig2str()
> +   and str2sig(). */
> +
> +#define SIG2STR_MAX 4294967295
> +
> +int sig2str(int, char *);
> +int str2sig(const char *restrict, int *restrict);
> +
> +#endif /* __GNU_VISIBLE  */
> +
> #if defined(___AM29K__)
> /* These all need to be defined for ANSI C, but I don't think they are
>meaningful.  */
> -- 
> 2.31.1
> 
> ___
> devel mailing list
> devel@rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: GSOC POSIX Compliance: Stuck trying to build Newlib

2021-06-16 Thread Eshan Dhawan
Hi Matt,
> On 16-Jun-2021, at 9:27 PM, Matthew Joyce  wrote:
> 
> Hi Dr. Joel,
> 
> I tried that in newlib/libc and there were at least no errors.
> (Nothing leading me to believe it was successful either!)
> 
> However I still got the same error when I sudo make install.
> (sparc-rtems-ranlib: command not found) (among others!)
> 
I make works then there is no need to run make install it just copies the build 
binaries to the root folders.

If make is build with the changes u made and the symbols that you added appear 
in the binaries you generated.
Then congratulations :) 
Now you just need to test those changes in the RSB to test they don’t break 
anything in the RTEMS ecosystem. 
> Thanks again!
> 
> Sincerely,
> 
> Matt
> 
> 
> 
>> On Wed, Jun 16, 2021 at 3:06 PM Joel Sherrill  wrote:
>> 
>> Does adding --no-recursive and running it only from the directory you 
>> touched a build system file in help?
>> 
>> It is regenerating a lot you don't want to touch anyway.
>> 
>> --joel
>> 
>>> On Wed, Jun 16, 2021, 5:32 AM Matthew Joyce  wrote:
>>> 
>>> Hi Eshan,
>>> 
>>> Thanks very much for your follow up! Ok, I see now that if I go into
>>> development/newlib/newlib-cygwin/newlib and run autoreconf -fvi with
>>> the v2.69 using the PATH that Dr. Joel just showed, it starts to run.
>>> It always eventually exits with an error though. (please see attached
>>> .txt). I hope you can read that...I used the command "script" to
>>> output everything to a text file.
>>> 
>>> Do you have any idea where I might be going wrong?
>>> 
>>> Thank you!
>>> 
>>> Sincerely,
>>> 
>>> Matt
>>> 
>>> On Tue, Jun 15, 2021 at 8:23 PM Eshan Dhawan  
>>> wrote:
>>>> 
>>>> Hi matt
>>>> It would work if run inside newlib instead of newlib-cygwin
>>>> run command inside of ../newlib-cygwin/newlib
>>>> instead of ../newlib-cygwin
>>>> 
>>>> 
>>>> On Tue, Jun 15, 2021 at 10:59 PM Matthew Joyce  
>>>> wrote:
>>>>> 
>>>>> Ah, ok will do! Thank you for the tip.
>>>>> 
>>>>> On Tue, Jun 15, 2021 at 7:17 PM Gedare Bloom  wrote:
>>>>>> 
>>>>>> Just a note, it's more efficient to capture your terminal dump into a
>>>>>> text file and attach that, rather than put a screenshot up.
>>>>>> 
>>>>>> On Tue, Jun 15, 2021 at 11:14 AM Matthew Joyce  
>>>>>> wrote:
>>>>>>> 
>>>>>>> Hi Gentlemen,
>>>>>>> 
>>>>>>> Thanks very much for your quick replies!
>>>>>>> 
>>>>>>> I just tried both, but perhaps I'm misinterpreting your suggestions.
>>>>>>> (Could you please see the attached commands / errors!)
>>>>>>> 
>>>>>>> Eshan,
>>>>>>> 
>>>>>>> I did see that link, but it wasn't clear to me what the solution 
>>>>>>> was...Sorry!
>>>>>>> 
>>>>>>> Sincerely,
>>>>>>> 
>>>>>>> Matt
>>>>>>> 
>>>>>>> On Tue, Jun 15, 2021 at 6:52 PM Eshan Dhawan  
>>>>>>> wrote:
>>>>>>>> 
>>>>>>>> Hi Matt,
>>>>>>>> Try running the command with autoconf version 2.69 that's shipped with 
>>>>>>>> RTEMS in the rtems bin
>>>>>>>> That works as well.
>>>>>>>> 
>>>>>>>> Also From a quick google search this is what I found : 
>>>>>>>> https://superuser.com/questions/617872/cant-locate-autom4te-channeldefs-pm-in-inc-when-it-definitely-is-there
>>>>>>>> 
>>>>>>>> On Tue, Jun 15, 2021 at 9:12 PM Matthew Joyce  
>>>>>>>> wrote:
>>>>>>>>> 
>>>>>>>>> Hello Dr. Joel and Eshan,
>>>>>>>>> 
>>>>>>>>> I have a patch ready to send to Newlib for the sig function prototypes
>>>>>>>>> and STR2SIG_MAX.
>>>>>>>>> 
>>>>>>>>> But to do that, I think I need to have Newlib built, which I must
>>>>>>>>> still be doing wrong. The error that I am getting is attached below.
>>>>>>>>> 
>>>>>>>>> I’ve been trying to follow the steps here:
>>>>>>>>> https://medium.com/my-gsoc-2019-journey/apply-newlib-patch-to-rtems-source-builder-6873b0fb31b8
>>>>>>>>> and 
>>>>>>>>> https://medium.com/my-gsoc-2019-journey/build-newlib-for-sparc-and-arm-architecture-6b3287d4c6f2
>>>>>>>>> 
>>>>>>>>> I even had rebuilt everything from scratch to see if that would help,
>>>>>>>>> but I still get the same error. Maybe I cloned the newlib source into
>>>>>>>>> the wrong directory?
>>>>>>>>> 
>>>>>>>>> I was hoping to get the patch off to Newlib for review as a first step
>>>>>>>>> while I work on writing the actual methods. When you get a moment,
>>>>>>>>> could you please advise? Thank you very much!
>>>>>>>>> 
>>>>>>>>> Sincerely,
>>>>>>>>> 
>>>>>>>>> Matt
>>>>>>> ___
>>>>>>> devel mailing list
>>>>>>> devel@rtems.org
>>>>>>> http://lists.rtems.org/mailman/listinfo/devel
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: GSOC POSIX Compliance: Stuck trying to build Newlib

2021-06-15 Thread Eshan Dhawan
Hi matt
It would work if run inside newlib instead of newlib-cygwin
run command inside of ../newlib-cygwin/newlib
instead of ../newlib-cygwin


On Tue, Jun 15, 2021 at 10:59 PM Matthew Joyce 
wrote:

> Ah, ok will do! Thank you for the tip.
>
> On Tue, Jun 15, 2021 at 7:17 PM Gedare Bloom  wrote:
> >
> > Just a note, it's more efficient to capture your terminal dump into a
> > text file and attach that, rather than put a screenshot up.
> >
> > On Tue, Jun 15, 2021 at 11:14 AM Matthew Joyce 
> wrote:
> > >
> > > Hi Gentlemen,
> > >
> > > Thanks very much for your quick replies!
> > >
> > > I just tried both, but perhaps I'm misinterpreting your suggestions.
> > > (Could you please see the attached commands / errors!)
> > >
> > > Eshan,
> > >
> > > I did see that link, but it wasn't clear to me what the solution
> was...Sorry!
> > >
> > > Sincerely,
> > >
> > > Matt
> > >
> > > On Tue, Jun 15, 2021 at 6:52 PM Eshan Dhawan 
> wrote:
> > > >
> > > > Hi Matt,
> > > > Try running the command with autoconf version 2.69 that's shipped
> with RTEMS in the rtems bin
> > > > That works as well.
> > > >
> > > > Also From a quick google search this is what I found :
> https://superuser.com/questions/617872/cant-locate-autom4te-channeldefs-pm-in-inc-when-it-definitely-is-there
> > > >
> > > > On Tue, Jun 15, 2021 at 9:12 PM Matthew Joyce 
> wrote:
> > > >>
> > > >> Hello Dr. Joel and Eshan,
> > > >>
> > > >> I have a patch ready to send to Newlib for the sig function
> prototypes
> > > >> and STR2SIG_MAX.
> > > >>
> > > >> But to do that, I think I need to have Newlib built, which I must
> > > >> still be doing wrong. The error that I am getting is attached below.
> > > >>
> > > >> I’ve been trying to follow the steps here:
> > > >>
> https://medium.com/my-gsoc-2019-journey/apply-newlib-patch-to-rtems-source-builder-6873b0fb31b8
> > > >> and
> https://medium.com/my-gsoc-2019-journey/build-newlib-for-sparc-and-arm-architecture-6b3287d4c6f2
> > > >>
> > > >> I even had rebuilt everything from scratch to see if that would
> help,
> > > >> but I still get the same error. Maybe I cloned the newlib source
> into
> > > >> the wrong directory?
> > > >>
> > > >> I was hoping to get the patch off to Newlib for review as a first
> step
> > > >> while I work on writing the actual methods. When you get a moment,
> > > >> could you please advise? Thank you very much!
> > > >>
> > > >> Sincerely,
> > > >>
> > > >> Matt
> > > ___
> > > devel mailing list
> > > devel@rtems.org
> > > http://lists.rtems.org/mailman/listinfo/devel
>
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: GSOC POSIX Compliance: Stuck trying to build Newlib

2021-06-15 Thread Eshan Dhawan
Hi Matt,
Try running the command with autoconf version 2.69 that's shipped with
RTEMS in the rtems bin
That works as well.

Also From a quick google search this is what I found :
https://superuser.com/questions/617872/cant-locate-autom4te-channeldefs-pm-in-inc-when-it-definitely-is-there

On Tue, Jun 15, 2021 at 9:12 PM Matthew Joyce  wrote:

> Hello Dr. Joel and Eshan,
>
> I have a patch ready to send to Newlib for the sig function prototypes
> and STR2SIG_MAX.
>
> But to do that, I think I need to have Newlib built, which I must
> still be doing wrong. The error that I am getting is attached below.
>
> I’ve been trying to follow the steps here:
>
> https://medium.com/my-gsoc-2019-journey/apply-newlib-patch-to-rtems-source-builder-6873b0fb31b8
> and
> https://medium.com/my-gsoc-2019-journey/build-newlib-for-sparc-and-arm-architecture-6b3287d4c6f2
>
> I even had rebuilt everything from scratch to see if that would help,
> but I still get the same error. Maybe I cloned the newlib source into
> the wrong directory?
>
> I was hoping to get the patch off to Newlib for review as a first step
> while I work on writing the actual methods. When you get a moment,
> could you please advise? Thank you very much!
>
> Sincerely,
>
> Matt
>
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

GSOC Proposal : Draft 3 Packaging Programming Language for RSB

2021-04-13 Thread Eshan Dhawan
Hello Everyone,
Draft 3 of my proposal is ready.
it can be accessed through
https://docs.google.com/document/d/1J4J114C3CrCKEV2L5vgobT-mE0f2xQx2waJTrQ0tNLQ/edit?usp=sharing

I would like to request everyone to review it for any changes or flaws

Thanks
- Eshan
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Gsoc Proposal : Packaging Programming Language Draft 2

2021-04-11 Thread Eshan Dhawan
Hello Everyone,
I have tried to implement the received feedback on draft 1 into this draft.
I would like everyone to look into this and tell how the proposal can be
improved further.

Link:
https://docs.google.com/document/d/1J4J114C3CrCKEV2L5vgobT-mE0f2xQx2waJTrQ0tNLQ/edit?usp=sharing


-- 
Thanks
- Eshan
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: How to run the full RTEMS testsuite

2021-04-10 Thread Eshan Dhawan

> On 11-Apr-2021, at 1:15 AM, Ida Delphine  wrote:
> 
> 
> For some reason I get this:
> rtems-test: command not found
> I've used this command a few times and it worked. I don't know what I am 
> doing wrong now...
> Any idea what I am doing wrong?
Did you add the path to the toolchain to your $PATH variable in the terminal ? 
(This might be a reason )
Or rtems-test isn’t built for the bsp you are using try looking into 
rtems-testing repo 
> 
>> On Sat, Apr 10, 2021 at 12:43 PM Eshan Dhawan  
>> wrote:
>> Hi 
>> You can use rtems-test to run tests in a directory 
>> Eg : 
>> rtems-test --rtems-bsp=erc32-run --rtems-tools=$HOME/development/rtems/5 
>> ~/development/rtems/kernel/erc32/sparc-rtems5/c/erc32/testsuites/samples
>> Thanks 
>> Eshan 
>>> On 10-Apr-2021, at 5:01 PM, Ida Delphine  wrote:
>>> 
>>> 
>>> Hello everyone,
>>> I'm looking forward to work on automatic style checking and code formatting 
>>> for RTEMS as my GSoC project and will need to test that style changes do 
>>> not cause any implementation bugs. I will carryout this test by running the 
>>> full RTEMS testsuite. I've tried looking in the RTEMS documentation for a 
>>> detailed step by step guide on how to do this but I can't find anything 
>>> helpful. Can someone please guide me on how to achieve this? 
>>> 
>>> Cheers,
>>> Ida.
>>> ___
>>> devel mailing list
>>> devel@rtems.org
>>> http://lists.rtems.org/mailman/listinfo/devel
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: How to run the full RTEMS testsuite

2021-04-10 Thread Eshan Dhawan
Hi 
You can use rtems-test to run tests in a directory 
Eg : 
rtems-test --rtems-bsp=erc32-run --rtems-tools=$HOME/development/rtems/5 
~/development/rtems/kernel/erc32/sparc-rtems5/c/erc32/testsuites/samples
Thanks 
Eshan 
> On 10-Apr-2021, at 5:01 PM, Ida Delphine  wrote:
> 
> 
> Hello everyone,
> I'm looking forward to work on automatic style checking and code formatting 
> for RTEMS as my GSoC project and will need to test that style changes do not 
> cause any implementation bugs. I will carryout this test by running the full 
> RTEMS testsuite. I've tried looking in the RTEMS documentation for a detailed 
> step by step guide on how to do this but I can't find anything helpful. Can 
> someone please guide me on how to achieve this? 
> 
> Cheers,
> Ida.
> ___
> devel mailing list
> devel@rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Examples for LUA package project

2021-04-09 Thread Eshan Dhawan
Hello Everyone,
For My project Package programming language for RSB 
I will also be adding examples for use of language 
Some decided upon examples are
- bare Metal embedded use configuration
- A few basic examples like the “Hello World“ 
- Use of Some functions an extension to C as well  using as standalone lua 
compiler. 

Any other Examples that you all would like to see in the project ??

Thanks 
Eshan 


___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Gsoc 2021 : Packaging Lua project proposal Draft 1

2021-04-07 Thread Eshan Dhawan
Hello everyone,
I have added a link to the draft of my project Proposal on packaging
programming language for gsoc 2021.
I would Request everyone to Review it and help me improve it.
Link:
https://docs.google.com/document/d/1J4J114C3CrCKEV2L5vgobT-mE0f2xQx2waJTrQ0tNLQ/edit?usp=sharing

-- 
Thanks
- Eshan
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: How to build and run RTEMS Shell

2021-04-07 Thread Eshan Dhawan
On Sun, Apr 4, 2021 at 8:01 PM Joel Sherrill  wrote:

>
>
> On Sun, Apr 4, 2021, 4:38 AM Eshan Dhawan  wrote:
>
>> Hello Everyone,
>> How Do I build RTEMS Shell over sparc/leon3 ??
>>
>
> It is always built and the sample fileio is a good program to use it with.
>
> Any documentation or Blog I could refer to for using the Shell ??

> There are also examples in libbsd.
>

> --joel
>
>
>> --
>> Thanks
>> - Eshan
>> ___
>> devel mailing list
>> devel@rtems.org
>> http://lists.rtems.org/mailman/listinfo/devel
>
>
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

How to build and run RTEMS Shell

2021-04-04 Thread Eshan Dhawan
Hello Everyone,
How Do I build RTEMS Shell over sparc/leon3 ??

-- 
Thanks
- Eshan
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: #4328: New APIs added to POSIX Standard (2021)

2021-04-01 Thread Eshan Dhawan
Hi Matt
Here is the list of potential sources you can look into :
List of sources
-FreeBSD Source
-NetBSD Source
-JuliaMath Libm (https://github.com/JuliaMath/openlibm.git)
-ARM's optimized routines (
https://github.com/ARM-software/optimized-routines)
-Musl libc

Also Matt your google docs link is private
You need to change its permission to commenter

Thanks
- Eshan

On Thu, Apr 1, 2021 at 5:51 PM Matthew Joyce  wrote:

> Hi Dr. Joel and Dr. Gedare,
>
> I posted my draft proposal on the GSOC 2021 page
> (https://devel.rtems.org/wiki/GSoC/2021). At your convenience, I would
> be very grateful for any comments or additional guidance you might
> have.  Please note, I found implementations of some of the "clock"
> methods on glibc...does the GNU "Lesser General Public License" meet
> the intent for what RTEMS can use?
>
> Also, regarding the spawn.h group of methods, do I understand
> correctly that they've been deliberately left out?  If so, I'm curious
> if there is anything that would still need to be done there. I noticed
> in the docs that some methods relating to new processes are supported
> in an adapted fashion (such as getpid()). Just wondering if there has
> been discussion on this for spawn so I can cover the bases.
>
> Thank you very much for your time!
>
> Sincerely,
>
> Matt
>
> On Thu, Mar 25, 2021 at 2:18 PM Joel Sherrill  wrote:
> >
> >
> >
> > On Thu, Mar 25, 2021 at 7:14 AM Matthew Joyce 
> wrote:
> >>
> >> Hi Dr. Joel,
> >>
> >> Thanks very much, that's a big help!  Correct, I've been updating the
> >> spreadsheet as I go along. Ok, now I see that strlcat/strlcpy are used
> >> in rtems/cpukit and implemented in Newlib.
> >>
> >> One additional question, please: I haven't yet looked into the source
> >> of NetBSD or FreeBSD, but I do see that Newlib already implements
> >> ppoll (poll.cc), dladdr (dlfcn.cc), pselect (select.cc), and
> >> sockatmark (net.cc). None of them are defined in the rtems environment
> >> yet. Is there any reason why the NetBSD/FreeBSD version would be
> >> preferable to Newlib for these? Or is it just a matter of testing
> >> what's out there to find what works well in the rtems environment?
> >
> >
> > Without looking at the newlib git repo, I can tell you that the files
> > you cite are the implementation of those methods for Cygwin. Just
> > because they are in C++. :)
> >
> > The parts of the newlib repo RTEMS uses are under the newlib/
> > subdirectory not the cygwin one. Within that, there is a libc/sys and
> > only libc/sys/rtems is used for RTEMS. The others are for different
> > operating systems. There are a few places with "machine" directory
> > structures. Only the ones for the architecture you are building for
> > is used.
> >
> > As to why NetBSD for libdl, that is because portions of the code
> > originated there.
> >
> > And rtems-libbsd is based on FreeBSD. It is as close to the FreeBSD
> > source as we can keep it.
> >
> >>
> >>
> >> In my proposal I'll take your advice and work on some of the easier
> >> ones first in order to get the experience and process down.
> >
> >
> > There are tickets for a lot of methods. The rtems-docs repo has the
> > csv file (e.g. spreadsheet) which tracks RTEMS support against
> > various standards. The RTEMS POSIX Compliance Guide is generated
> > from that csv file. Between those, you can find other methods to ask
> > about. In general, if it is required by the Software Communications
> > Architecture (SCA) or FACE Technical Standard, then it is a method
> > someone expected to possibly be used in an embedded system.
> > SCA is a set of POSIX profiles focused on software defined radios and
> > the FACE Technical Standard was developed with avionics in mind.
> >
> > But any are fair game if they are actually implementable. I don;t think
> > the Compliance Guide says it yet, but we decided last year that
> > wordexp() is likely not supportable on RTEMS. The newlib
> > implementation assumes the presence of a shell with wildcard expansion
> > and ability to fork a process.
> >
> > --joel
> >
> >>
> >>
> >> Thank you again for your time!
> >>
> >> Matt
> >>
> >> On Wed, Mar 24, 2021 at 5:03 PM Joel Sherrill  wrote:
> >> >
> >> > Wow! Good work. There is a lot to digest here. Comments interspersed.
> >> >
> >> > I assume the spreadsheet is updated.
> >> >
> >> > On Wed, Mar 24, 2021 at 7:38 AM Matthew Joyce 
> wrote:
> >> >>
> >> >> Hi Dr. Joel,
> >> >>
> >> >> I've gone over the list a few times now and see a few categories
> shaping up:
> >> >>
> >> >> 1) Already done (In Newlib source, defined in libc.a):
> >> >> a) reallocarray
> >> >> b) qsort_r
> >> >> c) memmem
> >> >> d) strlcat / strlcpy
> >> >> d) wcslcat / wcslcpy
> >> >> *Out of this group, strlcat and strlcpy also show up in
> >> >> src/rtems/cpukit. Why is that?
> >> >
> >> >
> >> > The good news is that we support these. :)
> >> >
> >> > It looks to me that strlcat and strlcpy are used in cpukit but not
> implemented
> >> > there. Where do you think 

Re: GSoC 2021, Completed Hello

2021-04-01 Thread Eshan Dhawan
Hi Pranav,
You have to send the patch using git send-email.
Send it either to @Gedare Bloom   or @Joel Sherrill


Thanks
Eshan

On Thu, Apr 1, 2021 at 10:33 PM Pranav Dangi  wrote:

> Here's my screenshot after running the modified Hello World and the
> corresponding patch for the same! I'm currently planning on working on
> Improving Adaptation for Raspberry Pi 3/4 project, ie. the ticket #2899
> 
>
> ___
> devel mailing list
> devel@rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: #4328: New APIs added to POSIX Standard (2021)

2021-04-01 Thread Eshan Dhawan

> On 01-Apr-2021, at 6:36 PM, Gedare Bloom  wrote:
> 
> On Thu, Apr 1, 2021 at 6:21 AM Matthew Joyce  wrote:
>> 
>> Hi Dr. Joel and Dr. Gedare,
>> 
>> I posted my draft proposal on the GSOC 2021 page
>> (https://devel.rtems.org/wiki/GSoC/2021). At your convenience, I would
>> be very grateful for any comments or additional guidance you might
>> have.  Please note, I found implementations of some of the "clock"
>> methods on glibc...does the GNU "Lesser General Public License" meet
>> the intent for what RTEMS can use?
>> 
> No. LGPL has a 'relinking' requirement that is not compatible.
> 
>> Also, regarding the spawn.h group of methods, do I understand
>> correctly that they've been deliberately left out?  If so, I'm curious
>> if there is anything that would still need to be done there. I noticed
>> in the docs that some methods relating to new processes are supported
>> in an adapted fashion (such as getpid()). Just wondering if there has
>> been discussion on this for spawn so I can cover the bases.
>> 
> RTEMS provides conceptually a single-process, multi-threaded, single
> address space. So, any POSIX APIs that relate to multiple process
> management tend to be unsupportable or meaningless. Spawn falls in the
> same category as fork, it doesn't make sense to create a child process
> in a single-process environment.
We should add to the ticket for fork and spawn that it can’t be ported in RTEMS 
Environment. 
(I will add that as well although someone else wishes to do so is also free to 
do )
Since the confusion arises every year :) 
> 
>> Thank you very much for your time!
>> 
>> Sincerely,
>> 
>> Matt
>> 
>>> On Thu, Mar 25, 2021 at 2:18 PM Joel Sherrill  wrote:
>>> 
>>> 
>>> 
>>> On Thu, Mar 25, 2021 at 7:14 AM Matthew Joyce  wrote:
 
 Hi Dr. Joel,
 
 Thanks very much, that's a big help!  Correct, I've been updating the
 spreadsheet as I go along. Ok, now I see that strlcat/strlcpy are used
 in rtems/cpukit and implemented in Newlib.
 
 One additional question, please: I haven't yet looked into the source
 of NetBSD or FreeBSD, but I do see that Newlib already implements
 ppoll (poll.cc), dladdr (dlfcn.cc), pselect (select.cc), and
 sockatmark (net.cc). None of them are defined in the rtems environment
 yet. Is there any reason why the NetBSD/FreeBSD version would be
 preferable to Newlib for these? Or is it just a matter of testing
 what's out there to find what works well in the rtems environment?
>>> 
>>> 
>>> Without looking at the newlib git repo, I can tell you that the files
>>> you cite are the implementation of those methods for Cygwin. Just
>>> because they are in C++. :)
>>> 
>>> The parts of the newlib repo RTEMS uses are under the newlib/
>>> subdirectory not the cygwin one. Within that, there is a libc/sys and
>>> only libc/sys/rtems is used for RTEMS. The others are for different
>>> operating systems. There are a few places with "machine" directory
>>> structures. Only the ones for the architecture you are building for
>>> is used.
>>> 
>>> As to why NetBSD for libdl, that is because portions of the code
>>> originated there.
>>> 
>>> And rtems-libbsd is based on FreeBSD. It is as close to the FreeBSD
>>> source as we can keep it.
>>> 
 
 
 In my proposal I'll take your advice and work on some of the easier
 ones first in order to get the experience and process down.
>>> 
>>> 
>>> There are tickets for a lot of methods. The rtems-docs repo has the
>>> csv file (e.g. spreadsheet) which tracks RTEMS support against
>>> various standards. The RTEMS POSIX Compliance Guide is generated
>>> from that csv file. Between those, you can find other methods to ask
>>> about. In general, if it is required by the Software Communications
>>> Architecture (SCA) or FACE Technical Standard, then it is a method
>>> someone expected to possibly be used in an embedded system.
>>> SCA is a set of POSIX profiles focused on software defined radios and
>>> the FACE Technical Standard was developed with avionics in mind.
>>> 
>>> But any are fair game if they are actually implementable. I don;t think
>>> the Compliance Guide says it yet, but we decided last year that
>>> wordexp() is likely not supportable on RTEMS. The newlib
>>> implementation assumes the presence of a shell with wildcard expansion
>>> and ability to fork a process.
>>> 
>>> --joel
>>> 
 
 
 Thank you again for your time!
 
 Matt
 
 On Wed, Mar 24, 2021 at 5:03 PM Joel Sherrill  wrote:
> 
> Wow! Good work. There is a lot to digest here. Comments interspersed.
> 
> I assume the spreadsheet is updated.
> 
> On Wed, Mar 24, 2021 at 7:38 AM Matthew Joyce  
> wrote:
>> 
>> Hi Dr. Joel,
>> 
>> I've gone over the list a few times now and see a few categories shaping 
>> up:
>> 
>> 1) Already done (In Newlib source, defined in libc.a):
>> a) reallocarray
>> b) qsort_r
>> c) memmem

Re: #4328: New APIs added to POSIX Standard (2021)

2021-04-01 Thread Eshan Dhawan
Hi Matt, 
Glibc can’t be used due to license compatibility issues although you can see 
there code for examples 
I have a list of all the sources that you can use
The sources Joel gave handed me 
Where you can find potential candidates for porting methods 
(I will send the list when I reach home around midnight IST )
In those you can look for methods by greping :) 
Thank 
- Eshan 
> On 01-Apr-2021, at 7:38 PM, Matthew Joyce  wrote:
> 
> Dr. Gedare,
> 
> Thanks for the info! Ok, I'll make sure to take out the glibc material.
> 
> Sincerely,
> 
> Matt
> 
>> On Thu, Apr 1, 2021 at 3:06 PM Gedare Bloom  wrote:
>> 
>>> On Thu, Apr 1, 2021 at 6:21 AM Matthew Joyce  wrote:
>>> 
>>> Hi Dr. Joel and Dr. Gedare,
>>> 
>>> I posted my draft proposal on the GSOC 2021 page
>>> (https://devel.rtems.org/wiki/GSoC/2021). At your convenience, I would
>>> be very grateful for any comments or additional guidance you might
>>> have.  Please note, I found implementations of some of the "clock"
>>> methods on glibc...does the GNU "Lesser General Public License" meet
>>> the intent for what RTEMS can use?
>>> 
>> No. LGPL has a 'relinking' requirement that is not compatible.
>> 
>>> Also, regarding the spawn.h group of methods, do I understand
>>> correctly that they've been deliberately left out?  If so, I'm curious
>>> if there is anything that would still need to be done there. I noticed
>>> in the docs that some methods relating to new processes are supported
>>> in an adapted fashion (such as getpid()). Just wondering if there has
>>> been discussion on this for spawn so I can cover the bases.
>>> 
>> RTEMS provides conceptually a single-process, multi-threaded, single
>> address space. So, any POSIX APIs that relate to multiple process
>> management tend to be unsupportable or meaningless. Spawn falls in the
>> same category as fork, it doesn't make sense to create a child process
>> in a single-process environment.
>> 
>>> Thank you very much for your time!
>>> 
>>> Sincerely,
>>> 
>>> Matt
>>> 
>>> On Thu, Mar 25, 2021 at 2:18 PM Joel Sherrill  wrote:
 
 
 
 On Thu, Mar 25, 2021 at 7:14 AM Matthew Joyce  
 wrote:
> 
> Hi Dr. Joel,
> 
> Thanks very much, that's a big help!  Correct, I've been updating the
> spreadsheet as I go along. Ok, now I see that strlcat/strlcpy are used
> in rtems/cpukit and implemented in Newlib.
> 
> One additional question, please: I haven't yet looked into the source
> of NetBSD or FreeBSD, but I do see that Newlib already implements
> ppoll (poll.cc), dladdr (dlfcn.cc), pselect (select.cc), and
> sockatmark (net.cc). None of them are defined in the rtems environment
> yet. Is there any reason why the NetBSD/FreeBSD version would be
> preferable to Newlib for these? Or is it just a matter of testing
> what's out there to find what works well in the rtems environment?
 
 
 Without looking at the newlib git repo, I can tell you that the files
 you cite are the implementation of those methods for Cygwin. Just
 because they are in C++. :)
 
 The parts of the newlib repo RTEMS uses are under the newlib/
 subdirectory not the cygwin one. Within that, there is a libc/sys and
 only libc/sys/rtems is used for RTEMS. The others are for different
 operating systems. There are a few places with "machine" directory
 structures. Only the ones for the architecture you are building for
 is used.
 
 As to why NetBSD for libdl, that is because portions of the code
 originated there.
 
 And rtems-libbsd is based on FreeBSD. It is as close to the FreeBSD
 source as we can keep it.
 
> 
> 
> In my proposal I'll take your advice and work on some of the easier
> ones first in order to get the experience and process down.
 
 
 There are tickets for a lot of methods. The rtems-docs repo has the
 csv file (e.g. spreadsheet) which tracks RTEMS support against
 various standards. The RTEMS POSIX Compliance Guide is generated
 from that csv file. Between those, you can find other methods to ask
 about. In general, if it is required by the Software Communications
 Architecture (SCA) or FACE Technical Standard, then it is a method
 someone expected to possibly be used in an embedded system.
 SCA is a set of POSIX profiles focused on software defined radios and
 the FACE Technical Standard was developed with avionics in mind.
 
 But any are fair game if they are actually implementable. I don;t think
 the Compliance Guide says it yet, but we decided last year that
 wordexp() is likely not supportable on RTEMS. The newlib
 implementation assumes the presence of a shell with wildcard expansion
 and ability to fork a process.
 
 --joel
 
> 
> 
> Thank you again for your time!
> 
> Matt
> 
> On Wed, Mar 24, 2021 at 5:03 PM Joel Sherrill  wrote:
>> 
>> 

GSoC Project : Packaging Programming Language for RTEMS

2021-03-31 Thread Eshan Dhawan
Hello everyone,
For this GSoC I was planning to package programming language

- Adding an RSB recipe
- Example having at least bare-metal embedded configuration and use of
custom commands
- integrating with rtems shell
- write test script (I would have to go through that part )
and wrap all up with documentation

What would be the preferred starting programming language ?
and Is there any RSB Recipe that I an refer to as example ??
-- 
Thanks
- Eshan
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: #4328: New APIs added to POSIX Standard (2021)

2021-03-28 Thread Eshan Dhawan

> On 28-Mar-2021, at 12:17 PM, Matthew Joyce  wrote:
> 
> Hi Eshan,
> 
> Ok, great! Thank you for letting me know. By the way, where will it be
> implemented when it's patched in? Thanks again and have a great rest
> of your Sunday.
Function file : rtems/cpukit/posix 
Tests : testsuite/psxtests
Since confstr tells about the programming environments supported so it is RTEMS 
specific.

> 
> Sincerely,
> 
> Matt
> 
>> On Sun, Mar 28, 2021 at 6:54 AM Eshan Dhawan  wrote:
>> 
>> 
>>>> On 27-Mar-2021, at 1:49 AM, Matthew Joyce  wrote:
>>> 
>>> Hi Dr. Joel,
>>> 
>>> I finally built rtems-libbsd and see that pselect and sockatmark are
>>> both defined there. I went ahead and added a "In rtems-libbsd" column
>>> in the spreadsheet to reflect that.
>>> 
>>> With those two defined, it looks like the only methods from the FACE
>>> 3.0 General Purpose Profile that aren't currently supported are
>>> confstr() and the  set. Could I ask, what is the thinking on
>>> those? The man page suggests that spawn was created with embedded
>>> systems in mind, but I'd guess a conscious decision was made to leave
>>> them out? How about confstr?
>>> 
>>> Thank you!
>>> 
>>> Matt
>>> 
>> Hi Matt
>> Confstr code is ready just under styling issues.
>> So maybe you could count it as Present.
>> 
>> Thanks
>> - Eshan
>>> 
>>>> On Thu, Mar 25, 2021 at 2:18 PM Joel Sherrill  wrote:
>>>> 
>>>> 
>>>> 
>>>>> On Thu, Mar 25, 2021 at 7:14 AM Matthew Joyce  
>>>>> wrote:
>>>>> 
>>>>> Hi Dr. Joel,
>>>>> 
>>>>> Thanks very much, that's a big help!  Correct, I've been updating the
>>>>> spreadsheet as I go along. Ok, now I see that strlcat/strlcpy are used
>>>>> in rtems/cpukit and implemented in Newlib.
>>>>> 
>>>>> One additional question, please: I haven't yet looked into the source
>>>>> of NetBSD or FreeBSD, but I do see that Newlib already implements
>>>>> ppoll (poll.cc), dladdr (dlfcn.cc), pselect (select.cc), and
>>>>> sockatmark (net.cc). None of them are defined in the rtems environment
>>>>> yet. Is there any reason why the NetBSD/FreeBSD version would be
>>>>> preferable to Newlib for these? Or is it just a matter of testing
>>>>> what's out there to find what works well in the rtems environment?
>>>> 
>>>> 
>>>> Without looking at the newlib git repo, I can tell you that the files
>>>> you cite are the implementation of those methods for Cygwin. Just
>>>> because they are in C++. :)
>>>> 
>>>> The parts of the newlib repo RTEMS uses are under the newlib/
>>>> subdirectory not the cygwin one. Within that, there is a libc/sys and
>>>> only libc/sys/rtems is used for RTEMS. The others are for different
>>>> operating systems. There are a few places with "machine" directory
>>>> structures. Only the ones for the architecture you are building for
>>>> is used.
>>>> 
>>>> As to why NetBSD for libdl, that is because portions of the code
>>>> originated there.
>>>> 
>>>> And rtems-libbsd is based on FreeBSD. It is as close to the FreeBSD
>>>> source as we can keep it.
>>>> 
>>>>> 
>>>>> 
>>>>> In my proposal I'll take your advice and work on some of the easier
>>>>> ones first in order to get the experience and process down.
>>>> 
>>>> 
>>>> There are tickets for a lot of methods. The rtems-docs repo has the
>>>> csv file (e.g. spreadsheet) which tracks RTEMS support against
>>>> various standards. The RTEMS POSIX Compliance Guide is generated
>>>> from that csv file. Between those, you can find other methods to ask
>>>> about. In general, if it is required by the Software Communications
>>>> Architecture (SCA) or FACE Technical Standard, then it is a method
>>>> someone expected to possibly be used in an embedded system.
>>>> SCA is a set of POSIX profiles focused on software defined radios and
>>>> the FACE Technical Standard was developed with avionics in mind.
>>>> 
>>>> But any are fair game if they are actually implementable. I don;t think
>>>> the Compliance Guide says it yet, but we decided last yea

Re: #4328: New APIs added to POSIX Standard (2021)

2021-03-27 Thread Eshan Dhawan

> On 27-Mar-2021, at 1:49 AM, Matthew Joyce  wrote:
> 
> Hi Dr. Joel,
> 
> I finally built rtems-libbsd and see that pselect and sockatmark are
> both defined there. I went ahead and added a "In rtems-libbsd" column
> in the spreadsheet to reflect that.
> 
> With those two defined, it looks like the only methods from the FACE
> 3.0 General Purpose Profile that aren't currently supported are
> confstr() and the  set. Could I ask, what is the thinking on
> those? The man page suggests that spawn was created with embedded
> systems in mind, but I'd guess a conscious decision was made to leave
> them out? How about confstr?
> 
> Thank you!
> 
> Matt
> 
Hi Matt
Confstr code is ready just under styling issues. 
So maybe you could count it as Present. 

Thanks 
- Eshan 
> 
>> On Thu, Mar 25, 2021 at 2:18 PM Joel Sherrill  wrote:
>> 
>> 
>> 
>>> On Thu, Mar 25, 2021 at 7:14 AM Matthew Joyce  wrote:
>>> 
>>> Hi Dr. Joel,
>>> 
>>> Thanks very much, that's a big help!  Correct, I've been updating the
>>> spreadsheet as I go along. Ok, now I see that strlcat/strlcpy are used
>>> in rtems/cpukit and implemented in Newlib.
>>> 
>>> One additional question, please: I haven't yet looked into the source
>>> of NetBSD or FreeBSD, but I do see that Newlib already implements
>>> ppoll (poll.cc), dladdr (dlfcn.cc), pselect (select.cc), and
>>> sockatmark (net.cc). None of them are defined in the rtems environment
>>> yet. Is there any reason why the NetBSD/FreeBSD version would be
>>> preferable to Newlib for these? Or is it just a matter of testing
>>> what's out there to find what works well in the rtems environment?
>> 
>> 
>> Without looking at the newlib git repo, I can tell you that the files
>> you cite are the implementation of those methods for Cygwin. Just
>> because they are in C++. :)
>> 
>> The parts of the newlib repo RTEMS uses are under the newlib/
>> subdirectory not the cygwin one. Within that, there is a libc/sys and
>> only libc/sys/rtems is used for RTEMS. The others are for different
>> operating systems. There are a few places with "machine" directory
>> structures. Only the ones for the architecture you are building for
>> is used.
>> 
>> As to why NetBSD for libdl, that is because portions of the code
>> originated there.
>> 
>> And rtems-libbsd is based on FreeBSD. It is as close to the FreeBSD
>> source as we can keep it.
>> 
>>> 
>>> 
>>> In my proposal I'll take your advice and work on some of the easier
>>> ones first in order to get the experience and process down.
>> 
>> 
>> There are tickets for a lot of methods. The rtems-docs repo has the
>> csv file (e.g. spreadsheet) which tracks RTEMS support against
>> various standards. The RTEMS POSIX Compliance Guide is generated
>> from that csv file. Between those, you can find other methods to ask
>> about. In general, if it is required by the Software Communications
>> Architecture (SCA) or FACE Technical Standard, then it is a method
>> someone expected to possibly be used in an embedded system.
>> SCA is a set of POSIX profiles focused on software defined radios and
>> the FACE Technical Standard was developed with avionics in mind.
>> 
>> But any are fair game if they are actually implementable. I don;t think
>> the Compliance Guide says it yet, but we decided last year that
>> wordexp() is likely not supportable on RTEMS. The newlib
>> implementation assumes the presence of a shell with wildcard expansion
>> and ability to fork a process.
>> 
>> --joel
>> 
>>> 
>>> 
>>> Thank you again for your time!
>>> 
>>> Matt
>>> 
>>> On Wed, Mar 24, 2021 at 5:03 PM Joel Sherrill  wrote:
 
 Wow! Good work. There is a lot to digest here. Comments interspersed.
 
 I assume the spreadsheet is updated.
 
 On Wed, Mar 24, 2021 at 7:38 AM Matthew Joyce  
 wrote:
> 
> Hi Dr. Joel,
> 
> I've gone over the list a few times now and see a few categories shaping 
> up:
> 
> 1) Already done (In Newlib source, defined in libc.a):
> a) reallocarray
> b) qsort_r
> c) memmem
> d) strlcat / strlcpy
> d) wcslcat / wcslcpy
> *Out of this group, strlcat and strlcpy also show up in
> src/rtems/cpukit. Why is that?
 
 
 The good news is that we support these. :)
 
 It looks to me that strlcat and strlcpy are used in cpukit but not 
 implemented
 there. Where do you think they are implemented.
 
 This is a good example where a source code browser is helpful. grep can
 often answer the question but a source code browser can be easier. 
 Personally,
 I use cscope but that is exceedingly old school. Any modern IDE should be
 helpful.
 
> 
> 2) Not done yet (Do not show up in Newlib source or RTEMS):
> a) getlocalename_l
> b) posix_getdents
> c) sem_clockwait
> d) sig2str / str2sig
> 
> 3) Not in Newlib; Referenced in RTEMS but hidden behind #ifdef:
> a) pthread_cond_clockwait
> 

Instructions to build Micro-Python on RTEMS

2021-03-26 Thread Eshan Dhawan
Hello Everyone,
Where can I find instructions to Build MicroPython on RTEMS??

-- 
Thanks
- Eshan
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: GSoC Project : Package Micro-python

2021-03-26 Thread Eshan Dhawan
On Fri, Mar 26, 2021 at 5:46 AM Joel Sherrill  wrote:

>
>
> On Wed, Mar 24, 2021, 1:43 PM Gedare Bloom  wrote:
>
>> On Wed, Mar 24, 2021 at 11:38 AM Eshan Dhawan 
>> wrote:
>> >
>> >
>> >
>> > On Wed, Mar 24, 2021 at 12:34 AM Gedare Bloom  wrote:
>> >>
>> >> On Tue, Mar 23, 2021 at 12:16 PM Eshan Dhawan 
>> wrote:
>> >> >
>> >> >
>> >> > Apologies for the late reply.
>> >> >
>> >> > On Mon, Mar 22, 2021 at 10:27 PM Joel Sherrill 
>> wrote:
>> >> >>
>> >> >>
>> >> >>
>> >> >> On Mon, Mar 22, 2021 at 11:55 AM Gedare Bloom 
>> wrote:
>> >> >>>
>> >> >>> On Mon, Mar 22, 2021 at 10:50 AM Joel Sherrill 
>> wrote:
>> >> >>> >
>> >> >>> >
>> >> >>> >
>> >> >>> > On Mon, Mar 22, 2021 at 11:30 AM Gedare Bloom 
>> wrote:
>> >> >>> >>
>> >> >>> >> On Sat, Mar 20, 2021 at 12:33 PM Eshan Dhawan <
>> eshandhawa...@gmail.com> wrote:
>> >> >>> >> >
>> >> >>> >> > Hello Everyone,
>> >> >>> >> > I wanted to take Packaging Micro Python up as GSOC project
>> this summer and the project will also include packaging LUA and picoC
>> >> >>> >> > The ticket for Micro Python  :
>> https://devel.rtems.org/ticket/4349
>> >> >>> >> > What would be the complete Scope of the project?
>> >> >>> >> > And what would be a good starting point?
>> >> >>> >> >
>> >> >>> >>
>> >> >>> >> Well, I guess Joel must have described the task, so I'll leave
>> it to
>> >> >>> >> him to fill in some more details.
>> >> >>> >>
>> >> >>> >> Adding RSB packages may be not sufficient coding work for GSoC.
>> It is
>> >> >>> >> important in the proposal to identify what would be the coding
>> >> >>> >> activities involved in this project. For example, we know from
>> >> >>> >> experience that Lua can just be built from some minor tailoring
>> of its
>> >> >>> >> Makefile, so the package is very straightforward. However, the
>> >> >>> >> projects you mention are scripting environments, so maybe
>> creating a
>> >> >>> >> framework in RTEMS for a "shell/intepreter" that can be built
>> as an
>> >> >>> >> add-on by RSB would be a proper way to scope this effort
>> >> >
>> >> > Packaging might not be a lot of coding part but adding its
>> documentation and its example would be a very iterative and time consuming
>> process.
>> >>
>> >> Remember that code is what counts, while we expect the other stuff to
>> >> come along too, you don't want to be doing 90% doco and 10% code. Just
>> >> keep it in mind.
>> >
>> > What would be a good inclusion to this project ?
>> > I was thinking long double support since I worked on porting POSIX
>> functions I might find it easier.
>> > But it might interfere with matt's project if I understand that project
>> correctly.
>>
>> Right, please don't include that. You'll want to think/talk through
>> (with Joel, maybe) what could be good code contributions. If the RSB
>> packaging is fairly minimal, then creating a suite of examples might
>> be one way to increase the SLOC contributions. I also think there is
>> merit to the idea of creating a "plug-in" way to add shells to RTEMS.
>> Maybe even refactoring our current shell out to a add-on package then.
>> Just a thought.
>>
>
> I'd rather see two languages with good packaging, examples for RTEMS use
> cases, and documentation. It's a fair project.
>
> If you get through those, we can find another language. TCL probably. I
> don't expect Forth or  LISP to be high on the list. Lol
>
We can figure that out while framing the proposal time management section.
That how many languages can be packaged.
Currently, the scope of the project is to be determined so I can start with
the Proposal.

>
>> >>
>> >>
>> >> >>>
>> >> >>> >
>> >> >>> >
&g

Re: GSoC Project : Package Micro-python

2021-03-24 Thread Eshan Dhawan
On Wed, Mar 24, 2021 at 12:34 AM Gedare Bloom  wrote:

> On Tue, Mar 23, 2021 at 12:16 PM Eshan Dhawan 
> wrote:
> >
> >
> > Apologies for the late reply.
> >
> > On Mon, Mar 22, 2021 at 10:27 PM Joel Sherrill  wrote:
> >>
> >>
> >>
> >> On Mon, Mar 22, 2021 at 11:55 AM Gedare Bloom  wrote:
> >>>
> >>> On Mon, Mar 22, 2021 at 10:50 AM Joel Sherrill  wrote:
> >>> >
> >>> >
> >>> >
> >>> > On Mon, Mar 22, 2021 at 11:30 AM Gedare Bloom 
> wrote:
> >>> >>
> >>> >> On Sat, Mar 20, 2021 at 12:33 PM Eshan Dhawan <
> eshandhawa...@gmail.com> wrote:
> >>> >> >
> >>> >> > Hello Everyone,
> >>> >> > I wanted to take Packaging Micro Python up as GSOC project this
> summer and the project will also include packaging LUA and picoC
> >>> >> > The ticket for Micro Python  :
> https://devel.rtems.org/ticket/4349
> >>> >> > What would be the complete Scope of the project?
> >>> >> > And what would be a good starting point?
> >>> >> >
> >>> >>
> >>> >> Well, I guess Joel must have described the task, so I'll leave it to
> >>> >> him to fill in some more details.
> >>> >>
> >>> >> Adding RSB packages may be not sufficient coding work for GSoC. It
> is
> >>> >> important in the proposal to identify what would be the coding
> >>> >> activities involved in this project. For example, we know from
> >>> >> experience that Lua can just be built from some minor tailoring of
> its
> >>> >> Makefile, so the package is very straightforward. However, the
> >>> >> projects you mention are scripting environments, so maybe creating a
> >>> >> framework in RTEMS for a "shell/intepreter" that can be built as an
> >>> >> add-on by RSB would be a proper way to scope this effort
> >
> > Packaging might not be a lot of coding part but adding its documentation
> and its example would be a very iterative and time consuming process.
>
> Remember that code is what counts, while we expect the other stuff to
> come along too, you don't want to be doing 90% doco and 10% code. Just
> keep it in mind.
>
What would be a good inclusion to this project ?
I was thinking long double support since I worked on porting POSIX
functions I might find it easier.
But it might interfere with matt's project if I understand that project
correctly.

>
> >>>
> >>> >
> >>> >
> >>> > I agree that Lua and Micropython should build easy but I had more
> >>> > in mind.
> >>> >
> >>> > The full project was language stacks for RTEMS with a better user
> >>> > experience for Micropython, Lua, Tcl, etc although I am not sure what
> >>> > etc would entail. I am not sure all three can be completed in the new
> >>> > GSoC timeframe. All would follow the same pattern:
> >
> > Etc can be managed while framing the proposal according to how time is
> being managed.
> >>>
> >>> >
> >>> > + RSB package offering a reasonable default and access to
> configuration
> >>> > + Examples including at least bare embedded, use of custom commands,
> >>> > and integrating with RTEMS shell commands Perhaps  interactive use
> with
> >>> > command line history and editing integrated if we have that as a
> library now.
> >>> > + Documentation specific to RTEMS and the examples
> >>> >
> >>> > I imagined completely parallel kits for each embedded language we
> wanted
> >>> > to support.
> >>> >
> >>> > Does that help? Should he plan on Micropython and Lua?
> >>> >
> >>>
> >>> Sure. Lua should be easy way to get started and develop the
> >>> framework/infrastructure side in Phase 1. Phase 2 could be extension
> >>> to micropython / other scripting languages.
> >
> > Since all the languages will have a similar pattern complex work can be
> put in phase 2.
> > From my past experience, it is the part when most work is done :)
>
> True, but for repeat students, we do expect a bit more acceleration in
> the first phase. Usually, we want to see code merged in phase 1 by
> repeat students. Just a reminder that the bar is higher :)
>
:)

>
> 

Re: GSoC Project : Package Micro-python

2021-03-23 Thread Eshan Dhawan
Apologies for the late reply.

On Mon, Mar 22, 2021 at 10:27 PM Joel Sherrill  wrote:

>
>
> On Mon, Mar 22, 2021 at 11:55 AM Gedare Bloom  wrote:
>
>> On Mon, Mar 22, 2021 at 10:50 AM Joel Sherrill  wrote:
>> >
>> >
>> >
>> > On Mon, Mar 22, 2021 at 11:30 AM Gedare Bloom  wrote:
>> >>
>> >> On Sat, Mar 20, 2021 at 12:33 PM Eshan Dhawan 
>> wrote:
>> >> >
>> >> > Hello Everyone,
>> >> > I wanted to take Packaging Micro Python up as GSOC project this
>> summer and the project will also include packaging LUA and picoC
>> >> > The ticket for Micro Python  : https://devel.rtems.org/ticket/4349
>> >> > What would be the complete Scope of the project?
>> >> > And what would be a good starting point?
>> >> >
>> >>
>> >> Well, I guess Joel must have described the task, so I'll leave it to
>> >> him to fill in some more details.
>> >>
>> >> Adding RSB packages may be not sufficient coding work for GSoC. It is
>> >> important in the proposal to identify what would be the coding
>> >> activities involved in this project. For example, we know from
>> >> experience that Lua can just be built from some minor tailoring of its
>> >> Makefile, so the package is very straightforward. However, the
>> >> projects you mention are scripting environments, so maybe creating a
>> >> framework in RTEMS for a "shell/intepreter" that can be built as an
>> >> add-on by RSB would be a proper way to scope this effort
>>
> Packaging might not be a lot of coding part but adding its documentation
and its example would be a very iterative and time consuming process.

> >
>> >
>> > I agree that Lua and Micropython should build easy but I had more
>> > in mind.
>> >
>> > The full project was language stacks for RTEMS with a better user
>> > experience for Micropython, Lua, Tcl, etc although I am not sure what
>> > etc would entail. I am not sure all three can be completed in the new
>> > GSoC timeframe. All would follow the same pattern:
>>
> Etc can be managed while framing the proposal according to how time is
being managed.

> >
>> > + RSB package offering a reasonable default and access to configuration
>> > + Examples including at least bare embedded, use of custom commands,
>> > and integrating with RTEMS shell commands Perhaps  interactive use with
>> > command line history and editing integrated if we have that as a
>> library now.
>> > + Documentation specific to RTEMS and the examples
>> >
>> > I imagined completely parallel kits for each embedded language we wanted
>> > to support.
>> >
>> > Does that help? Should he plan on Micropython and Lua?
>> >
>>
>> Sure. Lua should be easy way to get started and develop the
>> framework/infrastructure side in Phase 1. Phase 2 could be extension
>> to micropython / other scripting languages.
>>
> Since all the languages will have a similar pattern complex work can be
put in phase 2.
>From my past experience, it is the part when most work is done :)

>
> OK.
>
>>
>> I'm not sure about the RSB design of things, and whether they should
>> be parallel or capable of integration. Would anyone want to use
>> multiple interpreters in the same application? If so, they should
>> build together to avoid conflicts. If not, parallel is fine.
>>
> building them can be set to build flags,
but there still needs to be a way if we want to build the package other
than the default way.
(any ideas on how to do that )

>
> I don't see any reason on our side why that shouldn't work but we
> can't guarantee they don't have symbol conflicts. And I'm not sure
> it would make much sense to integrate both at the same time.
>
> I'd think you could install both but we'd focus on only using one
> at a time.
>
> --joel
>
>>
>> > --joel
>> >
>> >>
>> >> > Thanks
>> >> > - Eshan
>> >> > ___
>> >> > devel mailing list
>> >> > devel@rtems.org
>> >> > http://lists.rtems.org/mailman/listinfo/devel
>> >> ___
>> >> devel mailing list
>> >> devel@rtems.org
>> >> http://lists.rtems.org/mailman/listinfo/devel
>>
>
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

GSoC Project : Package Micro-python

2021-03-20 Thread Eshan Dhawan
Hello Everyone,
I wanted to take Packaging Micro Python up as GSOC project this summer and
the project will also include packaging LUA and picoC
The ticket for Micro Python  : https://devel.rtems.org/ticket/4349
What would be the complete Scope of the project?
And what would be a good starting point?

Thanks
- Eshan
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

RTEMS Servers offline (maybe)

2021-03-20 Thread Eshan Dhawan
Hello Everyone,
Devel site is offline and returns error 503

-- 

Thanks
- Eshan
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: GSoC Introduction, completed getting started guide.

2021-03-12 Thread Eshan Dhawan
Hi daman,
You have to send the patch using git send-email. To any of the maintainers.

- Eshan 
> On 13-Mar-2021, at 11:20 AM, Daman Bir Singh  
> wrote:
> 
> 
> Hello everyone, 
> 
> I am Daman from Bits Pilani, K K Birla Campus Goa, India. I am very 
> interested in working with your organization for GSoC 2021. I have followed 
> the GSoC Getting Started Guide  and was successfully able to build and change 
> the 'hello' test case.(screenshots and patch attached). 
> It would be a great help if you could guide me how to proceed further.
> 
> Thanks & Regards, 
> Daman Bir Singh
> <0001-GSoC-initial-Work-Proof.patch>
> 
> 
> ___
> devel mailing list
> devel@rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: sifive risc-v hifive unleashed bsp (qemu)

2021-02-13 Thread Eshan Dhawan

> On 13-Feb-2021, at 1:53 PM, Sanskar Khandelwal  wrote:
> 
> 
> 
> 
>> On Sat, Feb 13, 2021 at 9:30 AM Joel Sherrill  wrote:
>> 
>> 
>>> On Fri, Feb 12, 2021, 8:47 PM Rohan kumar  wrote:
>>> I will look into this in more detail and get back to you but in mean time I 
>>> want to contribute to any issues so can you suggest any thats need to be 
>>> solved or how do I look for from my own.
>> 
>> 
>> Projects or just smaller issues?
> 
> Actually I am looking for some small issues related to this project so I can 
> get some experience.
> before the project, I think this help me write better proposal and understand 
> codebase more easily and faster. 
> 
> Also can you tell me status of the below tickets and are they open for 
> participation? Actually I haven't decided project right now i am just 
> learning about them so I can make better decision like which project suits me 
> better according to may skills and experience level.
> 
> But I am looking for project related to risc-v, I found this very interesting 
> that's why I am asking for any issue related to this.
> 
>  #3337 : RISC-V Port in Supervisor Mode
>  #4182 : Port Rust to RTEMS
> 
> Also can share some reference links so i can start, I have build the 
> riscv/rv64imac on my laptop but i dont know how do i simulate it on qemu.
Hello sanskar 
I use this to run test suites 
Although I am not quite sure if you were wanting this or something else 
qemu-system-riscv32 -no-reboot -nographic -machine virt -m 256M -kernel 
hello.exe
- - Eshan 
> 
> thanks
> sanskar
> 
> 
>> 
>> There is a tag in the ticketing system for small projects but this query 
>> makes me wonder if some should be closed. Deciding a ticket is dead is good. 
>> :)
>> 
>> 
>> https://devel.rtems.org/query?status=accepted=assigned=new=reopened=~Small=id=summary=status=owner=type=priority=milestone=priority
>> 
>> Looking at Coverity is a quick way to find a small task. Some tickets geared 
>> to adding a test aren't bad.
>> 
>> --joel
>>> 
>>> Thanks 
>>> Sanskar
>>> 
>>> 
 On Fri, Feb 12, 2021, 3:01 PM Hesham Almatary 
  wrote:
 On Fri, 12 Feb 2021 at 11:24, Sanskar Khandelwal  
 wrote:
 >
 > Hello joel,
 >
 > 1. #4162 : sifive risc-v hifive unleashed bsp (qemu)
 > As you mentioned this a good project i thought to search more about this 
 > project I learned a lot while doing so but I still don't understand what 
 > is the goal of this project (the description on the ticket is not very 
 > detailed ) also I don't have any idea on how to make approach for this 
 > project right now so if you can clear both my doubt it will be big help.
 >
 You'd need to identify the devices for this platform that QEMU
 supports (e.g., networking, UART, flash, etc?) and propose some
 timeline to implement (a subset of) them. That would be part of your
 proposal evaluation.
 
 > Also as you mention that this can be a big task for a gsoc time frame I 
 > am thinking that I can do some of it after gsoc too.
 >
 > Also I looked for some more open projects and found these interesting so 
 > I wanted to know if these are open for participation for gsoc and what's 
 > their status and what further enhancement you are looking at each of 
 > them.
 >
 > 2. #3337 : RISC-V Port in Supervisor Mode
 > 3. #4182 : Port Rust to RTEMS
 >
 > Another thing is that while I am learning more about these projects I 
 > want to contribute, so if you can tell me about any issue that I can 
 > work on, it will be nice. I think this will help get me more familiar 
 > with rtems too.
 >
 > Thanks
 > Sanskar
 > ___
 > devel mailing list
 > devel@rtems.org
 > http://lists.rtems.org/mailman/listinfo/devel
 ___
 devel mailing list
 devel@rtems.org
 http://lists.rtems.org/mailman/listinfo/devel
>>> ___
>>> devel mailing list
>>> devel@rtems.org
>>> http://lists.rtems.org/mailman/listinfo/devel
>> ___
>> devel mailing list
>> devel@rtems.org
>> http://lists.rtems.org/mailman/listinfo/devel
> ___
> devel mailing list
> devel@rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: Question regarding RSB and open projects

2021-02-10 Thread Eshan Dhawan
On Thu, Feb 11, 2021 at 12:26 AM Ayushman Mishra 
wrote:

> I tested the environment ./source-builder/sb-check , it gave this
> result: RTEMS Source Builder - Check, 6 (61dcadee0825)
> Environment is ok
> When I used ../source-builder/sb-set-builder
> --prefix=/home/ayush/quickstart1/rtems/6 --target=sparc-rtems6
> --with-rtems-bsp=erc32 --with-rtems-tests=yes 6/rtems-sparc , it
> started rebuilding and installing rtems-sparc tool suite ( just like
> it did with this ../source-builder/sb-set-builder
> --prefix=$HOME/quick-start/rtems/5 5/rtems-sparc , and took same
> amount of time to complete the process) but no erc32 bsp was installed
> ( bsp test said error: no executables supplied) , and using
> 6/rtems-kernel instead of 6/rtems-sparc it gives same Build error (pax
> is missing) , right now rsb is only working properly for rtems5 and
> not rtems6 on my system.
>
RSB builds the tools required to build rtems
erc32 is a sparc BSP
for building a BSP
follow this :
https://docs.rtems.org/branches/master/user/installation/kernel.html

>
> On Wed, Feb 10, 2021 at 11:44 AM Eshan Dhawan 
> wrote:
> >
> >
> >
> > On Wed, Feb 10, 2021 at 10:36 AM Ayushman Mishra <
> ayushvidush...@gmail.com> wrote:
> >>
> >> Thanks for the help Eshan but actually I have already performed this
> >> step (sudo apt-get build-dep build-essential gcc-defaults g++ gdb git
> >> \
> >> unzip pax bison flex texinfo unzip python3-dev libpython-dev \
> >> libncurses5-dev zlib1g-dev) , here since my system was not able to
> >> find libpython-dev (Unable to find a source package for libpython-dev
> >> ) so i used libpython2.7-dev , I tried with both python2-dev and
> python3-dev
> >> (
> >>  sudo apt-get build-dep build-essential gcc-defaults g++ gdb git \
> >> unzip pax bison flex texinfo unzip python2-dev libpython2.7-dev \
> >> libncurses5-dev zlib1g-dev
> >> Reading package lists... Done
> >> Picking 'gcc-defaults' as source package instead of 'g++'
> >> Picking 'python-defaults' as source package instead of 'python2-dev'
> >> Picking 'python2.7' as source package instead of 'libpython2.7-dev'
> >> Picking 'ncurses' as source package instead of 'libncurses5-dev'
> >> Picking 'zlib' as source package instead of 'zlib1g-dev'
> >> Reading package lists... Done
> >> Building dependency tree
> >> Reading state information... Done
> >> 0 upgraded, 0 newly installed, 0 to remove and 184 not upgraded.
> >> ) ,
> >
> > did you test the environment
> >
> > ./source-builder/sb-check
> >>
> >> but then also same Build FAILED error comes up (configure: error: pax
> >> is missing) . Also I wanted to know does the rsb in rtems6 uses
> >> autoconf-based build system , since there is no configure file made
> >> and used.
> >
> > Also, try using
> >
> > ../source-builder/sb-set-builder
> --prefix=/home/ayush/quickstart1/rtems/6 --target=sparc-rtems6
> --with-rtems-bsp=erc32 --with-rtems-tests=yes 6/rtems-sparc
> >
> >>
> >> On Wed, Feb 10, 2021 at 1:04 AM Eshan Dhawan 
> wrote:
> >> >
> >> > Hi ayushman
> >> > It looks you didn't install all the dependencies required
> >> > check this :
> https://docs.rtems.org/branches/master/user/hosts/posix.html#linux
> >> >
> >> > On Wed, Feb 10, 2021 at 12:58 AM Ayushman Mishra <
> ayushvidush...@gmail.com> wrote:
> >> >>
> >> >> Ayusman Mishra
> >> >> 1. I was going through ticket #4145
> >> >> (https://devel.rtems.org/ticket/4145) and tried building bsp on
> rtems6
> >> >> and rtems5 both using rsb
> >> >> (
> https://docs.rtems.org/branches/master/user/start/bsp-build.html#rsb-bsp-build
> )
> >> >> but got Build FAILED (it says pax is missing (configure: error: pax
> is
> >> >> missing.), I have attached full error report txt file). However I did
> >> >> build bsp erc32 and pc386 using rsb on rtems5 (first .bootstrap -c
> >> >> sb-bootstrap then used configure file
> >> >> ($HOME/development/rtems/rtems-5/configure --target=i386-rtems5
> >> >> --enable-rtemsbsp=pc386 )) on rtems6 there is no sb-bootstrap file or
> >> >> configure file present/made.
> >> >> I wanted to know is there anyway of using RSB on rtems6.
> >> >> Also while building different bsp toolsets for rtems (erc32/pc386) I
> >> >> used rtems on 2 differe

Re: Question regarding RSB and open projects

2021-02-09 Thread Eshan Dhawan
On Wed, Feb 10, 2021 at 10:36 AM Ayushman Mishra 
wrote:

> Thanks for the help Eshan but actually I have already performed this
> step (sudo apt-get build-dep build-essential gcc-defaults g++ gdb git
> \
> unzip pax bison flex texinfo unzip python3-dev libpython-dev \
> libncurses5-dev zlib1g-dev) , here since my system was not able to
> find libpython-dev (Unable to find a source package for libpython-dev
> ) so i used libpython2.7-dev , I tried with both python2-dev and
> python3-dev
> (
>  sudo apt-get build-dep build-essential gcc-defaults g++ gdb git \
> unzip pax bison flex texinfo unzip python2-dev libpython2.7-dev \
> libncurses5-dev zlib1g-dev
> Reading package lists... Done
> Picking 'gcc-defaults' as source package instead of 'g++'
> Picking 'python-defaults' as source package instead of 'python2-dev'
> Picking 'python2.7' as source package instead of 'libpython2.7-dev'
> Picking 'ncurses' as source package instead of 'libncurses5-dev'
> Picking 'zlib' as source package instead of 'zlib1g-dev'
> Reading package lists... Done
> Building dependency tree
> Reading state information... Done
> 0 upgraded, 0 newly installed, 0 to remove and 184 not upgraded.
> ) ,
>
did you test the environment

./source-builder/sb-check

but then also same Build FAILED error comes up (configure: error: pax
> is missing) . Also I wanted to know does the rsb in rtems6 uses
> autoconf-based build system , since there is no configure file made
> and used.
>
Also, try using

../source-builder/sb-set-builder
--prefix=/home/ayush/quickstart1/rtems/6 --target=sparc-rtems6
--with-rtems-bsp=erc32 --with-rtems-tests=yes 6/rtems-sparc


> On Wed, Feb 10, 2021 at 1:04 AM Eshan Dhawan 
> wrote:
> >
> > Hi ayushman
> > It looks you didn't install all the dependencies required
> > check this :
> https://docs.rtems.org/branches/master/user/hosts/posix.html#linux
> >
> > On Wed, Feb 10, 2021 at 12:58 AM Ayushman Mishra <
> ayushvidush...@gmail.com> wrote:
> >>
> >> Ayusman Mishra
> >> 1. I was going through ticket #4145
> >> (https://devel.rtems.org/ticket/4145) and tried building bsp on rtems6
> >> and rtems5 both using rsb
> >> (
> https://docs.rtems.org/branches/master/user/start/bsp-build.html#rsb-bsp-build
> )
> >> but got Build FAILED (it says pax is missing (configure: error: pax is
> >> missing.), I have attached full error report txt file). However I did
> >> build bsp erc32 and pc386 using rsb on rtems5 (first .bootstrap -c
> >> sb-bootstrap then used configure file
> >> ($HOME/development/rtems/rtems-5/configure --target=i386-rtems5
> >> --enable-rtemsbsp=pc386 )) on rtems6 there is no sb-bootstrap file or
> >> configure file present/made.
> >> I wanted to know is there anyway of using RSB on rtems6.
> >> Also while building different bsp toolsets for rtems (erc32/pc386) I
> >> used rtems on 2 different directories , Is there any way of building
> >> different BSPs on same rtems?
> >>
> >> 2. I went through list of open projects and found projects related to
> >> testing and development of ecosystem quite interesting,
> >> #3710 https://devel.rtems.org/ticket/3710
> >> #3860 https://devel.rtems.org/ticket/3860
> >> #3892 https://devel.rtems.org/ticket/3892
> >> I would be very grateful to know if any of the above projects is open
> >> for participation and if yes then work done/needed to be done in it.
> >> ___
> >> devel mailing list
> >> devel@rtems.org
> >> http://lists.rtems.org/mailman/listinfo/devel
> >
> >
> >
> > --
> > Thanks
> > - Eshan
>
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: Question regarding RSB and open projects

2021-02-09 Thread Eshan Dhawan
Hi ayushman
It looks you didn't install all the dependencies required
check this :
https://docs.rtems.org/branches/master/user/hosts/posix.html#linux

On Wed, Feb 10, 2021 at 12:58 AM Ayushman Mishra 
wrote:

> Ayusman Mishra
> 1. I was going through ticket #4145
> (https://devel.rtems.org/ticket/4145) and tried building bsp on rtems6
> and rtems5 both using rsb
> (
> https://docs.rtems.org/branches/master/user/start/bsp-build.html#rsb-bsp-build
> )
> but got Build FAILED (it says pax is missing (configure: error: pax is
> missing.), I have attached full error report txt file). However I did
> build bsp erc32 and pc386 using rsb on rtems5 (first .bootstrap -c
> sb-bootstrap then used configure file
> ($HOME/development/rtems/rtems-5/configure --target=i386-rtems5
> --enable-rtemsbsp=pc386 )) on rtems6 there is no sb-bootstrap file or
> configure file present/made.
> I wanted to know is there anyway of using RSB on rtems6.
> Also while building different bsp toolsets for rtems (erc32/pc386) I
> used rtems on 2 different directories , Is there any way of building
> different BSPs on same rtems?
>
> 2. I went through list of open projects and found projects related to
> testing and development of ecosystem quite interesting,
> #3710 https://devel.rtems.org/ticket/3710
> #3860 https://devel.rtems.org/ticket/3860
> #3892 https://devel.rtems.org/ticket/3892
> I would be very grateful to know if any of the above projects is open
> for participation and if yes then work done/needed to be done in it.
> ___
> devel mailing list
> devel@rtems.org
> http://lists.rtems.org/mailman/listinfo/devel



-- 
Thanks
- Eshan
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH v2] Test suite for FTW.H methods

2021-02-09 Thread Eshan Dhawan
ping !!


On Thu, Feb 4, 2021 at 3:04 AM Eshan Dhawan  wrote:

> From: Eshan dhawan 
>
> Signed-off-by: Eshan Dhawan 
> ---
>  spec/build/testsuites/psxtests/grp.yml  |   2 +
>  spec/build/testsuites/psxtests/psxftw01.yml |  34 
>  testsuites/psxtests/Makefile.am |  26 +++
>  testsuites/psxtests/configure.ac|   1 +
>  testsuites/psxtests/psxftw01/init.c | 204 
>  testsuites/psxtests/psxftw01/psxftw01.doc   |  18 ++
>  testsuites/psxtests/psxftw01/psxftw01.scn   |  10 +
>  testsuites/psxtests/psxftw01/psxftw01.tar   | Bin 0 -> 3584 bytes
>  8 files changed, 295 insertions(+)
>  create mode 100644 spec/build/testsuites/psxtests/psxftw01.yml
>  create mode 100644 testsuites/psxtests/psxftw01/init.c
>  create mode 100644 testsuites/psxtests/psxftw01/psxftw01.doc
>  create mode 100644 testsuites/psxtests/psxftw01/psxftw01.scn
>  create mode 100644 testsuites/psxtests/psxftw01/psxftw01.tar
>
> diff --git a/spec/build/testsuites/psxtests/grp.yml
> b/spec/build/testsuites/psxtests/grp.yml
> index 47dedac275..fb7ce465ae 100644
> --- a/spec/build/testsuites/psxtests/grp.yml
> +++ b/spec/build/testsuites/psxtests/grp.yml
> @@ -109,6 +109,8 @@ links:
>uid: psxfile02
>  - role: build-dependency
>uid: psxfilelock01
> +- role: build-dependency
> +  uid: psxftw01
>  - role: build-dependency
>uid: psxgetattrnp01
>  - role: build-dependency
> diff --git a/spec/build/testsuites/psxtests/psxftw01.yml
> b/spec/build/testsuites/psxtests/psxftw01.yml
> new file mode 100644
> index 00..c8b2a4fb59
> --- /dev/null
> +++ b/spec/build/testsuites/psxtests/psxftw01.yml
> @@ -0,0 +1,34 @@
> +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
> +build-type: script
> +cflags: []
> +copyrights:
> +- Copyright (C) 2020 Eshan Dhawan
> +cppflags: []
> +do-build: |
> +  path = "testsuites/psxtests/psxftw01/"
> +  tar = path + "psxftw01.tar"
> +  tar_gz = self.gzip(bld, tar)
> +  tar_xz = self.xz(bld, tar)
> +  tar_c, tar_h = self.bin2c(bld, tar)
> +  tar_gz_c, tar_gz_h = self.bin2c(bld, tar_gz)
> +  tar_xz_c, tar_xz_h = self.bin2c(bld, tar_xz)
> +  objs = []
> +  objs.append(self.cc(bld, bic, tar_c))
> +  objs.append(self.cc(bld, bic, tar_gz_c))
> +  objs.append(self.cc(bld, bic, tar_xz_c))
> +  objs.append(self.cc(bld, bic, path + "init.c", deps=[tar_h, tar_gz_h,
> tar_xz_h], cppflags=bld.env.TEST_psxftw01_CPPFLAGS))
> +  objs.append(self.cc(bld, bic,
> "testsuites/psxtests/psxfile01/test_cat.c", target=path + "test_cat.o"))
> +  self.link_cc(bld, bic, objs, "testsuites/psxtests/psxftw01.exe")
> +do-configure: null
> +enabled-by: true
> +includes:
> +- testsuites/psxtests/psxftw01
> +ldflags: []
> +links: []
> +prepare-build: null
> +prepare-configure: null
> +stlib: []
> +type: build
> +use-after:
> +- z
> +use-before: []
> diff --git a/testsuites/psxtests/Makefile.am
> b/testsuites/psxtests/Makefile.am
> index d89bcd8801..a35f00b665 100755
> --- a/testsuites/psxtests/Makefile.am
> +++ b/testsuites/psxtests/Makefile.am
> @@ -453,6 +453,32 @@ psxfilelock01_CPPFLAGS = $(AM_CPPFLAGS)
> $(TEST_FLAGS_psxfilelock01) \
> $(support_includes)
>  endif
>
> +if TEST_psxftw01
> +psx_tests += psxftw01
> +psx_screens += psxftw01/psxftw01.scn
> +psx_docs += psxftw01/psxftw01.doc
> +psxftw01_SOURCES = psxftw01/init.c psxfile01/test_cat.c \
> +   psxftw01-tar.c psxftw01-tar.h psxftw01-tar-gz.c psxftw01-tar-gz.h
> +
> +psxftw01_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_FLAGS_psxftw01) \
> +   $(support_includes) $(test_includes) -I$(top_srcdir)/include
> +psxftw01_LDADD = $(RTEMS_ROOT)cpukit/librtemscpu.a
> $(RTEMS_ROOT)cpukit/libz.a $(LDADD)
> +psxftw01-tar.c: psxftw01/psxftw01.tar
> +   $(AM_V_GEN)$(BIN2C) -C $< $@
> +psxftw01-tar.h: psxftw01/psxftw01.tar
> +   $(AM_V_GEN)$(BIN2C) -H $< $@
> +psxftw01-tar.o: psxftw01-tar.c psxftw01-tar.h
> +psxftw01.tar.gz: psxftw01/psxftw01.tar
> +   $(AM_V_GEN)$(GZIP) < $< > $@
> +psxftw01-tar-gz.c: psxftw01.tar.gz
> +   $(AM_V_GEN)$(BIN2C) -C $< $@
> +psxftw01-tar-gz.h: psxftw01.tar.gz
> +   $(AM_V_GEN)$(BIN2C) -H $< $@
> +CLEANFILES += psxftw01.tar psxftw01-tar.c psxftw01-tar.h \
> +   psxftw01.tar.gz psxftw01-tar-gz.c psxftw01-tar-gz.h
> +psxftw01/init.c: psxftw01-tar.h psxftw01-tar-gz.h $(TAR01_XZ_H)
> +endif
> +
>  if TEST_psxgetattrnp01
>  psx_tests += psxgetattrnp01
>  psx_screens += psxgetattrnp01/psxgetattrnp01.scn
> diff --git a/testsuites/psxtests/configure.ac b/testsuites/psxtests/
> configure.ac
> index 139787cccb..3f95010cd3 100644
> --- a/testsuites/psxtests

[PATCH v8] Confstr support for RTEMS

2021-02-08 Thread Eshan Dhawan
From: Eshan dhawan 

Closes #3373

Signed-off-by: Eshan Dhawan 
---
 cpukit/Makefile.am|   1 +
 cpukit/posix/src/confstr.c| 151 ++
 spec/build/cpukit/librtemscpu.yml |   1 +
 spec/build/testsuites/psxtests/grp.yml|   2 +
 spec/build/testsuites/psxtests/psxconfstr.yml |  20 +++
 testsuites/psxtests/Makefile.am   |   9 ++
 testsuites/psxtests/configure.ac  |   1 +
 testsuites/psxtests/psxconfstr/init.c |  97 +++
 testsuites/psxtests/psxconfstr/psxconfstr.doc |  17 ++
 testsuites/psxtests/psxconfstr/psxconfstr.scn |   4 +
 10 files changed, 303 insertions(+)
 create mode 100644 cpukit/posix/src/confstr.c
 create mode 100644 spec/build/testsuites/psxtests/psxconfstr.yml
 create mode 100644 testsuites/psxtests/psxconfstr/init.c
 create mode 100644 testsuites/psxtests/psxconfstr/psxconfstr.doc
 create mode 100644 testsuites/psxtests/psxconfstr/psxconfstr.scn

diff --git a/cpukit/Makefile.am b/cpukit/Makefile.am
index 565aa66ce1..469754ab84 100644
--- a/cpukit/Makefile.am
+++ b/cpukit/Makefile.am
@@ -511,6 +511,7 @@ librtemscpu_a_SOURCES += posix/src/condsignalsupp.c
 librtemscpu_a_SOURCES += posix/src/condtimedwait.c
 librtemscpu_a_SOURCES += posix/src/condwait.c
 librtemscpu_a_SOURCES += posix/src/condwaitsupp.c
+librtemscpu_a_SOURCES += posix/src/confstr.c
 librtemscpu_a_SOURCES += posix/src/_execve.c
 librtemscpu_a_SOURCES += posix/src/fork.c
 librtemscpu_a_SOURCES += posix/src/key.c
diff --git a/cpukit/posix/src/confstr.c b/cpukit/posix/src/confstr.c
new file mode 100644
index 00..5f18f78096
--- /dev/null
+++ b/cpukit/posix/src/confstr.c
@@ -0,0 +1,151 @@
+/*-
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
+ * Copyright (c) 1993
+ * The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ *may be used to endorse or promote products derived from this software
+ *without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include 
+/* Reduced to make sense in RTEMS */ 
+__SCCSID("@(#)confstr.c8.1 (Berkeley) 6/4/93");
+__FBSDID("$FreeBSD$");
+
+#include 
+
+#include 
+#include 
+#include 
+#include 
+
+/* Many programming environment flags have same values 
+* this block is added to raise error if the flags value change
+*/
+
+#if (_CS_POSIX_V6_ILP32_OFF32_CFLAGS != _CS_POSIX_V7_ILP32_OFF32_CFLAGS)
+#error "_CS_POSIX_V6_ILP32_OFF32_CFLAGS and _CS_POSIX_V7_ILP32_OFF32_CFLAGS 
flag values not equal"
+#endif
+
+#if (_CS_POSIX_V6_ILP32_OFF32_LDFLAGS != _CS_POSIX_V7_ILP32_OFF32_LDFLAGS)
+#error "_CS_POSIX_V6_ILP32_OFF32_LDFLAGS and _CS_POSIX_V7_ILP32_OFF32_LDFLAGS 
flag values not equal"
+#endif
+
+#if (_CS_POSIX_V6_ILP32_OFF32_LIBS!= _CS_POSIX_V7_ILP32_OFF32_LIBS)
+#error "_CS_POSIX_V6_ILP32_OFF32_LIBS and _CS_POSIX_V7_ILP32_OFF32_LIBS flag 
values not equal"
+#endif
+
+#if (_CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS != _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS)
+#error "_CS_POSIX_V6_LPBIG_OFFBIG_CFLAG and _CS_POSIX_V7_LPBIG_OFFBIG_CFLAG 
flag values not equal"
+#endif
+
+#if (_CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS != _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS)
+#error "_CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS and 
_CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS flag values not equal"
+#endif
+
+#if (_CS_POSIX_V7_LPBIG_OFFBIG_LIBS != _CS_POSIX_V7_LPBIG_OFFBIG_LIBS)
+#error "_CS_POSIX_V6_LPBIG_OFFBIG_LIBS and _CS_POSIX_V7_LPBIG_OFFBIG_LIBS flag 
values not equal"
+#endif
+
+#if (_CS_POSIX_V6_ILP32_OFFBIG_CFLAGS != _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS)
+#error "_CS_POSIX_V6_ILP

[PATCH v7] Confstr support for RTEMS

2021-02-08 Thread Eshan Dhawan
From: Eshan dhawan 

Closes #3373

Signed-off-by: Eshan Dhawan 
---
 cpukit/Makefile.am|   1 +
 cpukit/posix/src/confstr.c| 151 ++
 spec/build/cpukit/librtemscpu.yml |   1 +
 spec/build/testsuites/psxtests/grp.yml|   2 +
 spec/build/testsuites/psxtests/psxconfstr.yml |  20 +++
 testsuites/psxtests/Makefile.am   |   9 ++
 testsuites/psxtests/configure.ac  |   1 +
 testsuites/psxtests/psxconfstr/init.c | 129 +++
 testsuites/psxtests/psxconfstr/psxconfstr.doc |  17 ++
 testsuites/psxtests/psxconfstr/psxconfstr.scn |   4 +
 10 files changed, 335 insertions(+)
 create mode 100644 cpukit/posix/src/confstr.c
 create mode 100644 spec/build/testsuites/psxtests/psxconfstr.yml
 create mode 100644 testsuites/psxtests/psxconfstr/init.c
 create mode 100644 testsuites/psxtests/psxconfstr/psxconfstr.doc
 create mode 100644 testsuites/psxtests/psxconfstr/psxconfstr.scn

diff --git a/cpukit/Makefile.am b/cpukit/Makefile.am
index 565aa66ce1..469754ab84 100644
--- a/cpukit/Makefile.am
+++ b/cpukit/Makefile.am
@@ -511,6 +511,7 @@ librtemscpu_a_SOURCES += posix/src/condsignalsupp.c
 librtemscpu_a_SOURCES += posix/src/condtimedwait.c
 librtemscpu_a_SOURCES += posix/src/condwait.c
 librtemscpu_a_SOURCES += posix/src/condwaitsupp.c
+librtemscpu_a_SOURCES += posix/src/confstr.c
 librtemscpu_a_SOURCES += posix/src/_execve.c
 librtemscpu_a_SOURCES += posix/src/fork.c
 librtemscpu_a_SOURCES += posix/src/key.c
diff --git a/cpukit/posix/src/confstr.c b/cpukit/posix/src/confstr.c
new file mode 100644
index 00..5f18f78096
--- /dev/null
+++ b/cpukit/posix/src/confstr.c
@@ -0,0 +1,151 @@
+/*-
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
+ * Copyright (c) 1993
+ * The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ *may be used to endorse or promote products derived from this software
+ *without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include 
+/* Reduced to make sense in RTEMS */ 
+__SCCSID("@(#)confstr.c8.1 (Berkeley) 6/4/93");
+__FBSDID("$FreeBSD$");
+
+#include 
+
+#include 
+#include 
+#include 
+#include 
+
+/* Many programming environment flags have same values 
+* this block is added to raise error if the flags value change
+*/
+
+#if (_CS_POSIX_V6_ILP32_OFF32_CFLAGS != _CS_POSIX_V7_ILP32_OFF32_CFLAGS)
+#error "_CS_POSIX_V6_ILP32_OFF32_CFLAGS and _CS_POSIX_V7_ILP32_OFF32_CFLAGS 
flag values not equal"
+#endif
+
+#if (_CS_POSIX_V6_ILP32_OFF32_LDFLAGS != _CS_POSIX_V7_ILP32_OFF32_LDFLAGS)
+#error "_CS_POSIX_V6_ILP32_OFF32_LDFLAGS and _CS_POSIX_V7_ILP32_OFF32_LDFLAGS 
flag values not equal"
+#endif
+
+#if (_CS_POSIX_V6_ILP32_OFF32_LIBS!= _CS_POSIX_V7_ILP32_OFF32_LIBS)
+#error "_CS_POSIX_V6_ILP32_OFF32_LIBS and _CS_POSIX_V7_ILP32_OFF32_LIBS flag 
values not equal"
+#endif
+
+#if (_CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS != _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS)
+#error "_CS_POSIX_V6_LPBIG_OFFBIG_CFLAG and _CS_POSIX_V7_LPBIG_OFFBIG_CFLAG 
flag values not equal"
+#endif
+
+#if (_CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS != _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS)
+#error "_CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS and 
_CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS flag values not equal"
+#endif
+
+#if (_CS_POSIX_V7_LPBIG_OFFBIG_LIBS != _CS_POSIX_V7_LPBIG_OFFBIG_LIBS)
+#error "_CS_POSIX_V6_LPBIG_OFFBIG_LIBS and _CS_POSIX_V7_LPBIG_OFFBIG_LIBS flag 
values not equal"
+#endif
+
+#if (_CS_POSIX_V6_ILP32_OFFBIG_CFLAGS != _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS)
+#error "_CS_POS

[PATCH v6] Confstr support for RTEMS

2021-02-08 Thread Eshan Dhawan
From: Eshan dhawan 

Signed-off-by: Eshan Dhawan 
---
 cpukit/Makefile.am|   1 +
 cpukit/posix/src/confstr.c| 151 ++
 spec/build/cpukit/librtemscpu.yml |   1 +
 spec/build/testsuites/psxtests/grp.yml|   2 +
 spec/build/testsuites/psxtests/psxconfstr.yml |  20 +++
 testsuites/psxtests/Makefile.am   |   9 ++
 testsuites/psxtests/configure.ac  |   1 +
 testsuites/psxtests/psxconfstr/init.c | 143 +
 testsuites/psxtests/psxconfstr/psxconfstr.doc |  17 ++
 testsuites/psxtests/psxconfstr/psxconfstr.scn |   4 +
 10 files changed, 349 insertions(+)
 create mode 100644 cpukit/posix/src/confstr.c
 create mode 100644 spec/build/testsuites/psxtests/psxconfstr.yml
 create mode 100644 testsuites/psxtests/psxconfstr/init.c
 create mode 100644 testsuites/psxtests/psxconfstr/psxconfstr.doc
 create mode 100644 testsuites/psxtests/psxconfstr/psxconfstr.scn

diff --git a/cpukit/Makefile.am b/cpukit/Makefile.am
index 565aa66ce1..469754ab84 100644
--- a/cpukit/Makefile.am
+++ b/cpukit/Makefile.am
@@ -511,6 +511,7 @@ librtemscpu_a_SOURCES += posix/src/condsignalsupp.c
 librtemscpu_a_SOURCES += posix/src/condtimedwait.c
 librtemscpu_a_SOURCES += posix/src/condwait.c
 librtemscpu_a_SOURCES += posix/src/condwaitsupp.c
+librtemscpu_a_SOURCES += posix/src/confstr.c
 librtemscpu_a_SOURCES += posix/src/_execve.c
 librtemscpu_a_SOURCES += posix/src/fork.c
 librtemscpu_a_SOURCES += posix/src/key.c
diff --git a/cpukit/posix/src/confstr.c b/cpukit/posix/src/confstr.c
new file mode 100644
index 00..5f18f78096
--- /dev/null
+++ b/cpukit/posix/src/confstr.c
@@ -0,0 +1,151 @@
+/*-
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
+ * Copyright (c) 1993
+ * The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ *may be used to endorse or promote products derived from this software
+ *without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include 
+/* Reduced to make sense in RTEMS */ 
+__SCCSID("@(#)confstr.c8.1 (Berkeley) 6/4/93");
+__FBSDID("$FreeBSD$");
+
+#include 
+
+#include 
+#include 
+#include 
+#include 
+
+/* Many programming environment flags have same values 
+* this block is added to raise error if the flags value change
+*/
+
+#if (_CS_POSIX_V6_ILP32_OFF32_CFLAGS != _CS_POSIX_V7_ILP32_OFF32_CFLAGS)
+#error "_CS_POSIX_V6_ILP32_OFF32_CFLAGS and _CS_POSIX_V7_ILP32_OFF32_CFLAGS 
flag values not equal"
+#endif
+
+#if (_CS_POSIX_V6_ILP32_OFF32_LDFLAGS != _CS_POSIX_V7_ILP32_OFF32_LDFLAGS)
+#error "_CS_POSIX_V6_ILP32_OFF32_LDFLAGS and _CS_POSIX_V7_ILP32_OFF32_LDFLAGS 
flag values not equal"
+#endif
+
+#if (_CS_POSIX_V6_ILP32_OFF32_LIBS!= _CS_POSIX_V7_ILP32_OFF32_LIBS)
+#error "_CS_POSIX_V6_ILP32_OFF32_LIBS and _CS_POSIX_V7_ILP32_OFF32_LIBS flag 
values not equal"
+#endif
+
+#if (_CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS != _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS)
+#error "_CS_POSIX_V6_LPBIG_OFFBIG_CFLAG and _CS_POSIX_V7_LPBIG_OFFBIG_CFLAG 
flag values not equal"
+#endif
+
+#if (_CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS != _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS)
+#error "_CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS and 
_CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS flag values not equal"
+#endif
+
+#if (_CS_POSIX_V7_LPBIG_OFFBIG_LIBS != _CS_POSIX_V7_LPBIG_OFFBIG_LIBS)
+#error "_CS_POSIX_V6_LPBIG_OFFBIG_LIBS and _CS_POSIX_V7_LPBIG_OFFBIG_LIBS flag 
values not equal"
+#endif
+
+#if (_CS_POSIX_V6_ILP32_OFFBIG_CFLAGS != _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS)
+#error "_CS_POSIX_V6_ILP

Re: [PATCH v5] Confstr support for RTEMS

2021-02-05 Thread Eshan Dhawan
On Fri, Feb 5, 2021 at 7:41 PM Joel Sherrill  wrote:

>
>
> On Wed, Feb 3, 2021 at 3:46 PM Eshan Dhawan 
> wrote:
>
>> From: Eshan dhawan 
>>
>> Signed-off-by: Eshan Dhawan 
>> ---
>>  cpukit/Makefile.am|   1 +
>>  cpukit/posix/src/confstr.c| 103 +
>>  spec/build/cpukit/librtemscpu.yml |   1 +
>>  spec/build/testsuites/psxtests/grp.yml|   2 +
>>  spec/build/testsuites/psxtests/psxconfstr.yml |  20 +++
>>  testsuites/psxtests/Makefile.am   |   9 ++
>>  testsuites/psxtests/configure.ac  |   1 +
>>  testsuites/psxtests/psxconfstr/init.c | 143 ++
>>  testsuites/psxtests/psxconfstr/psxconfstr.doc |  17 +++
>>  testsuites/psxtests/psxconfstr/psxconfstr.scn |   4 +
>>  10 files changed, 301 insertions(+)
>>  create mode 100644 cpukit/posix/src/confstr.c
>>  create mode 100644 spec/build/testsuites/psxtests/psxconfstr.yml
>>  create mode 100644 testsuites/psxtests/psxconfstr/init.c
>>  create mode 100644 testsuites/psxtests/psxconfstr/psxconfstr.doc
>>  create mode 100644 testsuites/psxtests/psxconfstr/psxconfstr.scn
>>
>> diff --git a/cpukit/Makefile.am b/cpukit/Makefile.am
>> index 565aa66ce1..469754ab84 100644
>> --- a/cpukit/Makefile.am
>> +++ b/cpukit/Makefile.am
>> @@ -511,6 +511,7 @@ librtemscpu_a_SOURCES += posix/src/condsignalsupp.c
>>  librtemscpu_a_SOURCES += posix/src/condtimedwait.c
>>  librtemscpu_a_SOURCES += posix/src/condwait.c
>>  librtemscpu_a_SOURCES += posix/src/condwaitsupp.c
>> +librtemscpu_a_SOURCES += posix/src/confstr.c
>>  librtemscpu_a_SOURCES += posix/src/_execve.c
>>  librtemscpu_a_SOURCES += posix/src/fork.c
>>  librtemscpu_a_SOURCES += posix/src/key.c
>> diff --git a/cpukit/posix/src/confstr.c b/cpukit/posix/src/confstr.c
>> new file mode 100644
>> index 00..337c4f471d
>> --- /dev/null
>> +++ b/cpukit/posix/src/confstr.c
>> @@ -0,0 +1,103 @@
>> +/*-
>> + * SPDX-License-Identifier: BSD-3-Clause
>> + *
>> + * Copyright (c) 1993
>> + * The Regents of the University of California.  All rights reserved.
>> + *
>> + * Redistribution and use in source and binary forms, with or without
>> + * modification, are permitted provided that the following conditions
>> + * are met:
>> + * 1. Redistributions of source code must retain the above copyright
>> + *notice, this list of conditions and the following disclaimer.
>> + * 2. Redistributions in binary form must reproduce the above copyright
>> + *notice, this list of conditions and the following disclaimer in the
>> + *documentation and/or other materials provided with the
>> distribution.
>> + * 3. Neither the name of the University nor the names of its
>> contributors
>> + *may be used to endorse or promote products derived from this
>> software
>> + *without specific prior written permission.
>> + *
>> + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS''
>> AND
>> + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
>> + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
>> PURPOSE
>> + * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE
>> LIABLE
>> + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
>> CONSEQUENTIAL
>> + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
>> GOODS
>> + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
>> + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
>> STRICT
>> + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
>> WAY
>> + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
>> + * SUCH DAMAGE.
>> + */
>> +
>> +#include 
>> +/* Reduced to make sense in RTEMS */
>
>
>
>> +__SCCSID("@(#)confstr.c8.1 (Berkeley) 6/4/93");
>> +__FBSDID("$FreeBSD$");
>>
>
> I don't recall if we comment these out or have macros which turn them to
> nothing.
>
>> +
>> +#include 
>> +
>> +#include 
>> +#include 
>> +#include 
>> +#include 
>>
>
> You may not need limits.h. Check.
>
>
>> +
>> +/* Many programming environment flags have same values
>> +* this block is added to raise error if the flags value change
>> +*/
>> +
>> +#if (_CS_V6_ENV != _CS_V7_ENV)
>> +#error "_CS_V6_XXX and _CS_V7_XXX

Re: [PATCH v2] Test suite for FTW.H methods

2021-02-05 Thread Eshan Dhawan
On Fri, Feb 5, 2021 at 7:31 PM Joel Sherrill  wrote:

> Does the waf support actually build psxftw01.tar or is that a constant
> magic file?
> I might have missed it but I didn't see any logic to create it.
>
Its the constant magic file modified from libtests/tar01

>
> Other than that, I don't have any issues.
>
> --joel
>
> On Wed, Feb 3, 2021 at 3:34 PM Eshan Dhawan 
> wrote:
>
>> From: Eshan dhawan 
>>
>> Signed-off-by: Eshan Dhawan 
>> ---
>>  spec/build/testsuites/psxtests/grp.yml  |   2 +
>>  spec/build/testsuites/psxtests/psxftw01.yml |  34 
>>  testsuites/psxtests/Makefile.am |  26 +++
>>  testsuites/psxtests/configure.ac|   1 +
>>  testsuites/psxtests/psxftw01/init.c | 204 
>>  testsuites/psxtests/psxftw01/psxftw01.doc   |  18 ++
>>  testsuites/psxtests/psxftw01/psxftw01.scn   |  10 +
>>  testsuites/psxtests/psxftw01/psxftw01.tar   | Bin 0 -> 3584 bytes
>>  8 files changed, 295 insertions(+)
>>  create mode 100644 spec/build/testsuites/psxtests/psxftw01.yml
>>  create mode 100644 testsuites/psxtests/psxftw01/init.c
>>  create mode 100644 testsuites/psxtests/psxftw01/psxftw01.doc
>>  create mode 100644 testsuites/psxtests/psxftw01/psxftw01.scn
>>  create mode 100644 testsuites/psxtests/psxftw01/psxftw01.tar
>>
>> diff --git a/spec/build/testsuites/psxtests/grp.yml
>> b/spec/build/testsuites/psxtests/grp.yml
>> index 47dedac275..fb7ce465ae 100644
>> --- a/spec/build/testsuites/psxtests/grp.yml
>> +++ b/spec/build/testsuites/psxtests/grp.yml
>> @@ -109,6 +109,8 @@ links:
>>uid: psxfile02
>>  - role: build-dependency
>>uid: psxfilelock01
>> +- role: build-dependency
>> +  uid: psxftw01
>>  - role: build-dependency
>>uid: psxgetattrnp01
>>  - role: build-dependency
>> diff --git a/spec/build/testsuites/psxtests/psxftw01.yml
>> b/spec/build/testsuites/psxtests/psxftw01.yml
>> new file mode 100644
>> index 00..c8b2a4fb59
>> --- /dev/null
>> +++ b/spec/build/testsuites/psxtests/psxftw01.yml
>> @@ -0,0 +1,34 @@
>> +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
>> +build-type: script
>> +cflags: []
>> +copyrights:
>> +- Copyright (C) 2020 Eshan Dhawan
>> +cppflags: []
>> +do-build: |
>> +  path = "testsuites/psxtests/psxftw01/"
>> +  tar = path + "psxftw01.tar"
>> +  tar_gz = self.gzip(bld, tar)
>> +  tar_xz = self.xz(bld, tar)
>> +  tar_c, tar_h = self.bin2c(bld, tar)
>> +  tar_gz_c, tar_gz_h = self.bin2c(bld, tar_gz)
>> +  tar_xz_c, tar_xz_h = self.bin2c(bld, tar_xz)
>> +  objs = []
>> +  objs.append(self.cc(bld, bic, tar_c))
>> +  objs.append(self.cc(bld, bic, tar_gz_c))
>> +  objs.append(self.cc(bld, bic, tar_xz_c))
>> +  objs.append(self.cc(bld, bic, path + "init.c", deps=[tar_h, tar_gz_h,
>> tar_xz_h], cppflags=bld.env.TEST_psxftw01_CPPFLAGS))
>> +  objs.append(self.cc(bld, bic,
>> "testsuites/psxtests/psxfile01/test_cat.c", target=path + "test_cat.o"))
>> +  self.link_cc(bld, bic, objs, "testsuites/psxtests/psxftw01.exe")
>> +do-configure: null
>> +enabled-by: true
>> +includes:
>> +- testsuites/psxtests/psxftw01
>> +ldflags: []
>> +links: []
>> +prepare-build: null
>> +prepare-configure: null
>> +stlib: []
>> +type: build
>> +use-after:
>> +- z
>> +use-before: []
>> diff --git a/testsuites/psxtests/Makefile.am
>> b/testsuites/psxtests/Makefile.am
>> index d89bcd8801..a35f00b665 100755
>> --- a/testsuites/psxtests/Makefile.am
>> +++ b/testsuites/psxtests/Makefile.am
>> @@ -453,6 +453,32 @@ psxfilelock01_CPPFLAGS = $(AM_CPPFLAGS)
>> $(TEST_FLAGS_psxfilelock01) \
>> $(support_includes)
>>  endif
>>
>> +if TEST_psxftw01
>> +psx_tests += psxftw01
>> +psx_screens += psxftw01/psxftw01.scn
>> +psx_docs += psxftw01/psxftw01.doc
>> +psxftw01_SOURCES = psxftw01/init.c psxfile01/test_cat.c \
>> +   psxftw01-tar.c psxftw01-tar.h psxftw01-tar-gz.c psxftw01-tar-gz.h
>> +
>> +psxftw01_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_FLAGS_psxftw01) \
>> +   $(support_includes) $(test_includes) -I$(top_srcdir)/include
>> +psxftw01_LDADD = $(RTEMS_ROOT)cpukit/librtemscpu.a
>> $(RTEMS_ROOT)cpukit/libz.a $(LDADD)
>> +psxftw01-tar.c: psxftw01/psxftw01.tar
>> +   $(AM_V_GEN)$(BIN2C) -C $< $@
>> +psxftw01-tar.h: psxftw01/psxftw01.tar
>> +   $(AM_V_GEN)$(BIN2C) -H $< $@
>> +psxftw01-tar.o: psxftw01-tar.c psxftw01-tar.h

[PATCH v5] Confstr support for RTEMS

2021-02-03 Thread Eshan Dhawan
From: Eshan dhawan 

Signed-off-by: Eshan Dhawan 
---
 cpukit/Makefile.am|   1 +
 cpukit/posix/src/confstr.c| 103 +
 spec/build/cpukit/librtemscpu.yml |   1 +
 spec/build/testsuites/psxtests/grp.yml|   2 +
 spec/build/testsuites/psxtests/psxconfstr.yml |  20 +++
 testsuites/psxtests/Makefile.am   |   9 ++
 testsuites/psxtests/configure.ac  |   1 +
 testsuites/psxtests/psxconfstr/init.c | 143 ++
 testsuites/psxtests/psxconfstr/psxconfstr.doc |  17 +++
 testsuites/psxtests/psxconfstr/psxconfstr.scn |   4 +
 10 files changed, 301 insertions(+)
 create mode 100644 cpukit/posix/src/confstr.c
 create mode 100644 spec/build/testsuites/psxtests/psxconfstr.yml
 create mode 100644 testsuites/psxtests/psxconfstr/init.c
 create mode 100644 testsuites/psxtests/psxconfstr/psxconfstr.doc
 create mode 100644 testsuites/psxtests/psxconfstr/psxconfstr.scn

diff --git a/cpukit/Makefile.am b/cpukit/Makefile.am
index 565aa66ce1..469754ab84 100644
--- a/cpukit/Makefile.am
+++ b/cpukit/Makefile.am
@@ -511,6 +511,7 @@ librtemscpu_a_SOURCES += posix/src/condsignalsupp.c
 librtemscpu_a_SOURCES += posix/src/condtimedwait.c
 librtemscpu_a_SOURCES += posix/src/condwait.c
 librtemscpu_a_SOURCES += posix/src/condwaitsupp.c
+librtemscpu_a_SOURCES += posix/src/confstr.c
 librtemscpu_a_SOURCES += posix/src/_execve.c
 librtemscpu_a_SOURCES += posix/src/fork.c
 librtemscpu_a_SOURCES += posix/src/key.c
diff --git a/cpukit/posix/src/confstr.c b/cpukit/posix/src/confstr.c
new file mode 100644
index 00..337c4f471d
--- /dev/null
+++ b/cpukit/posix/src/confstr.c
@@ -0,0 +1,103 @@
+/*-
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
+ * Copyright (c) 1993
+ * The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ *may be used to endorse or promote products derived from this software
+ *without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include 
+/* Reduced to make sense in RTEMS */ 
+__SCCSID("@(#)confstr.c8.1 (Berkeley) 6/4/93");
+__FBSDID("$FreeBSD$");
+
+#include 
+
+#include 
+#include 
+#include 
+#include 
+
+/* Many programming environment flags have same values 
+* this block is added to raise error if the flags value change
+*/
+
+#if (_CS_V6_ENV != _CS_V7_ENV)
+#error "_CS_V6_XXX and _CS_V7_XXX flag values not equal"
+#endif
+
+size_t
+confstr(int name, char *buf, size_t len)
+{
+  const char *p;
+  const char UPE[] = "unsupported programming environment";
+
+  switch (name) {
+
+case _CS_PATH:
+  errno = EINVAL;
+  return (0);
+
+/*
+ * POSIX/SUS ``Programming Environments'' stuff
+ *
+ * We don't support more than one programming environment
+ * on any platform (yet), so we just return the empty
+ * string for the environment we are compiled for,
+ * and the string "unsupported programming environment"
+ * for anything else.  (The Standard says that if these
+ * values are used on a system which does not support
+ * this environment -- determined via sysconf() -- then
+ * the value we return is unspecified.  So, we return
+ * something which will cause obvious breakage.)
+ */
+
+case _CS_POSIX_V6_ILP32_OFF32_CFLAGS:
+case _CS_POSIX_V6_ILP32_OFF32_LDFLAGS:
+case _CS_POSIX_V6_ILP32_OFF32_LIBS:
+case _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS:
+case _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS:
+case _CS_POSIX_V6_LPBIG_OFFBIG_LIBS:
+case _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS:
+case _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS:
+

[PATCH v2] Test suite for FTW.H methods

2021-02-03 Thread Eshan Dhawan
From: Eshan dhawan 

Signed-off-by: Eshan Dhawan 
---
 spec/build/testsuites/psxtests/grp.yml  |   2 +
 spec/build/testsuites/psxtests/psxftw01.yml |  34 
 testsuites/psxtests/Makefile.am |  26 +++
 testsuites/psxtests/configure.ac|   1 +
 testsuites/psxtests/psxftw01/init.c | 204 
 testsuites/psxtests/psxftw01/psxftw01.doc   |  18 ++
 testsuites/psxtests/psxftw01/psxftw01.scn   |  10 +
 testsuites/psxtests/psxftw01/psxftw01.tar   | Bin 0 -> 3584 bytes
 8 files changed, 295 insertions(+)
 create mode 100644 spec/build/testsuites/psxtests/psxftw01.yml
 create mode 100644 testsuites/psxtests/psxftw01/init.c
 create mode 100644 testsuites/psxtests/psxftw01/psxftw01.doc
 create mode 100644 testsuites/psxtests/psxftw01/psxftw01.scn
 create mode 100644 testsuites/psxtests/psxftw01/psxftw01.tar

diff --git a/spec/build/testsuites/psxtests/grp.yml 
b/spec/build/testsuites/psxtests/grp.yml
index 47dedac275..fb7ce465ae 100644
--- a/spec/build/testsuites/psxtests/grp.yml
+++ b/spec/build/testsuites/psxtests/grp.yml
@@ -109,6 +109,8 @@ links:
   uid: psxfile02
 - role: build-dependency
   uid: psxfilelock01
+- role: build-dependency
+  uid: psxftw01
 - role: build-dependency
   uid: psxgetattrnp01
 - role: build-dependency
diff --git a/spec/build/testsuites/psxtests/psxftw01.yml 
b/spec/build/testsuites/psxtests/psxftw01.yml
new file mode 100644
index 00..c8b2a4fb59
--- /dev/null
+++ b/spec/build/testsuites/psxtests/psxftw01.yml
@@ -0,0 +1,34 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+build-type: script
+cflags: []
+copyrights:
+- Copyright (C) 2020 Eshan Dhawan
+cppflags: []
+do-build: |
+  path = "testsuites/psxtests/psxftw01/"
+  tar = path + "psxftw01.tar"
+  tar_gz = self.gzip(bld, tar)
+  tar_xz = self.xz(bld, tar)
+  tar_c, tar_h = self.bin2c(bld, tar)
+  tar_gz_c, tar_gz_h = self.bin2c(bld, tar_gz)
+  tar_xz_c, tar_xz_h = self.bin2c(bld, tar_xz)
+  objs = []
+  objs.append(self.cc(bld, bic, tar_c))
+  objs.append(self.cc(bld, bic, tar_gz_c))
+  objs.append(self.cc(bld, bic, tar_xz_c))
+  objs.append(self.cc(bld, bic, path + "init.c", deps=[tar_h, tar_gz_h, 
tar_xz_h], cppflags=bld.env.TEST_psxftw01_CPPFLAGS))
+  objs.append(self.cc(bld, bic, "testsuites/psxtests/psxfile01/test_cat.c", 
target=path + "test_cat.o"))
+  self.link_cc(bld, bic, objs, "testsuites/psxtests/psxftw01.exe")
+do-configure: null
+enabled-by: true
+includes:
+- testsuites/psxtests/psxftw01
+ldflags: []
+links: []
+prepare-build: null
+prepare-configure: null
+stlib: []
+type: build
+use-after:
+- z
+use-before: []
diff --git a/testsuites/psxtests/Makefile.am b/testsuites/psxtests/Makefile.am
index d89bcd8801..a35f00b665 100755
--- a/testsuites/psxtests/Makefile.am
+++ b/testsuites/psxtests/Makefile.am
@@ -453,6 +453,32 @@ psxfilelock01_CPPFLAGS = $(AM_CPPFLAGS) 
$(TEST_FLAGS_psxfilelock01) \
$(support_includes)
 endif
 
+if TEST_psxftw01
+psx_tests += psxftw01
+psx_screens += psxftw01/psxftw01.scn
+psx_docs += psxftw01/psxftw01.doc
+psxftw01_SOURCES = psxftw01/init.c psxfile01/test_cat.c \
+   psxftw01-tar.c psxftw01-tar.h psxftw01-tar-gz.c psxftw01-tar-gz.h
+
+psxftw01_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_FLAGS_psxftw01) \
+   $(support_includes) $(test_includes) -I$(top_srcdir)/include
+psxftw01_LDADD = $(RTEMS_ROOT)cpukit/librtemscpu.a $(RTEMS_ROOT)cpukit/libz.a 
$(LDADD)
+psxftw01-tar.c: psxftw01/psxftw01.tar
+   $(AM_V_GEN)$(BIN2C) -C $< $@
+psxftw01-tar.h: psxftw01/psxftw01.tar
+   $(AM_V_GEN)$(BIN2C) -H $< $@
+psxftw01-tar.o: psxftw01-tar.c psxftw01-tar.h
+psxftw01.tar.gz: psxftw01/psxftw01.tar
+   $(AM_V_GEN)$(GZIP) < $< > $@
+psxftw01-tar-gz.c: psxftw01.tar.gz
+   $(AM_V_GEN)$(BIN2C) -C $< $@
+psxftw01-tar-gz.h: psxftw01.tar.gz
+   $(AM_V_GEN)$(BIN2C) -H $< $@
+CLEANFILES += psxftw01.tar psxftw01-tar.c psxftw01-tar.h \
+   psxftw01.tar.gz psxftw01-tar-gz.c psxftw01-tar-gz.h
+psxftw01/init.c: psxftw01-tar.h psxftw01-tar-gz.h $(TAR01_XZ_H)
+endif
+
 if TEST_psxgetattrnp01
 psx_tests += psxgetattrnp01
 psx_screens += psxgetattrnp01/psxgetattrnp01.scn
diff --git a/testsuites/psxtests/configure.ac b/testsuites/psxtests/configure.ac
index 139787cccb..3f95010cd3 100644
--- a/testsuites/psxtests/configure.ac
+++ b/testsuites/psxtests/configure.ac
@@ -90,6 +90,7 @@ RTEMS_TEST_CHECK([psxfenv01])
 RTEMS_TEST_CHECK([psxfile01])
 RTEMS_TEST_CHECK([psxfile02])
 RTEMS_TEST_CHECK([psxfilelock01])
+RTEMS_TEST_CHECK([psxftw01])
 RTEMS_TEST_CHECK([psxgetattrnp01])
 RTEMS_TEST_CHECK([psxgetrusage01])
 RTEMS_TEST_CHECK([psxglobalcon01])
diff --git a/testsuites/psxtests/psxftw01/init.c 
b/testsuites/psxtests/psxftw01/init.c
new file mode 100644
index 00..bc3858395f
--- /dev/null
+++ b/testsuites/psxtests/psxftw01/init.c
@@ -0,0 +1,204 @@
+/*
+ *  @file
+ *  @brief Test suite for ftw.h methods
+ */
+
+/*
+ * SPDX-License-Identifier: BSD-2

Waf build error

2021-02-03 Thread Eshan Dhawan
Hello everyone,
I was adding ftw test for waf build and got this error

/home/nolife/development/rtems/kernel/rtems/testsuites/psxtests/psxftw01/init.c:54:10:
fatal error: psxftw01-tar.h: No such file or directory
   54 | #include "psxftw01-tar.h"
  |  ^~~~
compilation terminated.

Waf: Leaving directory
`/home/nolife/development/rtems/kernel/rtems/build/arm/xilinx_zynq_a9_qemu'
Build failed
 -> task in 'testsuites/psxtests/psxftw01/init.o' failed with exit status 1
(run with -v to display more information)

but the file psxftw01-tar.h is already build and present in the build
folder.

the test compile is same as libtests/tar01
also the test works fine in the old build system

link to commit :
https://github.com/eshandhawan51/rtems/commit/73c2014c42a559c70fb432092c7de55aec1eddff
-- 
Thanks
- Eshan
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

[PATCH v4] Confstr Support For RTEMS

2021-01-31 Thread Eshan Dhawan
From: Eshan dhawan 

Signed-off-by: Eshan Dhawan 
---
 cpukit/Makefile.am|   1 +
 cpukit/posix/src/confstr.c|  96 
 spec/build/cpukit/librtemscpu.yml |   1 +
 spec/build/testsuites/psxtests/grp.yml|   2 +
 spec/build/testsuites/psxtests/psxconfstr.yml |  20 +++
 testsuites/psxtests/Makefile.am   |   9 ++
 testsuites/psxtests/configure.ac  |   1 +
 testsuites/psxtests/psxconfstr/init.c | 143 ++
 testsuites/psxtests/psxconfstr/psxconfstr.doc |  17 +++
 testsuites/psxtests/psxconfstr/psxconfstr.scn |   4 +
 10 files changed, 294 insertions(+)
 create mode 100644 cpukit/posix/src/confstr.c
 create mode 100644 spec/build/testsuites/psxtests/psxconfstr.yml
 create mode 100644 testsuites/psxtests/psxconfstr/init.c
 create mode 100644 testsuites/psxtests/psxconfstr/psxconfstr.doc
 create mode 100644 testsuites/psxtests/psxconfstr/psxconfstr.scn

diff --git a/cpukit/Makefile.am b/cpukit/Makefile.am
index 71bbaea54e..301fe35513 100644
--- a/cpukit/Makefile.am
+++ b/cpukit/Makefile.am
@@ -511,6 +511,7 @@ librtemscpu_a_SOURCES += posix/src/condsignalsupp.c
 librtemscpu_a_SOURCES += posix/src/condtimedwait.c
 librtemscpu_a_SOURCES += posix/src/condwait.c
 librtemscpu_a_SOURCES += posix/src/condwaitsupp.c
+librtemscpu_a_SOURCES += posix/src/confstr.c
 librtemscpu_a_SOURCES += posix/src/_execve.c
 librtemscpu_a_SOURCES += posix/src/fork.c
 librtemscpu_a_SOURCES += posix/src/key.c
diff --git a/cpukit/posix/src/confstr.c b/cpukit/posix/src/confstr.c
new file mode 100644
index 00..c8e116aed7
--- /dev/null
+++ b/cpukit/posix/src/confstr.c
@@ -0,0 +1,96 @@
+/*-
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
+ * Copyright (c) 1993
+ * The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ *may be used to endorse or promote products derived from this software
+ *without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include 
+/* Reduced to make sense in RTEMS */ 
+__SCCSID("@(#)confstr.c8.1 (Berkeley) 6/4/93");
+__FBSDID("$FreeBSD$");
+
+#include 
+
+#include 
+#include 
+#include 
+#include 
+
+
+size_t
+confstr(int name, char *buf, size_t len)
+{
+  const char *p;
+  const char UPE[] = "unsupported programming environment";
+
+  switch (name) {
+
+case _CS_PATH:
+  errno = EINVAL;
+  return (0);
+
+/*
+ * POSIX/SUS ``Programming Environments'' stuff
+ *
+ * We don't support more than one programming environment
+ * on any platform (yet), so we just return the empty
+ * string for the environment we are compiled for,
+ * and the string "unsupported programming environment"
+ * for anything else.  (The Standard says that if these
+ * values are used on a system which does not support
+ * this environment -- determined via sysconf() -- then
+ * the value we return is unspecified.  So, we return
+ * something which will cause obvious breakage.)
+ */
+
+case _CS_POSIX_V6_ILP32_OFF32_CFLAGS:
+case _CS_POSIX_V6_ILP32_OFF32_LDFLAGS:
+case _CS_POSIX_V6_ILP32_OFF32_LIBS:
+case _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS:
+case _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS:
+case _CS_POSIX_V6_LPBIG_OFFBIG_LIBS:
+case _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS:
+case _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS:
+case _CS_POSIX_V6_ILP32_OFFBIG_LIBS:
+case _CS_POSIX_V6_LP64_OFF64_CFLAGS:
+case _CS_POSIX_V6_LP64_OFF64_LDFLAGS:
+case _CS_POSIX_V6_LP64_OFF64_LIBS:
+
+
+  p = UPE;
+  if (len != 0 && buf != NULL){
+strlcpy(buf, p,

Instructions for RTEMS waf build

2021-01-22 Thread Eshan Dhawan
Hello everyone,
Where can I find instructions for waf build of rtems kernel


-- 
Thanks
- Eshan
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

[PATCH 0/1] Confstr patch

2020-10-16 Thread Eshan dhawan
Apologies for sending this patch so late.
This patch got struck between my exams and a project deadline.

Also Can someone tell me the extra changes that are required
to be made to make this patch compatible with the new build system.

Eshan dhawan (1):
  Confstr Patches

 cpukit/Makefile.am|   1 +
 cpukit/posix/src/confstr.c| 105 +
 testsuites/psxtests/Makefile.am   |   9 ++
 testsuites/psxtests/configure.ac  |   1 +
 testsuites/psxtests/psxconfstr/init.c | 143 ++
 testsuites/psxtests/psxconfstr/psxconfstr.doc |  17 +++
 testsuites/psxtests/psxconfstr/psxconfstr.scn |   4 +
 7 files changed, 280 insertions(+)
 create mode 100644 cpukit/posix/src/confstr.c
 create mode 100644 testsuites/psxtests/psxconfstr/init.c
 create mode 100644 testsuites/psxtests/psxconfstr/psxconfstr.doc
 create mode 100644 testsuites/psxtests/psxconfstr/psxconfstr.scn

-- 
2.17.1

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH 1/1] Confstr Patches

2020-10-16 Thread Eshan dhawan
Signed-off-by: Eshan dhawan 
---
 cpukit/Makefile.am|   1 +
 cpukit/posix/src/confstr.c| 105 +
 testsuites/psxtests/Makefile.am   |   9 ++
 testsuites/psxtests/configure.ac  |   1 +
 testsuites/psxtests/psxconfstr/init.c | 143 ++
 testsuites/psxtests/psxconfstr/psxconfstr.doc |  17 +++
 testsuites/psxtests/psxconfstr/psxconfstr.scn |   4 +
 7 files changed, 280 insertions(+)
 create mode 100644 cpukit/posix/src/confstr.c
 create mode 100644 testsuites/psxtests/psxconfstr/init.c
 create mode 100644 testsuites/psxtests/psxconfstr/psxconfstr.doc
 create mode 100644 testsuites/psxtests/psxconfstr/psxconfstr.scn

diff --git a/cpukit/Makefile.am b/cpukit/Makefile.am
index bdd8ebef33..337e8f8df1 100644
--- a/cpukit/Makefile.am
+++ b/cpukit/Makefile.am
@@ -510,6 +510,7 @@ librtemscpu_a_SOURCES += posix/src/condsignalsupp.c
 librtemscpu_a_SOURCES += posix/src/condtimedwait.c
 librtemscpu_a_SOURCES += posix/src/condwait.c
 librtemscpu_a_SOURCES += posix/src/condwaitsupp.c
+librtemscpu_a_SOURCES += posix/src/confstr.c
 librtemscpu_a_SOURCES += posix/src/_execve.c
 librtemscpu_a_SOURCES += posix/src/fork.c
 librtemscpu_a_SOURCES += posix/src/key.c
diff --git a/cpukit/posix/src/confstr.c b/cpukit/posix/src/confstr.c
new file mode 100644
index 00..828aa22a4e
--- /dev/null
+++ b/cpukit/posix/src/confstr.c
@@ -0,0 +1,105 @@
+/*-
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
+ * Copyright (c) 1993
+ * The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ *may be used to endorse or promote products derived from this software
+ *without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include 
+/* Reduced to make sense in RTEMS */
+__SCCSID("@(#)confstr.c8.1 (Berkeley) 6/4/93");
+__FBSDID("$FreeBSD$");
+
+#include 
+
+#include 
+#include 
+#include 
+
+
+size_t
+confstr(int name, char *buf, size_t len)
+{
+  const char *p;
+  const char UPE[] = "unsupported programming environment";
+
+  switch (name) {
+
+case _CS_PATH:
+  errno = EINVAL;
+  return (0);
+
+/*
+ * POSIX/SUS ``Programming Environments'' stuff
+ *
+ * We don't support more than one programming environment
+ * on any platform (yet), so we just return the empty
+ * string for the environment we are compiled for,
+ * and the string "unsupported programming environment"
+ * for anything else.  (The Standard says that if these
+ * values are used on a system which does not support
+ * this environment -- determined via sysconf() -- then
+ * the value we return is unspecified.  So, we return
+ * something which will cause obvious breakage.)
+ */
+
+case _CS_POSIX_V6_ILP32_OFF32_CFLAGS:
+case _CS_POSIX_V6_ILP32_OFF32_LDFLAGS:
+case _CS_POSIX_V6_ILP32_OFF32_LIBS:
+case _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS:
+case _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS:
+case _CS_POSIX_V6_LPBIG_OFFBIG_LIBS:
+case _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS:
+case _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS:
+case _CS_POSIX_V6_ILP32_OFFBIG_LIBS:
+case _CS_POSIX_V6_LP64_OFF64_CFLAGS:
+case _CS_POSIX_V6_LP64_OFF64_LDFLAGS:
+case _CS_POSIX_V6_LP64_OFF64_LIBS:
+case _CS_POSIX_V7_ILP32_OFF32_CFLAGS:
+case _CS_POSIX_V7_ILP32_OFF32_LDFLAGS:
+case _CS_POSIX_V7_ILP32_OFF32_LIBS:
+case _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS:
+case _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS:
+case _CS_POSIX_V7_LPBIG_OFFBIG_LIBS:
+case _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS:
+case _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS:
+case _

[PATCH] Confstr Patches

2020-09-10 Thread Eshan dhawan
Adds Confstr file To RTEMS with test

Signed-off-by: Eshan dhawan 
---
 cpukit/Makefile.am|   1 +
 cpukit/posix/src/confstr.c| 105 +++
 testsuites/psxtests/Makefile.am   |   9 ++
 testsuites/psxtests/configure.ac  |   1 +
 testsuites/psxtests/psxconfstr/init.c | 125 ++
 testsuites/psxtests/psxconfstr/psxconfstr.doc |  17 +++
 testsuites/psxtests/psxconfstr/psxconfstr.scn |   4 +
 7 files changed, 262 insertions(+)
 create mode 100644 cpukit/posix/src/confstr.c
 create mode 100644 testsuites/psxtests/psxconfstr/init.c
 create mode 100644 testsuites/psxtests/psxconfstr/psxconfstr.doc
 create mode 100644 testsuites/psxtests/psxconfstr/psxconfstr.scn

diff --git a/cpukit/Makefile.am b/cpukit/Makefile.am
index e5009e53c9..1c9e4697f1 100644
--- a/cpukit/Makefile.am
+++ b/cpukit/Makefile.am
@@ -509,6 +509,7 @@ librtemscpu_a_SOURCES += posix/src/condsignalsupp.c
 librtemscpu_a_SOURCES += posix/src/condtimedwait.c
 librtemscpu_a_SOURCES += posix/src/condwait.c
 librtemscpu_a_SOURCES += posix/src/condwaitsupp.c
+librtemscpu_a_SOURCES += posix/src/confstr.c
 librtemscpu_a_SOURCES += posix/src/_execve.c
 librtemscpu_a_SOURCES += posix/src/fork.c
 librtemscpu_a_SOURCES += posix/src/key.c
diff --git a/cpukit/posix/src/confstr.c b/cpukit/posix/src/confstr.c
new file mode 100644
index 00..71041db462
--- /dev/null
+++ b/cpukit/posix/src/confstr.c
@@ -0,0 +1,105 @@
+/*-
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
+ * Copyright (c) 1993
+ * The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ *may be used to endorse or promote products derived from this software
+ *without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include 
+__SCCSID("@(#)confstr.c8.1 (Berkeley) 6/4/93");
+__FBSDID("$FreeBSD$");
+
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+
+size_t
+confstr(int name, char *buf, size_t len)
+{
+   const char *p;
+   const char UPE[] = "unsupported programming environment";
+
+   switch (name) {
+#ifndef __rtems__
+   case _CS_PATH:
+   p = _PATH_STDPATH;
+   goto docopy;
+#endif
+   /*
+* POSIX/SUS ``Programming Environments'' stuff
+*
+* We don't support more than one programming environment
+* on any platform (yet), so we just return the empty
+* string for the environment we are compiled for,
+* and the string "unsupported programming environment"
+* for anything else.  (The Standard says that if these
+* values are used on a system which does not support
+* this environment -- determined via sysconf() -- then
+* the value we return is unspecified.  So, we return
+* something which will cause obvious breakage.)
+*/
+   case _CS_POSIX_V6_ILP32_OFF32_CFLAGS:
+   case _CS_POSIX_V6_ILP32_OFF32_LDFLAGS:
+   case _CS_POSIX_V6_ILP32_OFF32_LIBS:
+   case _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS:
+   case _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS:
+   case _CS_POSIX_V6_LPBIG_OFFBIG_LIBS:
+
+   p = UPE;
+   goto docopy;
+
+   case _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS:
+   case _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS:
+   case _CS_POSIX_V6_ILP32_OFFBIG_LIBS:
+
+   p = UPE;
+   goto docopy;
+
+   case _CS_POSIX_V6_LP64_OFF64_CFLAGS:
+   

Re: dl06 fails to build for RISC-V (griscv bsp)

2020-09-06 Thread Eshan Dhawan
The issue here is due to some changes in Newlib.
Which caused error in both riscv and arm.
The error in ARM is fixed.
But I don’t know about Riscv. 
> On 06-Sep-2020, at 2:43 PM, Hesham Almatary  
> wrote:
> 
> That's the same as [1]. I've seen that error before and (thought I)
> fixed it [2], but not sure what has changed since then.
> 
> [1] https://lists.rtems.org/pipermail/devel/2020-August/061717.html
> [2] 
> https://github.com/RTEMS/rtems-tools/commit/e6e610d262940b7651157597b6b1406aa806b4d1
> 
>> On Sun, 6 Sep 2020 at 09:14, Chris Johns  wrote:
>> 
>>> On 6/9/20 6:32 am, Jiri Gaisler wrote:
>>> I have updated both RTEMS and RSB to git head, and dl06 now fails to build:
>>> 
>>> riscv-rtems6-g++ -march=rv32imafd -mabi=ilp32d -O2 -g -ffunction-sections 
>>> -fdata-sections -Wall  -Wl,--gc-sections  -march=rv32imafd -mabi=ilp32d 
>>>  -B./../../lib/libbsp/riscv/griscv 
>>> -B/home/jiri/ibm/src/rtems/rtems/bsps/riscv/griscv/start -specs bsp_specs 
>>> -qrtems -L./../../cpukit 
>>> -L/home/jiri/ibm/src/rtems/rtems/bsps/riscv/shared/start -Wl,--wrap=printf 
>>> -Wl,--wrap=puts -Wl,--wrap=putchar -o dl05.exe dl05/dl05-init.o 
>>> dl05/dl05-dl-load.o dl05/dl05-dl-cpp.o dl05-dl05-tar.o 
>>> ../../lib/libbsp/riscv/griscv/librtemsbsp.a ../../cpukit/librtemscpu.a 
>>> ../../cpukit/librtemstest.a dl05-sym.o
>> 
>> This is dl05 and I do not think it is related to the issue.
>> 
>>> rtems-ld -r /home/jiri/src/rtems/riscvmp/riscv-rtems6/c/griscv \
>>>  -C riscv-rtems6-gcc -c "-march=rv32imafd -mabi=ilp32d" \
>>>  -O rap -b dl06.pre -e rtems_main -s \
>>>  -o dl06.rap dl06-o1.o dl06-o2.o -lm
>>> error: rap::object: Section index '0' not found: dl06-o1.o
>>> Makefile:8528: recipe for target 'dl06.rap' failed
>>> make[5]: *** [dl06.rap] Error 10
>> 
>> This looks like something in rtems-ld in the rtems-tools.git repo.
>> 
>>> It seems like dl06-o1.o not built but a link is attempted - is dl06 
>>> supposed to be enabled or disabled for RISC-V ?
>> 
>> Enabled but it seems something has changed to cause the test to not link. I
>> wonder if a tool upgrade is the reason. I have raised ..
>> 
>> https://devel.rtems.org/ticket/4069
>> 
>> Chris
>> ___
>> devel mailing list
>> devel@rtems.org
>> http://lists.rtems.org/mailman/listinfo/devel
> ___
> devel mailing list
> devel@rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Error in RTEMS (Master)

2020-09-01 Thread Eshan Dhawan
Hello everyone,
I was building rtems for arm-rtems6 using RSB(master) for BSP
xilinx_zynq_a9_qemu
and received this error while making rtems.
Error :
arm-rtems6-gcc  -march=armv7-a -mthumb -mfpu=neon -mfloat-abi=hard
-mtune=cortex-a9 -O0 -g -ffunction-sections -fdata-sections -Wall
-Wmissing-prototypes -Wimplicit-function-declaration -Wstrict-prototypes
-Wnested-externs -B./../../lib/libbsp/arm/xilinx-zynq
-B/home/eshan/development/rtems/kernel/rtems/bsps/arm/xilinx-zynq/start
-specs bsp_specs -qrtems -L./../../cpukit
-L/home/eshan/development/rtems/kernel/rtems/bsps/arm/shared/start
-Wl,--wrap=printf -Wl,--wrap=puts -Wl,--wrap=putchar -Wl,--gc-sections -o
math.exe math/math-init.o math/math-domath.o -lm
./../../lib/libbsp/arm/xilinx-zynq/librtemsbsp.a
./../../cpukit/librtemscpu.a ./../../cpukit/librtemstest.a
/home/eshan/development/rtems/6/lib/gcc/arm-rtems6/10.2.1/../../../../arm-rtems6/bin/ld:
math/math-domath.o: in function `domath':
/home/eshan/development/rtems/kernel/rtems/c/src/../../testsuites/libtests/math/domath.h:142:
undefined reference to `fma'
collect2: error: ld returned 1 exit status
Makefile:3938: recipe for target 'math.exe' failed
make[5]: *** [math.exe] Error 1
make[5]: Leaving directory
'/home/eshan/development/rtems/kernel/xilinx_zynq_a9_qemu/arm-rtems6/c/xilinx_zynq_a9_qemu/testsuites/libtests'
Makefile:663: recipe for target 'libtests' failed
make[4]: *** [libtests] Error 2
make[4]: Leaving directory
'/home/eshan/development/rtems/kernel/xilinx_zynq_a9_qemu/arm-rtems6/c/xilinx_zynq_a9_qemu/testsuites'
Makefile:1222: recipe for target 'testsuites' failed
make[3]: *** [testsuites] Error 2
make[3]: Leaving directory
'/home/eshan/development/rtems/kernel/xilinx_zynq_a9_qemu/arm-rtems6/c/xilinx_zynq_a9_qemu'
Makefile:716: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory
'/home/eshan/development/rtems/kernel/xilinx_zynq_a9_qemu/arm-rtems6/c/xilinx_zynq_a9_qemu'
Makefile:289: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory
'/home/eshan/development/rtems/kernel/xilinx_zynq_a9_qemu/arm-rtems6/c'
Makefile:410: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1

-- 
Thanks
- Eshan
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: Error in RISC-V Dynamic loading code

2020-08-31 Thread Eshan Dhawan

>> On 31-Aug-2020, at 3:44 PM, Hesham Almatary  
>> wrote:
> Hello Eshan,
> 
> What rtems-tools version are you using? I remember I fixed that (or
> something similar) in this commit [1]
The error comes while Building RTEMS 
> 
> [1] 
> https://github.com/RTEMS/rtems-tools/commit/e6e610d262940b7651157597b6b1406aa806b4d1
> 
>> On Sun, 30 Aug 2020 at 18:33, Eshan Dhawan  wrote:
>> 
>> Hello everyone,
>> While testing my confstr patch on RISCV i received this error.
>> 
>> Error Log :
>> make[5]: Entering directory 
>> '/home/eshan/development/rtems/kernel/rv32imac/riscv-rtems6/c/rv32imac/testsuites/libtests'
>> rtems-ld -r 
>> /home/eshan/development/rtems/kernel/rv32imac/riscv-rtems6/c/rv32imac \
>>  -C riscv-rtems6-gcc -c "-march=rv32imac -mabi=ilp32" \
>>  -O rap -b dl06.pre -e rtems_main -s \
>>  -o dl06.rap dl06-o1.o dl06-o2.o -lm
>> error: rap::object: Section index '0' not found: dl06-o1.o
>> Makefile:8528: recipe for target 'dl06.rap' failed
>> make[5]: *** [dl06.rap] Error 10
>> make[5]: Leaving directory 
>> '/home/eshan/development/rtems/kernel/rv32imac/riscv-rtems6/c/rv32imac/testsuites/libtests'
>> Makefile:663: recipe for target 'libtests' failed
>> make[4]: *** [libtests] Error 2
>> make[4]: Leaving directory 
>> '/home/eshan/development/rtems/kernel/rv32imac/riscv-rtems6/c/rv32imac/testsuites'
>> Makefile:1222: recipe for target 'testsuites' failed
>> make[3]: *** [testsuites] Error 2
>> make[3]: Leaving directory 
>> '/home/eshan/development/rtems/kernel/rv32imac/riscv-rtems6/c/rv32imac'
>> Makefile:716: recipe for target 'all-recursive' failed
>> make[2]: *** [all-recursive] Error 1
>> make[2]: Leaving directory 
>> '/home/eshan/development/rtems/kernel/rv32imac/riscv-rtems6/c/rv32imac'
>> Makefile:289: recipe for target 'all-recursive' failed
>> make[1]: *** [all-recursive] Error 1
>> make[1]: Leaving directory 
>> '/home/eshan/development/rtems/kernel/rv32imac/riscv-rtems6/c'
>> Makefile:410: recipe for target 'all-recursive' failed
>> make: *** [all-recursive] Error 1
>> 
>> --
>> Thanks
>> - Eshan
>> ___
>> devel mailing list
>> devel@rtems.org
>> http://lists.rtems.org/mailman/listinfo/devel
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Error in RISC-V Dynamic loading code

2020-08-30 Thread Eshan Dhawan
Hello everyone,
While testing my confstr patch on RISCV i received this error.

Error Log :
make[5]: Entering directory
'/home/eshan/development/rtems/kernel/rv32imac/riscv-rtems6/c/rv32imac/testsuites/libtests'
rtems-ld -r
/home/eshan/development/rtems/kernel/rv32imac/riscv-rtems6/c/rv32imac \
  -C riscv-rtems6-gcc -c "-march=rv32imac -mabi=ilp32" \
  -O rap -b dl06.pre -e rtems_main -s \
  -o dl06.rap dl06-o1.o dl06-o2.o -lm
error: rap::object: Section index '0' not found: dl06-o1.o
Makefile:8528: recipe for target 'dl06.rap' failed
make[5]: *** [dl06.rap] Error 10
make[5]: Leaving directory
'/home/eshan/development/rtems/kernel/rv32imac/riscv-rtems6/c/rv32imac/testsuites/libtests'
Makefile:663: recipe for target 'libtests' failed
make[4]: *** [libtests] Error 2
make[4]: Leaving directory
'/home/eshan/development/rtems/kernel/rv32imac/riscv-rtems6/c/rv32imac/testsuites'
Makefile:1222: recipe for target 'testsuites' failed
make[3]: *** [testsuites] Error 2
make[3]: Leaving directory
'/home/eshan/development/rtems/kernel/rv32imac/riscv-rtems6/c/rv32imac'
Makefile:716: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory
'/home/eshan/development/rtems/kernel/rv32imac/riscv-rtems6/c/rv32imac'
Makefile:289: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory
'/home/eshan/development/rtems/kernel/rv32imac/riscv-rtems6/c'
Makefile:410: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1

-- 
Thanks
- Eshan
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: Error while building FTW Patch

2020-08-29 Thread Eshan Dhawan
Hello Everyone, 
I wanted know if anyone was able to figure out the reason for this error ?? 

-Eshan 
> On 27-Aug-2020, at 1:01 AM, Joel Sherrill  wrote:
> 
> 
> I think there are two threads on this but I wanted to make sure Chris noticed 
> it.
> 
> Master of rtems-source-builder is broken. Backing up a commit or two works.
> 
> --joel
> 
>> On Wed, Aug 26, 2020 at 10:18 AM Eshan Dhawan  
>> wrote:
>> For the RSB master error sent a mail just few minutes ago 
>> 
>> 
>> > On 26-Aug-2020, at 8:43 PM, Gedare Bloom  wrote:
>> > 
>> > This looks unrelated. See if the plain toolchain without your patch
>> > fails in the same way.
>> > 
>> >> On Tue, Aug 25, 2020 at 12:58 PM Eshan Dhawan  
>> >> wrote:
>> >> 
>> >> hello everyone,
>> >> I after building arm-rtems6 toolchain with my ftw patch
>> >> when i build rtems i receive this error
>> >> The error comes on the patches that were earlier version of the 
>> >> successfully tested patch:)
>> >> 
>> >> Error log :
>> >> /home/eshan/development/rtems/kernel/rtems/c/src/../../testsuites/sptests/spcxx01/init.cc:
>> >>  In function 'void test_future()':
>> >> /home/eshan/development/rtems/kernel/rtems/c/src/../../testsuites/sptests/spcxx01/init.cc:64:20:
>> >>  error: variable 'std::future f' has initializer but incomplete type
>> >>   64 |   std::future f = std::async(std::launch::async, []{ return 
>> >> 12358; });
>> >>  |^
>> >> /home/eshan/development/rtems/kernel/rtems/c/src/../../testsuites/sptests/spcxx01/init.cc:64:74:
>> >>  error: invalid use of incomplete type 'class std::future'
>> >>   64 | d::future f = std::async(std::launch::async, []{ return 
>> >> 12358; });
>> >>  |
>> >>   ^
>> >> 
>> >> In file included from 
>> >> /home/eshan/development/rtems/kernel/rtems/c/src/../../testsuites/sptests/spcxx01/init.cc:32:
>> >> /home/eshan/development/rtems/6/lib/gcc/arm-rtems6/10.2.1/include/c++/future:125:11:
>> >>  note: declaration of 'class std::future'
>> >>  125 | class future;
>> >>  |   ^~
>> >> /home/eshan/development/rtems/6/lib/gcc/arm-rtems6/10.2.1/include/c++/future:
>> >>  At global scope:
>> >> /home/eshan/development/rtems/6/lib/gcc/arm-rtems6/10.2.1/include/c++/future:189:5:
>> >>  error: 'std::future> >> std::decay<_Tp>::type, typename std::decay<_Args>::type ...>::type> 
>> >> std::async(std::launch, _Fn&&, _Args&& ...) [with _Fn = 
>> >> test_future()::; _Args = {}; typename 
>> >> std::__invoke_result::type, typename 
>> >> std::decay<_Args>::type ...>::type = int]', declared using local type 
>> >> 'test_future()::', is used but never defined [-fpermissive]
>> >>  189 | async(launch __policy, _Fn&& __fn, _Args&&... __args);
>> >>  | ^
>> >> Makefile:12245: recipe for target 'spcxx01/spcxx01-init.o' failed
>> >> make[5]: *** [spcxx01/spcxx01-init.o] Error 1
>> >> make[5]: Leaving directory 
>> >> '/home/eshan/development/rtems/kernel/xilinx_zynq_a9_qemu/arm-rtems6/c/xilinx_zynq_a9_qemu/testsuites/sptests'
>> >> Makefile:663: recipe for target 'sptests' failed
>> >> make[4]: *** [sptests] Error 2
>> >> make[4]: Leaving directory 
>> >> '/home/eshan/development/rtems/kernel/xilinx_zynq_a9_qemu/arm-rtems6/c/xilinx_zynq_a9_qemu/testsuites'
>> >> Makefile:1222: recipe for target 'testsuites' failed
>> >> make[3]: *** [testsuites] Error 2
>> >> make[3]: Leaving directory 
>> >> '/home/eshan/development/rtems/kernel/xilinx_zynq_a9_qemu/arm-rtems6/c/xilinx_zynq_a9_qemu'
>> >> Makefile:716: recipe for target 'all-recursive' failed
>> >> make[2]: *** [all-recursive] Error 1
>> >> make[2]: Leaving directory 
>> >> '/home/eshan/development/rtems/kernel/xilinx_zynq_a9_qemu/arm-rtems6/c/xilinx_zynq_a9_qemu'
>> >> Makefile:289: recipe for target 'all-recursive' failed
>> >> make[1]: *** [all-recursive] Error 1
>> >> make[1]: Leaving directory 
>> >> '/home/eshan/development/rtems/kernel/xilinx_zynq_a9_qemu/arm-rtems6/c'
>> >> Makefile:410: recipe for target 'all-recursive' failed
>> >> make: *** [all-recursive] Error 1
>> >> ~/development/rtems/kernel/xilinx_zynq_a9_qemu  01:25:05  
>> >> eshan
>> >> 2 ❯
>> >> 
>> >> --
>> >> Thanks
>> >> - Eshan
>> >> ___
>> >> devel mailing list
>> >> devel@rtems.org
>> >> http://lists.rtems.org/mailman/listinfo/devel
>> ___
>> devel mailing list
>> devel@rtems.org
>> http://lists.rtems.org/mailman/listinfo/devel
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

GSOC 2020 : Final project report

2020-08-26 Thread Eshan Dhawan
hello everyone,
I have written the blog for the final report of submission of Google summer
of code program.
I would like to request you all to review it.
blog:
https://medium.com/@eshandhawan51/google-summer-of-code-2020-posix-compliance-66fca3e18bd7?source=friends_link=9cc3323c701de0138b9bb56c00ace173

-- 
Thanks
- Eshan
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: Error Building RSB (Master)

2020-08-26 Thread Eshan Dhawan
Hello Dr Bloom,
its not detecting the import files

error :
❯ ./source-builder/sb-check
Traceback (most recent call last):
  File "./source-builder/sb-check", line 23, in 
import sb.check
ImportError: No module named sb.check

On Wed, Aug 26, 2020 at 8:59 PM Gedare Bloom  wrote:

> try sb-check
>
> On Wed, Aug 26, 2020 at 8:52 AM Eshan Dhawan 
> wrote:
> >
> > Hello everyone,
> > I tried building RSB for arm-rtems6 and received this error
> >
> > ../source-builder/sb-set-builder
> --prefix=/home/eshan/development/rtems/6 6/rtems-arm
> > Incorrect Source Builder installation
> >
> > --
> > Thanks
> > - Eshan
> > ___
> > devel mailing list
> > devel@rtems.org
> > http://lists.rtems.org/mailman/listinfo/devel
>
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: Error while building FTW Patch

2020-08-26 Thread Eshan Dhawan
For the RSB master error sent a mail just few minutes ago 


> On 26-Aug-2020, at 8:43 PM, Gedare Bloom  wrote:
> 
> This looks unrelated. See if the plain toolchain without your patch
> fails in the same way.
> 
>> On Tue, Aug 25, 2020 at 12:58 PM Eshan Dhawan  
>> wrote:
>> 
>> hello everyone,
>> I after building arm-rtems6 toolchain with my ftw patch
>> when i build rtems i receive this error
>> The error comes on the patches that were earlier version of the successfully 
>> tested patch:)
>> 
>> Error log :
>> /home/eshan/development/rtems/kernel/rtems/c/src/../../testsuites/sptests/spcxx01/init.cc:
>>  In function 'void test_future()':
>> /home/eshan/development/rtems/kernel/rtems/c/src/../../testsuites/sptests/spcxx01/init.cc:64:20:
>>  error: variable 'std::future f' has initializer but incomplete type
>>   64 |   std::future f = std::async(std::launch::async, []{ return 
>> 12358; });
>>  |^
>> /home/eshan/development/rtems/kernel/rtems/c/src/../../testsuites/sptests/spcxx01/init.cc:64:74:
>>  error: invalid use of incomplete type 'class std::future'
>>   64 | d::future f = std::async(std::launch::async, []{ return 12358; 
>> });
>>  |  ^
>> 
>> In file included from 
>> /home/eshan/development/rtems/kernel/rtems/c/src/../../testsuites/sptests/spcxx01/init.cc:32:
>> /home/eshan/development/rtems/6/lib/gcc/arm-rtems6/10.2.1/include/c++/future:125:11:
>>  note: declaration of 'class std::future'
>>  125 | class future;
>>  |   ^~
>> /home/eshan/development/rtems/6/lib/gcc/arm-rtems6/10.2.1/include/c++/future:
>>  At global scope:
>> /home/eshan/development/rtems/6/lib/gcc/arm-rtems6/10.2.1/include/c++/future:189:5:
>>  error: 'std::future> std::decay<_Tp>::type, typename std::decay<_Args>::type ...>::type> 
>> std::async(std::launch, _Fn&&, _Args&& ...) [with _Fn = 
>> test_future()::; _Args = {}; typename 
>> std::__invoke_result::type, typename 
>> std::decay<_Args>::type ...>::type = int]', declared using local type 
>> 'test_future()::', is used but never defined [-fpermissive]
>>  189 | async(launch __policy, _Fn&& __fn, _Args&&... __args);
>>  | ^
>> Makefile:12245: recipe for target 'spcxx01/spcxx01-init.o' failed
>> make[5]: *** [spcxx01/spcxx01-init.o] Error 1
>> make[5]: Leaving directory 
>> '/home/eshan/development/rtems/kernel/xilinx_zynq_a9_qemu/arm-rtems6/c/xilinx_zynq_a9_qemu/testsuites/sptests'
>> Makefile:663: recipe for target 'sptests' failed
>> make[4]: *** [sptests] Error 2
>> make[4]: Leaving directory 
>> '/home/eshan/development/rtems/kernel/xilinx_zynq_a9_qemu/arm-rtems6/c/xilinx_zynq_a9_qemu/testsuites'
>> Makefile:1222: recipe for target 'testsuites' failed
>> make[3]: *** [testsuites] Error 2
>> make[3]: Leaving directory 
>> '/home/eshan/development/rtems/kernel/xilinx_zynq_a9_qemu/arm-rtems6/c/xilinx_zynq_a9_qemu'
>> Makefile:716: recipe for target 'all-recursive' failed
>> make[2]: *** [all-recursive] Error 1
>> make[2]: Leaving directory 
>> '/home/eshan/development/rtems/kernel/xilinx_zynq_a9_qemu/arm-rtems6/c/xilinx_zynq_a9_qemu'
>> Makefile:289: recipe for target 'all-recursive' failed
>> make[1]: *** [all-recursive] Error 1
>> make[1]: Leaving directory 
>> '/home/eshan/development/rtems/kernel/xilinx_zynq_a9_qemu/arm-rtems6/c'
>> Makefile:410: recipe for target 'all-recursive' failed
>> make: *** [all-recursive] Error 1
>> ~/development/rtems/kernel/xilinx_zynq_a9_qemu  01:25:05  
>> eshan
>> 2 ❯
>> 
>> --
>> Thanks
>> - Eshan
>> ___
>> devel mailing list
>> devel@rtems.org
>> http://lists.rtems.org/mailman/listinfo/devel
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Error Building RSB (Master)

2020-08-26 Thread Eshan Dhawan
Hello everyone,
I tried building RSB for arm-rtems6 and received this error

../source-builder/sb-set-builder --prefix=/home/eshan/development/rtems/6
6/rtems-arm
Incorrect Source Builder installation

-- 
Thanks
- Eshan
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Error while building FTW Patch

2020-08-25 Thread Eshan Dhawan
hello everyone,
I after building arm-rtems6 toolchain with my ftw patch
when i build rtems i receive this error
The error comes on the patches that were earlier version of the
successfully tested patch:)

Error log :
/home/eshan/development/rtems/kernel/rtems/c/src/../../testsuites/sptests/spcxx01/init.cc:
In function 'void test_future()':
/home/eshan/development/rtems/kernel/rtems/c/src/../../testsuites/sptests/spcxx01/init.cc:64:20:
error: variable 'std::future f' has initializer but incomplete type
   64 |   std::future f = std::async(std::launch::async, []{ return
12358; });
  |^
/home/eshan/development/rtems/kernel/rtems/c/src/../../testsuites/sptests/spcxx01/init.cc:64:74:
error: invalid use of incomplete type 'class std::future'
   64 | d::future f = std::async(std::launch::async, []{ return 12358;
});
  |
 ^

In file included from
/home/eshan/development/rtems/kernel/rtems/c/src/../../testsuites/sptests/spcxx01/init.cc:32:
/home/eshan/development/rtems/6/lib/gcc/arm-rtems6/10.2.1/include/c++/future:125:11:
note: declaration of 'class std::future'
  125 | class future;
  |   ^~
/home/eshan/development/rtems/6/lib/gcc/arm-rtems6/10.2.1/include/c++/future:
At global scope:
/home/eshan/development/rtems/6/lib/gcc/arm-rtems6/10.2.1/include/c++/future:189:5:
error: 'std::future::type, typename std::decay<_Args>::type ...>::type>
std::async(std::launch, _Fn&&, _Args&& ...) [with _Fn =
test_future()::; _Args = {}; typename
std::__invoke_result::type, typename
std::decay<_Args>::type ...>::type = int]', declared using local type
'test_future()::', is used but never defined [-fpermissive]
  189 | async(launch __policy, _Fn&& __fn, _Args&&... __args);
  | ^
Makefile:12245: recipe for target 'spcxx01/spcxx01-init.o' failed
make[5]: *** [spcxx01/spcxx01-init.o] Error 1
make[5]: Leaving directory
'/home/eshan/development/rtems/kernel/xilinx_zynq_a9_qemu/arm-rtems6/c/xilinx_zynq_a9_qemu/testsuites/sptests'
Makefile:663: recipe for target 'sptests' failed
make[4]: *** [sptests] Error 2
make[4]: Leaving directory
'/home/eshan/development/rtems/kernel/xilinx_zynq_a9_qemu/arm-rtems6/c/xilinx_zynq_a9_qemu/testsuites'
Makefile:1222: recipe for target 'testsuites' failed
make[3]: *** [testsuites] Error 2
make[3]: Leaving directory
'/home/eshan/development/rtems/kernel/xilinx_zynq_a9_qemu/arm-rtems6/c/xilinx_zynq_a9_qemu'
Makefile:716: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory
'/home/eshan/development/rtems/kernel/xilinx_zynq_a9_qemu/arm-rtems6/c/xilinx_zynq_a9_qemu'
Makefile:289: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory
'/home/eshan/development/rtems/kernel/xilinx_zynq_a9_qemu/arm-rtems6/c'
Makefile:410: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
 ~/development/rtems/kernel/xilinx_zynq_a9_qemu  01:25:05 
eshan
 2 ❯

-- 
Thanks
- Eshan
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

[PATCH v2] Confstr Patches

2020-08-20 Thread Eshan dhawan
Adds Confstr file To RTEMS with test

Signed-off-by: Eshan dhawan 
---
 cpukit/Makefile.am|   1 +
 cpukit/posix/src/confstr.c| 105 ++
 testsuites/psxtests/Makefile.am   |   9 ++
 testsuites/psxtests/configure.ac  |   1 +
 testsuites/psxtests/psxconfstr/init.c | 130 ++
 testsuites/psxtests/psxconfstr/psxconfstr.doc |  17 +++
 testsuites/psxtests/psxconfstr/psxconfstr.scn |   4 +
 7 files changed, 267 insertions(+)
 create mode 100644 cpukit/posix/src/confstr.c
 create mode 100644 testsuites/psxtests/psxconfstr/init.c
 create mode 100644 testsuites/psxtests/psxconfstr/psxconfstr.doc
 create mode 100644 testsuites/psxtests/psxconfstr/psxconfstr.scn

diff --git a/cpukit/Makefile.am b/cpukit/Makefile.am
index aa1fe5fc16..8edee5d82b 100644
--- a/cpukit/Makefile.am
+++ b/cpukit/Makefile.am
@@ -508,6 +508,7 @@ librtemscpu_a_SOURCES += posix/src/condsignalsupp.c
 librtemscpu_a_SOURCES += posix/src/condtimedwait.c
 librtemscpu_a_SOURCES += posix/src/condwait.c
 librtemscpu_a_SOURCES += posix/src/condwaitsupp.c
+librtemscpu_a_SOURCES += posix/src/confstr.c
 librtemscpu_a_SOURCES += posix/src/_execve.c
 librtemscpu_a_SOURCES += posix/src/fork.c
 librtemscpu_a_SOURCES += posix/src/key.c
diff --git a/cpukit/posix/src/confstr.c b/cpukit/posix/src/confstr.c
new file mode 100644
index 00..71041db462
--- /dev/null
+++ b/cpukit/posix/src/confstr.c
@@ -0,0 +1,105 @@
+/*-
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
+ * Copyright (c) 1993
+ * The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ *may be used to endorse or promote products derived from this software
+ *without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include 
+__SCCSID("@(#)confstr.c8.1 (Berkeley) 6/4/93");
+__FBSDID("$FreeBSD$");
+
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+
+size_t
+confstr(int name, char *buf, size_t len)
+{
+   const char *p;
+   const char UPE[] = "unsupported programming environment";
+
+   switch (name) {
+#ifndef __rtems__
+   case _CS_PATH:
+   p = _PATH_STDPATH;
+   goto docopy;
+#endif
+   /*
+* POSIX/SUS ``Programming Environments'' stuff
+*
+* We don't support more than one programming environment
+* on any platform (yet), so we just return the empty
+* string for the environment we are compiled for,
+* and the string "unsupported programming environment"
+* for anything else.  (The Standard says that if these
+* values are used on a system which does not support
+* this environment -- determined via sysconf() -- then
+* the value we return is unspecified.  So, we return
+* something which will cause obvious breakage.)
+*/
+   case _CS_POSIX_V6_ILP32_OFF32_CFLAGS:
+   case _CS_POSIX_V6_ILP32_OFF32_LDFLAGS:
+   case _CS_POSIX_V6_ILP32_OFF32_LIBS:
+   case _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS:
+   case _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS:
+   case _CS_POSIX_V6_LPBIG_OFFBIG_LIBS:
+
+   p = UPE;
+   goto docopy;
+
+   case _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS:
+   case _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS:
+   case _CS_POSIX_V6_ILP32_OFFBIG_LIBS:
+
+   p = UPE;
+   goto docopy;
+
+   case _CS_POSIX_V6_LP64_OFF64_CFLAGS:
+   

Re: [PATCH] Confstr Patches

2020-08-19 Thread Eshan Dhawan
On Wed, Aug 19, 2020 at 7:05 PM Sebastian Huber <
sebastian.hu...@embedded-brains.de> wrote:

> On 19/08/2020 15:04, Eshan dhawan wrote:
>
> > diff --git a/testsuites/psxtests/psxconfstr/init.c
> b/testsuites/psxtests/psxconfstr/init.c
> > new file mode 100644
> > index 00..8660f04b29
> > --- /dev/null
> > +++ b/testsuites/psxtests/psxconfstr/init.c
> > @@ -0,0 +1,137 @@
> > +/*
> > + *  @file
> > + *  @brief Test suite for getcpuclockid methods
> Really?
>
I took the template from that file
Forgot to change it :)

> + */
> > +
> > +/*
> > + * SPDX-License-Identifier: BSD-2-Clause
> > + *
> > + * Copyright (C) 2020 embedded brains GmbH, Eshan Dhawan
>
> Please follow the source file template:
>
>
> https://docs.rtems.org/branches/master/eng/coding-file-hdr.html#c-c-assembler-source-file-template
>
> > + *
> > + * Redistribution and use in source and binary forms, with or without
> > + * modification, are permitted provided that the following conditions
> > + * are met:
> > + * 1. Redistributions of source code must retain the above copyright
> > + *notice, this list of conditions and the following disclaimer.
> > + * 2. Redistributions in binary form must reproduce the above copyright
> > + *notice, this list of conditions and the following disclaimer in
> the
> > + *documentation and/or other materials provided with the
> distribution.
> > + *
> > + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
> "AS IS"
> > + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
> TO, THE
> > + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
> PURPOSE
> > + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
> CONTRIBUTORS BE
> > + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
> > + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
> > + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
> BUSINESS
> > + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
> IN
> > + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
> OTHERWISE)
> > + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
> OF THE
> > + * POSSIBILITY OF SUCH DAMAGE.
> > + */
> > +
> > +#ifdef HAVE_CONFIG_H
> > +#include "config.h"
> > +#endif
> > +
> > +#include 
> > +#include 
> > +#include 
> > +#include 
> > +#include 
> > +#include 
> > +#include 
> > +
> > +#include 
> > +#include 
> > +#include 
> > +
> > +#include "tmacros.h"
> > +#include "test_support.h"
> Please cut down the includes to the minimum.
> > +
> > +const char rtems_test_name[] = "PSXCONFSTR";
> > +
> > +/* Forward declaration to avoid warnings */
> > +void *POSIX_Init (void * argument);
> > +void *test_pthread(void *);
> > +
> > +static char buffer[512];
> > +
> > +static const T_action actions[] = {
> > +  T_report_hash_sha256,
> > +  T_check_task_context,
> > +  T_check_file_descriptors,
> > +  T_check_rtems_barriers,
> > +  T_check_rtems_extensions,
> > +  T_check_rtems_message_queues,
> > +  T_check_rtems_partitions,
> > +  T_check_rtems_periods,
> > +  T_check_rtems_regions,
> > +  T_check_rtems_semaphores,
> > +  T_check_rtems_tasks,
> > +  T_check_rtems_timers,
> > +  T_check_posix_keys
> > +};
> > +
> > +static const T_config config = {
> > +  .name = "psxconfstr",
> > +  .buf = buffer,
> > +  .putchar = rtems_put_char,
> > +  .buf_size = sizeof(buffer),
> > +  .verbosity = T_VERBOSE,
> > +  .now = T_now_clock,
> > +  .action_count = T_ARRAY_SIZE(actions),
> > +  .actions = actions
> > +};
> > +
> > +/* init test function begins */
> > +T_TEST_CASE(confstr)
> > +{
> > +
> > +int r;
> > +  char * buf ;
> > +  const char UPE[] = "unsupported programming environment";
> > +  size_t len1;
> > +  len1 = strlen(UPE) + 1;
> sizeof(UPE)
> > +  r = confstr(_CS_PATH, buf, sizeof(buf));
> > +  if (r != 0){
> > +printf("This Function is not supported");
> > +  }
> Please don't add hand crafted output like this just use the check
> functions of the test framework.
> > +  T_quiet_psx_success(r);
> > +  r = confstr(_CS_POSIX_V6_ILP32_OFFBIG_CFLAGS, buf, sizeof(buf));
> > +  if ( r != len1 ){

Re: [PATCH] Confstr Patches

2020-08-19 Thread Eshan Dhawan
On Wed, Aug 19, 2020 at 7:07 PM Sebastian Huber <
sebastian.hu...@embedded-brains.de> wrote:

> I don't think it make sense to use the FreeBSD implementation with this
> amount of #ifndef __rtems__.
>
> I will send a new patch with for the changes in test
and remove ifdef __rtems__ and code inside it
since its no more in the freebsd submodule of libbsd
any suggestions? :)

Thanks
-Eshan
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

[PATCH] Confstr Patches

2020-08-19 Thread Eshan dhawan
Adds Confstr file To RTEMS with test

Signed-off-by: Eshan dhawan 
---
 cpukit/Makefile.am|   1 +
 cpukit/posix/src/confstr.c| 127 
 testsuites/psxtests/Makefile.am   |   9 ++
 testsuites/psxtests/configure.ac  |   1 +
 testsuites/psxtests/psxconfstr/init.c | 137 ++
 testsuites/psxtests/psxconfstr/psxconfstr.doc |  17 +++
 testsuites/psxtests/psxconfstr/psxconfstr.scn |   4 +
 7 files changed, 296 insertions(+)
 create mode 100644 cpukit/posix/src/confstr.c
 create mode 100644 testsuites/psxtests/psxconfstr/init.c
 create mode 100644 testsuites/psxtests/psxconfstr/psxconfstr.doc
 create mode 100644 testsuites/psxtests/psxconfstr/psxconfstr.scn

diff --git a/cpukit/Makefile.am b/cpukit/Makefile.am
index aa1fe5fc16..8edee5d82b 100644
--- a/cpukit/Makefile.am
+++ b/cpukit/Makefile.am
@@ -508,6 +508,7 @@ librtemscpu_a_SOURCES += posix/src/condsignalsupp.c
 librtemscpu_a_SOURCES += posix/src/condtimedwait.c
 librtemscpu_a_SOURCES += posix/src/condwait.c
 librtemscpu_a_SOURCES += posix/src/condwaitsupp.c
+librtemscpu_a_SOURCES += posix/src/confstr.c
 librtemscpu_a_SOURCES += posix/src/_execve.c
 librtemscpu_a_SOURCES += posix/src/fork.c
 librtemscpu_a_SOURCES += posix/src/key.c
diff --git a/cpukit/posix/src/confstr.c b/cpukit/posix/src/confstr.c
new file mode 100644
index 00..653f581b4b
--- /dev/null
+++ b/cpukit/posix/src/confstr.c
@@ -0,0 +1,127 @@
+/*-
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
+ * Copyright (c) 1993
+ * The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ *may be used to endorse or promote products derived from this software
+ *without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include 
+__SCCSID("@(#)confstr.c8.1 (Berkeley) 6/4/93");
+__FBSDID("$FreeBSD$");
+
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+
+size_t
+confstr(int name, char *buf, size_t len)
+{
+   const char *p;
+   const char UPE[] = "unsupported programming environment";
+
+   switch (name) {
+#ifndef __rtems__
+   case _CS_PATH:
+   p = _PATH_STDPATH;
+   goto docopy;
+#endif
+   /*
+* POSIX/SUS ``Programming Environments'' stuff
+*
+* We don't support more than one programming environment
+* on any platform (yet), so we just return the empty
+* string for the environment we are compiled for,
+* and the string "unsupported programming environment"
+* for anything else.  (The Standard says that if these
+* values are used on a system which does not support
+* this environment -- determined via sysconf() -- then
+* the value we return is unspecified.  So, we return
+* something which will cause obvious breakage.)
+*/
+   case _CS_POSIX_V6_ILP32_OFF32_CFLAGS:
+   case _CS_POSIX_V6_ILP32_OFF32_LDFLAGS:
+   case _CS_POSIX_V6_ILP32_OFF32_LIBS:
+   case _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS:
+   case _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS:
+   case _CS_POSIX_V6_LPBIG_OFFBIG_LIBS:
+   /*
+* These two environments are never supported.
+*/
+   p = UPE;
+   goto docopy;
+
+   case _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS:
+   case _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS:
+   case _CS_POSIX_V6_ILP32_OFFBIG_LIBS:
+#ifndef __rtems__
+

Re: Updates of Smart India Hackathon 2020 Finale

2020-08-04 Thread Eshan Dhawan
On Wed, Aug 5, 2020 at 2:18 AM Mritunjay Sharma <
mritunjaysharma...@gmail.com> wrote:

> Hello everyone!
>
> I feel elated to share with the community that my Team 'Altruist'
> won the first Prize in the Grand Finale of the World's
> Biggest Hackathon - Smart India Hackathon 2020! We will not
> only be awarded with INR 100,000 but also the Government of India
> will help us to scale our project!
>
Congratulations Mritunjay :)

>
> Thank you so much to the community for understanding my concern
> and allowing me to take a break from 31st July to 3rd August.
>
> I am resuming my work from today and will start a new thread
> to ask the doubts after proper research work!
>
> Thanks
> Mritunjay
> ___
> devel mailing list
> devel@rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: Arm fenv patch V4

2020-07-29 Thread Eshan Dhawan

> On 29-Jul-2020, at 7:42 PM, Sebastian Huber 
>  wrote:
> 
> On 29/07/2020 08:57, Sebastian Huber wrote:
> 
>> Hello Eshan,
>> 
>> thanks, I pushed the patches to Newlib with some minor modifications. I 
>> updated the RSB accordingly.
> 
> This is really a never ending story:
> 
> /build/rtems/6/lib/gcc/arm-rtems6/10.2.1/../../../../arm-rtems6/bin/ld: 
> /build/rtems/6/lib/gcc/arm-rtems6/10.2.1/../../../../arm-rtems6/lib/thumb/armv7-a+simd/hard/libm.a(lib_a-fesetenv.o):
>  in function `fesetenv':
> /scratch/git-rtems-source-builder/rtems/build/arm-rtems6-gcc-33fb1b3-newlib-3ca4325-x86_64-linux-gnu-1/build/arm-rtems6/thumb/armv7-a+simd/hard/newlib/libm/machine/arm/../../../../../../../../../gnu-mirror-gcc-33fb1b3/newlib/libm/machine/arm/fesetenv.c:38:
>  undefined reference to `vmsr_fpscr'
> 
> I will fix it.
> 
Why isn’t this error showing up on my system 
When I run tests :’/ 


___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH 0/2] Fix fenv support for ARM

2020-07-29 Thread Eshan Dhawan

> On 29-Jul-2020, at 3:28 PM, Sebastian Huber 
>  wrote:
> 
> On 29/07/2020 11:14, Eshan Dhawan wrote:
> 
>> Could you check the MIPS patch as well
>> https://lists.rtems.org/pipermail/devel/2020-July/060762.html
>> This patch removed soft float support from MIPS
>> As it was the other architecture that could cause error
> Where can I find the hard float support in the MIPS files?
Apologies I sent the wrong link 
Actually I was sending the patch link 
https://lists.rtems.org/pipermail/devel/2020-July/060808.html

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH 0/2] Fix fenv support for ARM

2020-07-29 Thread Eshan Dhawan

> On 29-Jul-2020, at 10:38 AM, Sebastian Huber 
>  wrote:
> 
> On 27/07/2020 10:07, Corinna Vinschen via Newlib wrote:
> 
>>> On Jul 23 07:13, Sebastian Huber wrote:
>>>> On 19/07/2020 13:01, Sebastian Huber wrote:
>>> 
>>>> This patch set addresses some issues which popped up while building Newlib 
>>>> for
>>>> ARM with GCC 10 which enables -fno-common by default.
>>>> 
>>>> Eshan dhawan (1):
>>>>arm: Fix fenv support
>>>> 
>>>> Sebastian Huber (1):
>>>>arm: Remove superfluous fenv stub files
>>> I just noticed that the stub files I removed are not superfluous. Its seems
>>> they are necessary to somehow overwrite the default implementations in:
>>> 
>>> newlib/libm/fenv
>>> 
>>> There seems to be some build system magic involved here. I guess we have to
>>> split up fenv.c and move all the functions to individual files matching the
>>> ones in newlib/libm/fenv?
>> Splitting is probably better.  When you created and tested a new patchset,
>> feel free to push it.
> 
> I checked in two patches:
> 
> https://sourceware.org/git?p=newlib-cygwin.git;a=commit;h=b7a6e02dc6a5289bfa489c0e7b6539abd281e2c6
> 
> https://sourceware.org/git?p=newlib-cygwin.git;a=commit;h=3ca43259686187e081d317e2b406724a849c9d7b
> 
> I hope the ARM fenv support issues are now fixed.
I hope the same 
Could you check the MIPS patch as well 
https://lists.rtems.org/pipermail/devel/2020-July/060762.html
This patch removed soft float support from MIPS 
As it was the other architecture that could cause error
> 
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Arm fenv patch V4

2020-07-28 Thread Eshan Dhawan
Hello Sebastian,
I have attached the patch file. In this mail.
Hope thay do the job.

Thanks
- Eshan
From 54528371e931b81be9bd691abbbd3d6d152fdc01 Mon Sep 17 00:00:00 2001
From: Eshan dhawan 
Date: Sat, 18 Jul 2020 05:01:17 +0530
Subject: [PATCH v4 1/2] Changed ARM fenv support similar to RISCV

Removed soft float files

Signed-off-by: Eshan dhawan 

arm/fenv.c: Fix use of defines and format

Fix the build.  Remove superfluous code.  Remove parameter names in
the header file.  Move implementation details out of the header file.

Signed-off-by: Eshan dhawan 
---
 newlib/libc/machine/arm/machine/fenv-mangle.h |  53 ---
 .../libc/machine/arm/machine/fenv-softfloat.h | 187 --
 newlib/libc/machine/arm/machine/fenv-vfp.h| 187 --
 newlib/libc/machine/arm/sys/fenv.h|  66 +---
 newlib/libm/machine/arm/Makefile.am   |   4 +-
 newlib/libm/machine/arm/Makefile.in   |  19 +-
 newlib/libm/machine/arm/fenv-softfp.c |  32 --
 newlib/libm/machine/arm/fenv-vfp.c|  32 --
 newlib/libm/machine/arm/fenv.c| 319 ++
 9 files changed, 127 insertions(+), 772 deletions(-)
 delete mode 100644 newlib/libc/machine/arm/machine/fenv-mangle.h
 delete mode 100644 newlib/libc/machine/arm/machine/fenv-softfloat.h
 delete mode 100644 newlib/libc/machine/arm/machine/fenv-vfp.h
 delete mode 100644 newlib/libm/machine/arm/fenv-softfp.c
 delete mode 100644 newlib/libm/machine/arm/fenv-vfp.c

diff --git a/newlib/libc/machine/arm/machine/fenv-mangle.h b/newlib/libc/machine/arm/machine/fenv-mangle.h
deleted file mode 100644
index 476f7b20c..0
--- a/newlib/libc/machine/arm/machine/fenv-mangle.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*-
- * Copyright (c) 2013 Andrew Turner 
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *notice, this list of conditions and the following disclaimer in the
- *documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-#ifdef _FENV_MANGLE_H_
-#error Only include fenv-mangle.h once
-#endif
-
-#define	_FENV_MANGLE_H_
-
-#ifndef FENV_MANGLE
-#error FENV_MANGLE is undefined
-#endif
-
-#define	feclearexcept	FENV_MANGLE(feclearexcept)
-#define	fegetexceptflag	FENV_MANGLE(fegetexceptflag)
-#define	fesetexceptflag	FENV_MANGLE(fesetexceptflag)
-#define	feraiseexcept	FENV_MANGLE(feraiseexcept)
-#define	fetestexcept	FENV_MANGLE(fetestexcept)
-#define	fegetround	FENV_MANGLE(fegetround)
-#define	fesetround	FENV_MANGLE(fesetround)
-#define	fegetenv	FENV_MANGLE(fegetenv)
-#define	feholdexcept	FENV_MANGLE(feholdexcept)
-#define	fesetenv	FENV_MANGLE(fesetenv)
-#define	feupdateenv	FENV_MANGLE(feupdateenv)
-#define	feenableexcept	FENV_MANGLE(feenableexcept)
-#define	fedisableexcept	FENV_MANGLE(fedisableexcept)
-#define	fegetexcept	FENV_MANGLE(fegetexcept)
-
diff --git a/newlib/libc/machine/arm/machine/fenv-softfloat.h b/newlib/libc/machine/arm/machine/fenv-softfloat.h
deleted file mode 100644
index 5d33e18d0..0
--- a/newlib/libc/machine/arm/machine/fenv-softfloat.h
+++ /dev/null
@@ -1,187 +0,0 @@
- /*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
- *
- * Copyright (c) 2004-2011 David Schultz 
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *notice, this list of conditions and the following disclaimer in the
- *documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING

[PATCH v3 1/2] Changed ARM fenv support similar to RISCV

2020-07-27 Thread Eshan dhawan
Removed soft float files

arm/fenv.c: Fix use of defines and format

Fix the build.  Remove superfluous code.  Remove parameter names in
the header file.  Move implementation details out of the header file.

Signed-off-by: Eshan dhawan 
---
 newlib/libc/machine/arm/machine/fenv-mangle.h |  53 ---
 .../libc/machine/arm/machine/fenv-softfloat.h | 187 --
 newlib/libc/machine/arm/machine/fenv-vfp.h| 187 --
 newlib/libc/machine/arm/sys/fenv.h|  66 +---
 newlib/libm/machine/arm/Makefile.am   |   4 +-
 newlib/libm/machine/arm/Makefile.in   |  19 +-
 newlib/libm/machine/arm/fenv-softfp.c |  32 --
 newlib/libm/machine/arm/fenv-vfp.c|  32 --
 newlib/libm/machine/arm/fenv.c| 319 ++
 9 files changed, 127 insertions(+), 772 deletions(-)
 delete mode 100644 newlib/libc/machine/arm/machine/fenv-mangle.h
 delete mode 100644 newlib/libc/machine/arm/machine/fenv-softfloat.h
 delete mode 100644 newlib/libc/machine/arm/machine/fenv-vfp.h
 delete mode 100644 newlib/libm/machine/arm/fenv-softfp.c
 delete mode 100644 newlib/libm/machine/arm/fenv-vfp.c

diff --git a/newlib/libc/machine/arm/machine/fenv-mangle.h 
b/newlib/libc/machine/arm/machine/fenv-mangle.h
deleted file mode 100644
index 476f7b20c..0
--- a/newlib/libc/machine/arm/machine/fenv-mangle.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*-
- * Copyright (c) 2013 Andrew Turner 
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *notice, this list of conditions and the following disclaimer in the
- *documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-#ifdef _FENV_MANGLE_H_
-#error Only include fenv-mangle.h once
-#endif
-
-#define_FENV_MANGLE_H_
-
-#ifndef FENV_MANGLE
-#error FENV_MANGLE is undefined
-#endif
-
-#definefeclearexcept   FENV_MANGLE(feclearexcept)
-#definefegetexceptflag FENV_MANGLE(fegetexceptflag)
-#definefesetexceptflag FENV_MANGLE(fesetexceptflag)
-#defineferaiseexcept   FENV_MANGLE(feraiseexcept)
-#definefetestexceptFENV_MANGLE(fetestexcept)
-#definefegetround  FENV_MANGLE(fegetround)
-#definefesetround  FENV_MANGLE(fesetround)
-#definefegetenvFENV_MANGLE(fegetenv)
-#definefeholdexceptFENV_MANGLE(feholdexcept)
-#definefesetenvFENV_MANGLE(fesetenv)
-#definefeupdateenv FENV_MANGLE(feupdateenv)
-#definefeenableexcept  FENV_MANGLE(feenableexcept)
-#definefedisableexcept FENV_MANGLE(fedisableexcept)
-#definefegetexcept FENV_MANGLE(fegetexcept)
-
diff --git a/newlib/libc/machine/arm/machine/fenv-softfloat.h 
b/newlib/libc/machine/arm/machine/fenv-softfloat.h
deleted file mode 100644
index 5d33e18d0..0
--- a/newlib/libc/machine/arm/machine/fenv-softfloat.h
+++ /dev/null
@@ -1,187 +0,0 @@
- /*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
- *
- * Copyright (c) 2004-2011 David Schultz 
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *notice, this list of conditions and the following disclaimer in the
- *documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY

[PATCH v3 2/2] break fenv.c file to function files

2020-07-27 Thread Eshan dhawan
Signed-off-by: Eshan dhawan 
---
 newlib/libm/machine/arm/Makefile.am   |   6 +-
 newlib/libm/machine/arm/Makefile.in   |  34 +++-
 newlib/libm/machine/arm/_fenv.h   |  41 
 newlib/libm/machine/arm/fe_dfl_env.c  |  39 +++-
 newlib/libm/machine/arm/feclearexcept.c   |  46 -
 newlib/libm/machine/arm/fedisableexcept.c |  48 +
 newlib/libm/machine/arm/feenableexcept.c  |  50 +
 newlib/libm/machine/arm/fegetenv.c|  43 -
 newlib/libm/machine/arm/fegetexcept.c |  45 +
 newlib/libm/machine/arm/fegetexceptflag.c |  47 -
 newlib/libm/machine/arm/fegetround.c  |  50 -
 newlib/libm/machine/arm/feholdexcept.c|  48 -
 newlib/libm/machine/arm/fenv.c| 223 --
 newlib/libm/machine/arm/feraiseexcept.c   |  45 -
 newlib/libm/machine/arm/fesetenv.c|  44 -
 newlib/libm/machine/arm/fesetexceptflag.c |  48 -
 newlib/libm/machine/arm/fesetround.c  |  47 -
 newlib/libm/machine/arm/fetestexcept.c|  46 -
 newlib/libm/machine/arm/feupdateenv.c |  51 -
 19 files changed, 719 insertions(+), 282 deletions(-)
 create mode 100644 newlib/libm/machine/arm/_fenv.h
 create mode 100644 newlib/libm/machine/arm/fedisableexcept.c
 create mode 100644 newlib/libm/machine/arm/feenableexcept.c
 create mode 100644 newlib/libm/machine/arm/fegetexcept.c
 delete mode 100644 newlib/libm/machine/arm/fenv.c

diff --git a/newlib/libm/machine/arm/Makefile.am 
b/newlib/libm/machine/arm/Makefile.am
index 180a37f44..6574c56c9 100644
--- a/newlib/libm/machine/arm/Makefile.am
+++ b/newlib/libm/machine/arm/Makefile.am
@@ -26,13 +26,15 @@ LIB_SOURCES = \
fegetexceptflag.c \
fegetround.c \
feholdexcept.c \
-   fenv.c \
+   fegetexcept.c \
feraiseexcept.c \
fesetenv.c \
fesetexceptflag.c \
fesetround.c \
fetestexcept.c \
-   feupdateenv.c
+   feupdateenv.c \
+   feenableexcept.c \
+   fedisableexcept.c
 
 
 noinst_LIBRARIES = lib.a
diff --git a/newlib/libm/machine/arm/Makefile.in 
b/newlib/libm/machine/arm/Makefile.in
index aa23dd4d5..63de93443 100644
--- a/newlib/libm/machine/arm/Makefile.in
+++ b/newlib/libm/machine/arm/Makefile.in
@@ -54,7 +54,8 @@ build_triplet = @build@
 host_triplet = @host@
 DIST_COMMON = $(srcdir)/../../../Makefile.shared $(srcdir)/Makefile.in \
$(srcdir)/Makefile.am $(top_srcdir)/configure \
-   $(am__configure_deps) $(srcdir)/../../../../mkinstalldirs
+   $(am__configure_deps) $(srcdir)/../../../../mkinstalldirs \
+   $(srcdir)/../../../../mkinstalldirs
 subdir = .
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/../../../acinclude.m4 \
@@ -80,10 +81,11 @@ am__objects_1 = lib_a-e_sqrt.$(OBJEXT) 
lib_a-ef_sqrt.$(OBJEXT) \
lib_a-feclearexcept.$(OBJEXT) lib_a-fe_dfl_env.$(OBJEXT) \
lib_a-fegetenv.$(OBJEXT) lib_a-fegetexceptflag.$(OBJEXT) \
lib_a-fegetround.$(OBJEXT) lib_a-feholdexcept.$(OBJEXT) \
-   lib_a-fenv.$(OBJEXT) lib_a-feraiseexcept.$(OBJEXT) \
+   lib_a-fegetexcept.$(OBJEXT) lib_a-feraiseexcept.$(OBJEXT) \
lib_a-fesetenv.$(OBJEXT) lib_a-fesetexceptflag.$(OBJEXT) \
lib_a-fesetround.$(OBJEXT) lib_a-fetestexcept.$(OBJEXT) \
-   lib_a-feupdateenv.$(OBJEXT)
+   lib_a-feupdateenv.$(OBJEXT) lib_a-feenableexcept.$(OBJEXT) \
+   lib_a-fedisableexcept.$(OBJEXT)
 am_lib_a_OBJECTS = $(am__objects_1)
 lib_a_OBJECTS = $(am_lib_a_OBJECTS)
 DEFAULT_INCLUDES = -I.@am__isrc@
@@ -230,13 +232,15 @@ LIB_SOURCES = \
fegetexceptflag.c \
fegetround.c \
feholdexcept.c \
-   fenv.c \
+   fegetexcept.c \
feraiseexcept.c \
fesetenv.c \
fesetexceptflag.c \
fesetround.c \
fetestexcept.c \
-   feupdateenv.c
+   feupdateenv.c \
+   feenableexcept.c \
+   fedisableexcept.c
 
 noinst_LIBRARIES = lib.a
 lib_a_SOURCES = $(LIB_SOURCES)
@@ -434,11 +438,11 @@ lib_a-feholdexcept.o: feholdexcept.c
 lib_a-feholdexcept.obj: feholdexcept.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) 
$(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-feholdexcept.obj `if test -f 
'feholdexcept.c'; then $(CYGPATH_W) 'feholdexcept.c'; else $(CYGPATH_W) 
'$(srcdir)/feholdexcept.c'; fi`
 
-lib_a-fenv.o: fenv.c
-   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) 
$(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fenv.o `test -f 'fenv.c' || 
echo '$(srcdir)/'`fenv.c
+lib_a-fegetexcept.o: fegetexcept.c
+   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) 
$(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fegetexcept.o `test -f 
'fegetexcept.c' || echo '$(srcdir)/'`fegetexcept.c
 
-lib_a-fenv.obj: fenv.c
-   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) 
$(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fenv.obj `if test -f 
'fenv.c'; then $(CYGPATH_W) 'fenv.c'; else $(CYGPATH_W) '$(srcdir)/fenv.c'; fi

[PATCH 1/2] Changed ARM fenv support similar to RISCV

2020-07-27 Thread Eshan dhawan
Removed soft float files

arm/fenv.c: Fix use of defines and format

Fix the build.  Remove superfluous code.  Remove parameter names in
the header file.  Move implementation details out of the header file.

Signed-off-by: Eshan dhawan 
---
 newlib/libc/machine/arm/machine/fenv-mangle.h |  53 ---
 .../libc/machine/arm/machine/fenv-softfloat.h | 187 --
 newlib/libc/machine/arm/machine/fenv-vfp.h| 187 --
 newlib/libc/machine/arm/sys/fenv.h|  66 +---
 newlib/libm/machine/arm/Makefile.am   |   4 +-
 newlib/libm/machine/arm/Makefile.in   |  19 +-
 newlib/libm/machine/arm/fenv-softfp.c |  32 --
 newlib/libm/machine/arm/fenv-vfp.c|  32 --
 newlib/libm/machine/arm/fenv.c| 319 ++
 9 files changed, 127 insertions(+), 772 deletions(-)
 delete mode 100644 newlib/libc/machine/arm/machine/fenv-mangle.h
 delete mode 100644 newlib/libc/machine/arm/machine/fenv-softfloat.h
 delete mode 100644 newlib/libc/machine/arm/machine/fenv-vfp.h
 delete mode 100644 newlib/libm/machine/arm/fenv-softfp.c
 delete mode 100644 newlib/libm/machine/arm/fenv-vfp.c

diff --git a/newlib/libc/machine/arm/machine/fenv-mangle.h 
b/newlib/libc/machine/arm/machine/fenv-mangle.h
deleted file mode 100644
index 476f7b20c..0
--- a/newlib/libc/machine/arm/machine/fenv-mangle.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*-
- * Copyright (c) 2013 Andrew Turner 
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *notice, this list of conditions and the following disclaimer in the
- *documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-#ifdef _FENV_MANGLE_H_
-#error Only include fenv-mangle.h once
-#endif
-
-#define_FENV_MANGLE_H_
-
-#ifndef FENV_MANGLE
-#error FENV_MANGLE is undefined
-#endif
-
-#definefeclearexcept   FENV_MANGLE(feclearexcept)
-#definefegetexceptflag FENV_MANGLE(fegetexceptflag)
-#definefesetexceptflag FENV_MANGLE(fesetexceptflag)
-#defineferaiseexcept   FENV_MANGLE(feraiseexcept)
-#definefetestexceptFENV_MANGLE(fetestexcept)
-#definefegetround  FENV_MANGLE(fegetround)
-#definefesetround  FENV_MANGLE(fesetround)
-#definefegetenvFENV_MANGLE(fegetenv)
-#definefeholdexceptFENV_MANGLE(feholdexcept)
-#definefesetenvFENV_MANGLE(fesetenv)
-#definefeupdateenv FENV_MANGLE(feupdateenv)
-#definefeenableexcept  FENV_MANGLE(feenableexcept)
-#definefedisableexcept FENV_MANGLE(fedisableexcept)
-#definefegetexcept FENV_MANGLE(fegetexcept)
-
diff --git a/newlib/libc/machine/arm/machine/fenv-softfloat.h 
b/newlib/libc/machine/arm/machine/fenv-softfloat.h
deleted file mode 100644
index 5d33e18d0..0
--- a/newlib/libc/machine/arm/machine/fenv-softfloat.h
+++ /dev/null
@@ -1,187 +0,0 @@
- /*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
- *
- * Copyright (c) 2004-2011 David Schultz 
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *notice, this list of conditions and the following disclaimer in the
- *documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY

[PATCH 2/2] break fenv.c file to function files

2020-07-27 Thread Eshan dhawan
Signed-off-by: Eshan dhawan 
---
 newlib/libm/machine/arm/Makefile.am   |   6 +-
 newlib/libm/machine/arm/Makefile.in   |  34 +++-
 newlib/libm/machine/arm/_fenv.h   |  41 
 newlib/libm/machine/arm/fe_dfl_env.c  |  39 +++-
 newlib/libm/machine/arm/feclearexcept.c   |  46 -
 newlib/libm/machine/arm/fedisableexcept.c |  48 +
 newlib/libm/machine/arm/feenableexcept.c  |  50 +
 newlib/libm/machine/arm/fegetenv.c|  43 -
 newlib/libm/machine/arm/fegetexcept.c |  45 +
 newlib/libm/machine/arm/fegetexceptflag.c |  47 -
 newlib/libm/machine/arm/fegetround.c  |  50 -
 newlib/libm/machine/arm/feholdexcept.c|  48 -
 newlib/libm/machine/arm/fenv.c| 223 --
 newlib/libm/machine/arm/feraiseexcept.c   |  45 -
 newlib/libm/machine/arm/fesetenv.c|  44 -
 newlib/libm/machine/arm/fesetexceptflag.c |  48 -
 newlib/libm/machine/arm/fesetround.c  |  47 -
 newlib/libm/machine/arm/fetestexcept.c|  46 -
 newlib/libm/machine/arm/feupdateenv.c |  51 -
 19 files changed, 719 insertions(+), 282 deletions(-)
 create mode 100644 newlib/libm/machine/arm/_fenv.h
 create mode 100644 newlib/libm/machine/arm/fedisableexcept.c
 create mode 100644 newlib/libm/machine/arm/feenableexcept.c
 create mode 100644 newlib/libm/machine/arm/fegetexcept.c
 delete mode 100644 newlib/libm/machine/arm/fenv.c

diff --git a/newlib/libm/machine/arm/Makefile.am 
b/newlib/libm/machine/arm/Makefile.am
index 180a37f44..6574c56c9 100644
--- a/newlib/libm/machine/arm/Makefile.am
+++ b/newlib/libm/machine/arm/Makefile.am
@@ -26,13 +26,15 @@ LIB_SOURCES = \
fegetexceptflag.c \
fegetround.c \
feholdexcept.c \
-   fenv.c \
+   fegetexcept.c \
feraiseexcept.c \
fesetenv.c \
fesetexceptflag.c \
fesetround.c \
fetestexcept.c \
-   feupdateenv.c
+   feupdateenv.c \
+   feenableexcept.c \
+   fedisableexcept.c
 
 
 noinst_LIBRARIES = lib.a
diff --git a/newlib/libm/machine/arm/Makefile.in 
b/newlib/libm/machine/arm/Makefile.in
index aa23dd4d5..63de93443 100644
--- a/newlib/libm/machine/arm/Makefile.in
+++ b/newlib/libm/machine/arm/Makefile.in
@@ -54,7 +54,8 @@ build_triplet = @build@
 host_triplet = @host@
 DIST_COMMON = $(srcdir)/../../../Makefile.shared $(srcdir)/Makefile.in \
$(srcdir)/Makefile.am $(top_srcdir)/configure \
-   $(am__configure_deps) $(srcdir)/../../../../mkinstalldirs
+   $(am__configure_deps) $(srcdir)/../../../../mkinstalldirs \
+   $(srcdir)/../../../../mkinstalldirs
 subdir = .
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/../../../acinclude.m4 \
@@ -80,10 +81,11 @@ am__objects_1 = lib_a-e_sqrt.$(OBJEXT) 
lib_a-ef_sqrt.$(OBJEXT) \
lib_a-feclearexcept.$(OBJEXT) lib_a-fe_dfl_env.$(OBJEXT) \
lib_a-fegetenv.$(OBJEXT) lib_a-fegetexceptflag.$(OBJEXT) \
lib_a-fegetround.$(OBJEXT) lib_a-feholdexcept.$(OBJEXT) \
-   lib_a-fenv.$(OBJEXT) lib_a-feraiseexcept.$(OBJEXT) \
+   lib_a-fegetexcept.$(OBJEXT) lib_a-feraiseexcept.$(OBJEXT) \
lib_a-fesetenv.$(OBJEXT) lib_a-fesetexceptflag.$(OBJEXT) \
lib_a-fesetround.$(OBJEXT) lib_a-fetestexcept.$(OBJEXT) \
-   lib_a-feupdateenv.$(OBJEXT)
+   lib_a-feupdateenv.$(OBJEXT) lib_a-feenableexcept.$(OBJEXT) \
+   lib_a-fedisableexcept.$(OBJEXT)
 am_lib_a_OBJECTS = $(am__objects_1)
 lib_a_OBJECTS = $(am_lib_a_OBJECTS)
 DEFAULT_INCLUDES = -I.@am__isrc@
@@ -230,13 +232,15 @@ LIB_SOURCES = \
fegetexceptflag.c \
fegetround.c \
feholdexcept.c \
-   fenv.c \
+   fegetexcept.c \
feraiseexcept.c \
fesetenv.c \
fesetexceptflag.c \
fesetround.c \
fetestexcept.c \
-   feupdateenv.c
+   feupdateenv.c \
+   feenableexcept.c \
+   fedisableexcept.c
 
 noinst_LIBRARIES = lib.a
 lib_a_SOURCES = $(LIB_SOURCES)
@@ -434,11 +438,11 @@ lib_a-feholdexcept.o: feholdexcept.c
 lib_a-feholdexcept.obj: feholdexcept.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) 
$(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-feholdexcept.obj `if test -f 
'feholdexcept.c'; then $(CYGPATH_W) 'feholdexcept.c'; else $(CYGPATH_W) 
'$(srcdir)/feholdexcept.c'; fi`
 
-lib_a-fenv.o: fenv.c
-   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) 
$(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fenv.o `test -f 'fenv.c' || 
echo '$(srcdir)/'`fenv.c
+lib_a-fegetexcept.o: fegetexcept.c
+   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) 
$(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fegetexcept.o `test -f 
'fegetexcept.c' || echo '$(srcdir)/'`fegetexcept.c
 
-lib_a-fenv.obj: fenv.c
-   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) 
$(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fenv.obj `if test -f 
'fenv.c'; then $(CYGPATH_W) 'fenv.c'; else $(CYGPATH_W) '$(srcdir)/fenv.c'; fi

Re: [PATCH v2 2/2] break fenv.c file to function files

2020-07-27 Thread Eshan Dhawan

> On 27-Jul-2020, at 12:00 PM, Sebastian Huber 
>  wrote:
> 
> On 27/07/2020 08:11, Eshan Dhawan wrote:
> 
>>>> diff --git a/newlib/libc/machine/arm/sys/fenv.h 
>>>> b/newlib/libc/machine/arm/sys/fenv.h
>>>> index 70bd57be4..8712b2f33 100644
>>>> --- a/newlib/libc/machine/arm/sys/fenv.h
>>>> +++ b/newlib/libc/machine/arm/sys/fenv.h
>>>> @@ -62,6 +62,14 @@ typedef int fexcept_t;
>>>>  #defineFE_DOWNWARD0x0080
>>>>  #defineFE_TOWARDZERO0x00c0
>>>>  +#ifndef __SOFTFP__
>>>> +#definevmrs_fpscr(__r)__asm __volatile("vmrs %0, fpscr" : 
>>>> "="(__r))
>>>> +#definevmsr_fpscr(__r)__asm __volatile("vmsr fpscr, %0" : : 
>>>> "r"(__r))
>>>> +#define_FPU_MASK_SHIFT8
>>>> +#define_ROUND_MASK(FE_TONEAREST | FE_DOWNWARD | \
>>>> + FE_UPWARD | FE_TOWARDZERO)
>>>> +#endif
>>>> +
>>> I would still prefer to have this in an internal header file 
>>> "newlib/libm/machine/arm/_fenv.h" which is included via #include "_fenv.h".
>>> 
>>> If you really want to have it visible via , then the vm*() should 
>>> at least be renamed to _vmrs_fpscr() and _vmsr_fpscr().
>>> 
>> I am not able to get you point could you provide a little detail
>> I understood that you are saying that create an alternative _fenv.h in 
>> machine/arm in libm.
>> But I am not able to understand why.
>> If the symbols are visible with fenv.h than does that cause any issues?
> 
> Yes, this is a header file which is included in the C and POSIX standards. It 
> should only provide the things covered in the standards. The general 
> convention is to reserve all names starting with an underscore for the C 
> library implementation and operating system use. For example:
> 
> https://www.gnu.org/software/libc/manual/html_node/Reserved-Names.html
> 
>> Or how does renaming them causes any change?
> It moves the names to the reserved name space.
I will add the changes and send a patch ASAP
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH v2 1/2] Changed ARM fenv support similar to RISCV

2020-07-27 Thread Eshan Dhawan

>> On 27-Jul-2020, at 11:13 AM, Sebastian Huber 
>>  wrote:
> On 27/07/2020 07:38, Eshan Dhawan wrote:
> 
>>>>> On 27-Jul-2020, at 10:21 AM, Sebastian Huber 
>>>>>  wrote:
>>> On 25/07/2020 19:15, Eshan dhawan wrote:
>>>> Removed soft float files
>>>> arm/fenv.c: Fix use of defines and format
>>>> Fix the build.  Remove superfluous code.  Remove parameter names in
>>>> the header file.  Move implementation details out of the header file.
>>>> Patch By : Eshan Dhawan  & sebastian huber
>>>> 
>>>> Signed-off-by: Eshan dhawan
>>> I think this commit message is not really an improvement compared to the 
>>> potential v1 of this patch:
>>> https://sourceware.org/pipermail/newlib/2020/017780.html
>>> How does this patch differ from the one sent to the Newlib list?
>> This is the same patch as on the newlib list.
> The same patch except the commit message. Why did you change the commit 
> message?
I actually didn’t change the message intentionally.
That’s the message I had on my system 
You had changed it while sending to newlib 
I will change the commit message to the one on newlib 
>> It’s in this series just that the patches could be directly applied to the 
>> master.
>> Since the patch on the newlib isn’t yet merged
> Ok, good. Could you please address the minor issues in the patch set and send 
> a v3 to the RTEMS list.
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH v2 2/2] break fenv.c file to function files

2020-07-27 Thread Eshan Dhawan

> On 27-Jul-2020, at 10:19 AM, Sebastian Huber 
>  wrote:
> 
> On 25/07/2020 19:15, Eshan dhawan wrote:
> 
>> Signed-off-by: Eshan dhawan 
>> ---
>>  newlib/libc/machine/arm/sys/fenv.h|   8 +
>>  newlib/libm/machine/arm/Makefile.am   |   6 +-
>>  newlib/libm/machine/arm/Makefile.in   |  34 +++-
>>  newlib/libm/machine/arm/fe_dfl_env.c  |  38 +++-
>>  newlib/libm/machine/arm/feclearexcept.c   |  45 -
>>  newlib/libm/machine/arm/fedisableexcept.c |  47 +
>>  newlib/libm/machine/arm/feenableexcept.c  |  48 +
>>  newlib/libm/machine/arm/fegetenv.c|  42 +++-
>>  newlib/libm/machine/arm/fegetexcept.c |  44 +
>>  newlib/libm/machine/arm/fegetexceptflag.c |  46 -
>>  newlib/libm/machine/arm/fegetround.c  |  49 -
>>  newlib/libm/machine/arm/feholdexcept.c|  47 -
>>  newlib/libm/machine/arm/fenv.c| 223 --
>>  newlib/libm/machine/arm/feraiseexcept.c   |  44 -
>>  newlib/libm/machine/arm/fesetenv.c|  43 -
>>  newlib/libm/machine/arm/fesetexceptflag.c |  47 -
>>  newlib/libm/machine/arm/fesetround.c  |  46 -
>>  newlib/libm/machine/arm/fetestexcept.c|  45 -
>>  newlib/libm/machine/arm/feupdateenv.c |  50 -
>>  19 files changed, 670 insertions(+), 282 deletions(-)
>>  create mode 100644 newlib/libm/machine/arm/fedisableexcept.c
>>  create mode 100644 newlib/libm/machine/arm/feenableexcept.c
>>  create mode 100644 newlib/libm/machine/arm/fegetexcept.c
>>  delete mode 100644 newlib/libm/machine/arm/fenv.c
>> 
>> diff --git a/newlib/libc/machine/arm/sys/fenv.h 
>> b/newlib/libc/machine/arm/sys/fenv.h
>> index 70bd57be4..8712b2f33 100644
>> --- a/newlib/libc/machine/arm/sys/fenv.h
>> +++ b/newlib/libc/machine/arm/sys/fenv.h
>> @@ -62,6 +62,14 @@ typedef int fexcept_t;
>>  #defineFE_DOWNWARD0x0080
>>  #defineFE_TOWARDZERO0x00c0
>>  +#ifndef __SOFTFP__
>> +#definevmrs_fpscr(__r)__asm __volatile("vmrs %0, fpscr" : 
>> "="(__r))
>> +#definevmsr_fpscr(__r)__asm __volatile("vmsr fpscr, %0" : : 
>> "r"(__r))
>> +#define_FPU_MASK_SHIFT8
>> +#define_ROUND_MASK(FE_TONEAREST | FE_DOWNWARD | \
>> + FE_UPWARD | FE_TOWARDZERO)
>> +#endif
>> +
> 
> I would still prefer to have this in an internal header file 
> "newlib/libm/machine/arm/_fenv.h" which is included via #include "_fenv.h".
> 
> If you really want to have it visible via , then the vm*() should at 
> least be renamed to _vmrs_fpscr() and _vmsr_fpscr().
> 
I am not able to get you point could you provide a little detail 
I understood that you are saying that create an alternative _fenv.h in 
machine/arm in libm.
But I am not able to understand why. 
If the symbols are visible with fenv.h than does that cause any issues? 
Or how does renaming them causes any change? 
>> [...]
>> diff --git a/newlib/libm/machine/arm/fe_dfl_env.c 
>> b/newlib/libm/machine/arm/fe_dfl_env.c
>> index 8cbee7771..07aee8e7c 100644
>> --- a/newlib/libm/machine/arm/fe_dfl_env.c
>> +++ b/newlib/libm/machine/arm/fe_dfl_env.c
>> @@ -1,7 +1,37 @@
>> -/*
>> - * SPDX-License-Identifier: BSD-2-Clause
>> +/*-
>> + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
>>   *
>> - * (c) Copyright 2019 Joel Sherrill 
>> + * Copyright (c) 2004-2005 David Schultz 
>> + * Copyright (c) 2013 Andrew Turner 
>> + * All rights reserved.
>> + *
>> + * Redistribution and use in source and binary forms, with or without
>> + * modification, are permitted provided that the following conditions
>> + * are met:
>> + * 1. Redistributions of source code must retain the above copyright
>> + *notice, this list of conditions and the following disclaimer.
>> + * 2. Redistributions in binary form must reproduce the above copyright
>> + *notice, this list of conditions and the following disclaimer in the
>> + *documentation and/or other materials provided with the distribution.
>> + *
>> + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
>> + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
>> + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
>> PURPOSE
>> + * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
>> + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 
>> CONSEQUENTIAL
>> + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 

Re: [PATCH v2 1/2] Changed ARM fenv support similar to RISCV

2020-07-26 Thread Eshan Dhawan

> On 27-Jul-2020, at 10:21 AM, Sebastian Huber 
>  wrote:
> 
> On 25/07/2020 19:15, Eshan dhawan wrote:
> 
>> Removed soft float files
>> 
>> arm/fenv.c: Fix use of defines and format
>> 
>> Fix the build.  Remove superfluous code.  Remove parameter names in
>> the header file.  Move implementation details out of the header file.
>> Patch By : Eshan Dhawan  & sebastian huber
>> 
>> Signed-off-by: Eshan dhawan
> 
> I think this commit message is not really an improvement compared to the 
> potential v1 of this patch:
> 
> https://sourceware.org/pipermail/newlib/2020/017780.html
> 
> How does this patch differ from the one sent to the Newlib list?
> 
This is the same patch as on the newlib list.
It’s in this series just that the patches could be directly applied to the 
master.
Since the patch on the newlib isn’t yet merged
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

[PATCH v2 2/2] break fenv.c file to function files

2020-07-25 Thread Eshan dhawan
Signed-off-by: Eshan dhawan 
---
 newlib/libc/machine/arm/sys/fenv.h|   8 +
 newlib/libm/machine/arm/Makefile.am   |   6 +-
 newlib/libm/machine/arm/Makefile.in   |  34 +++-
 newlib/libm/machine/arm/fe_dfl_env.c  |  38 +++-
 newlib/libm/machine/arm/feclearexcept.c   |  45 -
 newlib/libm/machine/arm/fedisableexcept.c |  47 +
 newlib/libm/machine/arm/feenableexcept.c  |  48 +
 newlib/libm/machine/arm/fegetenv.c|  42 +++-
 newlib/libm/machine/arm/fegetexcept.c |  44 +
 newlib/libm/machine/arm/fegetexceptflag.c |  46 -
 newlib/libm/machine/arm/fegetround.c  |  49 -
 newlib/libm/machine/arm/feholdexcept.c|  47 -
 newlib/libm/machine/arm/fenv.c| 223 --
 newlib/libm/machine/arm/feraiseexcept.c   |  44 -
 newlib/libm/machine/arm/fesetenv.c|  43 -
 newlib/libm/machine/arm/fesetexceptflag.c |  47 -
 newlib/libm/machine/arm/fesetround.c  |  46 -
 newlib/libm/machine/arm/fetestexcept.c|  45 -
 newlib/libm/machine/arm/feupdateenv.c |  50 -
 19 files changed, 670 insertions(+), 282 deletions(-)
 create mode 100644 newlib/libm/machine/arm/fedisableexcept.c
 create mode 100644 newlib/libm/machine/arm/feenableexcept.c
 create mode 100644 newlib/libm/machine/arm/fegetexcept.c
 delete mode 100644 newlib/libm/machine/arm/fenv.c

diff --git a/newlib/libc/machine/arm/sys/fenv.h 
b/newlib/libc/machine/arm/sys/fenv.h
index 70bd57be4..8712b2f33 100644
--- a/newlib/libc/machine/arm/sys/fenv.h
+++ b/newlib/libc/machine/arm/sys/fenv.h
@@ -62,6 +62,14 @@ typedef int fexcept_t;
 #defineFE_DOWNWARD 0x0080
 #defineFE_TOWARDZERO   0x00c0
 
+#ifndef __SOFTFP__
+#definevmrs_fpscr(__r) __asm __volatile("vmrs %0, fpscr" : "="(__r))
+#definevmsr_fpscr(__r) __asm __volatile("vmsr fpscr, %0" : : "r"(__r))
+#define_FPU_MASK_SHIFT 8
+#define_ROUND_MASK (FE_TONEAREST | FE_DOWNWARD | \
+FE_UPWARD | FE_TOWARDZERO)
+#endif
+
 /* Default floating-point environment */
 extern const fenv_t*_fe_dfl_env;
 #defineFE_DFL_ENV  (_fe_dfl_env)
diff --git a/newlib/libm/machine/arm/Makefile.am 
b/newlib/libm/machine/arm/Makefile.am
index 180a37f44..6574c56c9 100644
--- a/newlib/libm/machine/arm/Makefile.am
+++ b/newlib/libm/machine/arm/Makefile.am
@@ -26,13 +26,15 @@ LIB_SOURCES = \
fegetexceptflag.c \
fegetround.c \
feholdexcept.c \
-   fenv.c \
+   fegetexcept.c \
feraiseexcept.c \
fesetenv.c \
fesetexceptflag.c \
fesetround.c \
fetestexcept.c \
-   feupdateenv.c
+   feupdateenv.c \
+   feenableexcept.c \
+   fedisableexcept.c
 
 
 noinst_LIBRARIES = lib.a
diff --git a/newlib/libm/machine/arm/Makefile.in 
b/newlib/libm/machine/arm/Makefile.in
index aa23dd4d5..63de93443 100644
--- a/newlib/libm/machine/arm/Makefile.in
+++ b/newlib/libm/machine/arm/Makefile.in
@@ -54,7 +54,8 @@ build_triplet = @build@
 host_triplet = @host@
 DIST_COMMON = $(srcdir)/../../../Makefile.shared $(srcdir)/Makefile.in \
$(srcdir)/Makefile.am $(top_srcdir)/configure \
-   $(am__configure_deps) $(srcdir)/../../../../mkinstalldirs
+   $(am__configure_deps) $(srcdir)/../../../../mkinstalldirs \
+   $(srcdir)/../../../../mkinstalldirs
 subdir = .
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/../../../acinclude.m4 \
@@ -80,10 +81,11 @@ am__objects_1 = lib_a-e_sqrt.$(OBJEXT) 
lib_a-ef_sqrt.$(OBJEXT) \
lib_a-feclearexcept.$(OBJEXT) lib_a-fe_dfl_env.$(OBJEXT) \
lib_a-fegetenv.$(OBJEXT) lib_a-fegetexceptflag.$(OBJEXT) \
lib_a-fegetround.$(OBJEXT) lib_a-feholdexcept.$(OBJEXT) \
-   lib_a-fenv.$(OBJEXT) lib_a-feraiseexcept.$(OBJEXT) \
+   lib_a-fegetexcept.$(OBJEXT) lib_a-feraiseexcept.$(OBJEXT) \
lib_a-fesetenv.$(OBJEXT) lib_a-fesetexceptflag.$(OBJEXT) \
lib_a-fesetround.$(OBJEXT) lib_a-fetestexcept.$(OBJEXT) \
-   lib_a-feupdateenv.$(OBJEXT)
+   lib_a-feupdateenv.$(OBJEXT) lib_a-feenableexcept.$(OBJEXT) \
+   lib_a-fedisableexcept.$(OBJEXT)
 am_lib_a_OBJECTS = $(am__objects_1)
 lib_a_OBJECTS = $(am_lib_a_OBJECTS)
 DEFAULT_INCLUDES = -I.@am__isrc@
@@ -230,13 +232,15 @@ LIB_SOURCES = \
fegetexceptflag.c \
fegetround.c \
feholdexcept.c \
-   fenv.c \
+   fegetexcept.c \
feraiseexcept.c \
fesetenv.c \
fesetexceptflag.c \
fesetround.c \
fetestexcept.c \
-   feupdateenv.c
+   feupdateenv.c \
+   feenableexcept.c \
+   fedisableexcept.c
 
 noinst_LIBRARIES = lib.a
 lib_a_SOURCES = $(LIB_SOURCES)
@@ -434,11 +438,11 @@ lib_a-feholdexcept.o: feholdexcept.c
 lib_a-feholdexcept.obj: feholdexcept.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) 
$(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fehol

[PATCH v2 1/2] Changed ARM fenv support similar to RISCV

2020-07-25 Thread Eshan dhawan
Removed soft float files

arm/fenv.c: Fix use of defines and format

Fix the build.  Remove superfluous code.  Remove parameter names in
the header file.  Move implementation details out of the header file.
Patch By : Eshan Dhawan  & sebastian huber 

Signed-off-by: Eshan dhawan 
---
 newlib/libc/machine/arm/machine/fenv-mangle.h |  53 ---
 .../libc/machine/arm/machine/fenv-softfloat.h | 187 --
 newlib/libc/machine/arm/machine/fenv-vfp.h| 187 --
 newlib/libc/machine/arm/sys/fenv.h|  66 +---
 newlib/libm/machine/arm/Makefile.am   |   4 +-
 newlib/libm/machine/arm/Makefile.in   |  19 +-
 newlib/libm/machine/arm/fenv-softfp.c |  32 --
 newlib/libm/machine/arm/fenv-vfp.c|  32 --
 newlib/libm/machine/arm/fenv.c| 319 ++
 9 files changed, 127 insertions(+), 772 deletions(-)
 delete mode 100644 newlib/libc/machine/arm/machine/fenv-mangle.h
 delete mode 100644 newlib/libc/machine/arm/machine/fenv-softfloat.h
 delete mode 100644 newlib/libc/machine/arm/machine/fenv-vfp.h
 delete mode 100644 newlib/libm/machine/arm/fenv-softfp.c
 delete mode 100644 newlib/libm/machine/arm/fenv-vfp.c

diff --git a/newlib/libc/machine/arm/machine/fenv-mangle.h 
b/newlib/libc/machine/arm/machine/fenv-mangle.h
deleted file mode 100644
index 476f7b20c..0
--- a/newlib/libc/machine/arm/machine/fenv-mangle.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*-
- * Copyright (c) 2013 Andrew Turner 
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *notice, this list of conditions and the following disclaimer in the
- *documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-#ifdef _FENV_MANGLE_H_
-#error Only include fenv-mangle.h once
-#endif
-
-#define_FENV_MANGLE_H_
-
-#ifndef FENV_MANGLE
-#error FENV_MANGLE is undefined
-#endif
-
-#definefeclearexcept   FENV_MANGLE(feclearexcept)
-#definefegetexceptflag FENV_MANGLE(fegetexceptflag)
-#definefesetexceptflag FENV_MANGLE(fesetexceptflag)
-#defineferaiseexcept   FENV_MANGLE(feraiseexcept)
-#definefetestexceptFENV_MANGLE(fetestexcept)
-#definefegetround  FENV_MANGLE(fegetround)
-#definefesetround  FENV_MANGLE(fesetround)
-#definefegetenvFENV_MANGLE(fegetenv)
-#definefeholdexceptFENV_MANGLE(feholdexcept)
-#definefesetenvFENV_MANGLE(fesetenv)
-#definefeupdateenv FENV_MANGLE(feupdateenv)
-#definefeenableexcept  FENV_MANGLE(feenableexcept)
-#definefedisableexcept FENV_MANGLE(fedisableexcept)
-#definefegetexcept FENV_MANGLE(fegetexcept)
-
diff --git a/newlib/libc/machine/arm/machine/fenv-softfloat.h 
b/newlib/libc/machine/arm/machine/fenv-softfloat.h
deleted file mode 100644
index 5d33e18d0..0
--- a/newlib/libc/machine/arm/machine/fenv-softfloat.h
+++ /dev/null
@@ -1,187 +0,0 @@
- /*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
- *
- * Copyright (c) 2004-2011 David Schultz 
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *notice, this list of conditions and the following disclaimer in the
- *documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT S

Adding Openat in RTEMS-Libbsd

2020-07-24 Thread Eshan Dhawan
Hello everyone,
I tried adding openat to libbsd from freebsd. Got error in not defined
_libc_interposing__
Where is that defined or needs to be added from freebsd.

link to github repo :
https://github.com/eshandhawan51/rtems-libbsd/tree/file_tests
added file openat.c in freebsd/lib/libc/sys

log:
 eshan@EDs-pc  ~/development/rtems/kernel/rtems-libbsd   file_tests ● 
./waf
Waf: Entering directory
`/home/eshan/development/rtems/kernel/rtems-libbsd/build/arm-rtems5-xilinx_zynq_a9_qemu-default'
[ 188/1949] Compiling freebsd/lib/libc/sys/openat.c
[1825/1949] Linking
build/arm-rtems5-xilinx_zynq_a9_qemu-default/at_functions.exe
[1910/1949] Linking
build/arm-rtems5-xilinx_zynq_a9_qemu-default/termios01.exe
[1914/1949] Linking
build/arm-rtems5-xilinx_zynq_a9_qemu-default/termios02.exe
[1918/1949] Linking
build/arm-rtems5-xilinx_zynq_a9_qemu-default/termios03.exe
[1922/1949] Linking
build/arm-rtems5-xilinx_zynq_a9_qemu-default/termios04.exe
[1927/1949] Linking
build/arm-rtems5-xilinx_zynq_a9_qemu-default/termios05.exe
[1931/1949] Linking
build/arm-rtems5-xilinx_zynq_a9_qemu-default/termios06.exe
[1932/1949] Linking
build/arm-rtems5-xilinx_zynq_a9_qemu-default/thread01.exe
[1942/1949] Linking
build/arm-rtems5-xilinx_zynq_a9_qemu-default/timeout01.exe
/home/eshan/development/rtems/5/lib/gcc/arm-rtems5/7.5.0/../../../../arm-rtems5/bin/ld:
./libbsd.a(openat.c.11.o): in function `openat':
/home/eshan/development/rtems/kernel/rtems-libbsd/build/arm-rtems5-xilinx_zynq_a9_qemu-default/../../freebsd/lib/libc/sys/openat.c:61:
undefined reference to `__libc_interposing'
/home/eshan/development/rtems/5/lib/gcc/arm-rtems5/7.5.0/../../../../arm-rtems5/bin/ld:
/home/eshan/development/rtems/kernel/rtems-libbsd/build/arm-rtems5-xilinx_zynq_a9_qemu-default/../../freebsd/lib/libc/sys/openat.c:61:
undefined reference to `__libc_interposing'
/home/eshan/development/rtems/5/lib/gcc/arm-rtems5/7.5.0/../../../../arm-rtems5/bin/ld:
/home/eshan/development/rtems/kernel/rtems-libbsd/build/arm-rtems5-xilinx_zynq_a9_qemu-default/at_functions.exe:
hidden symbol `__libc_interposing' isn't defined
/home/eshan/development/rtems/5/lib/gcc/arm-rtems5/7.5.0/../../../../arm-rtems5/bin/ld:
final link failed: bad value
collect2: error: ld returned 1 exit status

Waf: Leaving directory
`/home/eshan/development/rtems/kernel/rtems-libbsd/build/arm-rtems5-xilinx_zynq_a9_qemu-default'
Build failed

-- 
Thanks
- Eshan
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH v2 2/2] break fenv.c file to function files

2020-07-23 Thread Eshan Dhawan

> On 24-Jul-2020, at 11:06 AM, Sebastian Huber 
>  wrote:
> 
> On 24/07/2020 07:35, Eshan Dhawan wrote:
> 
>>>> -#include "../../fenv/fenv_stub.c"
>>>> +#include 
>>>> +
>>>> +int feclearexcept(int excepts)
>>>> +{
>>>> +#ifndef __SOFTFP__
>>>> +fexcept_t __fpsr;
>>>> +
>>>> +vmrs_fpscr(__fpsr);
>>>> +__fpsr &= ~excepts;
>>>> +vmsr_fpscr(__fpsr);
>>>> +#endif
>>>> +return (0);
>>>> +}
>>> Where is vmrs_fpscr() defined? Please add a header file for this, for 
>>> example
>>> 
>> I defined it in machine/arm/sys/fenv.h
>> Apologies I forgot to add the file in the patch
>> I will resend V2 with the correct message and file
> I would not place this define in  since it is an implementation 
> detail.
 is the machine specific fenv header so AFAIK any machine specific 
or implementation specific information or defines do there 
That’s the pattern being followed in the older implementations as well 
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH v2 2/2] break fenv.c file to function files

2020-07-23 Thread Eshan Dhawan

> On 24-Jul-2020, at 10:17 AM, Sebastian Huber 
>  wrote:
> 
> On 23/07/2020 21:41, Eshan dhawan wrote:
> 
>> -#include "../../fenv/fenv_stub.c"
>> +#include 
>> +
>> +int feclearexcept(int excepts)
>> +{
>> +#ifndef __SOFTFP__
>> +fexcept_t __fpsr;
>> +
>> +vmrs_fpscr(__fpsr);
>> +__fpsr &= ~excepts;
>> +vmsr_fpscr(__fpsr);
>> +#endif
>> +return (0);
>> +}
> 
> Where is vmrs_fpscr() defined? Please add a header file for this, for example
> 
I defined it in machine/arm/sys/fenv.h
Apologies I forgot to add the file in the patch 
I will resend V2 with the correct message and file
> newlib/libm/machine/arm/_fenv.h
> 
> and include it via
> 
> #include "_fenv.h"
> 
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Status of *AT functions in

2020-07-23 Thread Eshan Dhawan
I wrote a basic test file in Libbsd to see if the *at functions are present
in libbsd
But all the functions returned undefined reference
Link to the test file :
https://github.com/eshandhawan51/rtems-libbsd/blob/file_tests/testsuite/at_functions/test_main.c
Link to the function table :
https://docs.google.com/spreadsheets/d/1nEniQOs9TxDy5fb7P0_XFg7VknQDldG1BDFWSoqdKg0/edit?usp=sharing

Log :
home/eshan/development/rtems/5/lib/gcc/arm-rtems5/7.5.0/../../../../arm-rtems5/bin/ld:
testsuite/at_functions/test_main.c.48.o: in function `test_main':
/home/eshan/development/rtems/kernel/rtems-libbsd/build/arm-rtems5-xilinx_zynq_a9_qemu-default/../../testsuite/at_functions/test_main.c:72:
undefined reference to `bindat'
/home/eshan/development/rtems/5/lib/gcc/arm-rtems5/7.5.0/../../../../arm-rtems5/bin/ld:
/home/eshan/development/rtems/kernel/rtems-libbsd/build/arm-rtems5-xilinx_zynq_a9_qemu-default/../../testsuite/at_functions/test_main.c:74:
undefined reference to `connectat'
/home/eshan/development/rtems/5/lib/gcc/arm-rtems5/7.5.0/../../../../arm-rtems5/bin/ld:
/home/eshan/development/rtems/kernel/rtems-libbsd/build/arm-rtems5-xilinx_zynq_a9_qemu-default/../../testsuite/at_functions/test_main.c:77:
undefined reference to `faccessat'
/home/eshan/development/rtems/5/lib/gcc/arm-rtems5/7.5.0/../../../../arm-rtems5/bin/ld:
/home/eshan/development/rtems/kernel/rtems-libbsd/build/arm-rtems5-xilinx_zynq_a9_qemu-default/../../testsuite/at_functions/test_main.c:80:
undefined reference to `renameat'
/home/eshan/development/rtems/5/lib/gcc/arm-rtems5/7.5.0/../../../../arm-rtems5/bin/ld:
/home/eshan/development/rtems/kernel/rtems-libbsd/build/arm-rtems5-xilinx_zynq_a9_qemu-default/../../testsuite/at_functions/test_main.c:84:
undefined reference to `scandirat'
/home/eshan/development/rtems/5/lib/gcc/arm-rtems5/7.5.0/../../../../arm-rtems5/bin/ld:
/home/eshan/development/rtems/kernel/rtems-libbsd/build/arm-rtems5-xilinx_zynq_a9_qemu-default/../../testsuite/at_functions/test_main.c:87:
undefined reference to `fchownat'
/home/eshan/development/rtems/5/lib/gcc/arm-rtems5/7.5.0/../../../../arm-rtems5/bin/ld:
/home/eshan/development/rtems/kernel/rtems-libbsd/build/arm-rtems5-xilinx_zynq_a9_qemu-default/../../testsuite/at_functions/test_main.c:90:
undefined reference to `linkat'
/home/eshan/development/rtems/5/lib/gcc/arm-rtems5/7.5.0/../../../../arm-rtems5/bin/ld:
/home/eshan/development/rtems/kernel/rtems-libbsd/build/arm-rtems5-xilinx_zynq_a9_qemu-default/../../testsuite/at_functions/test_main.c:93:
undefined reference to `readlinkat'
/home/eshan/development/rtems/5/lib/gcc/arm-rtems5/7.5.0/../../../../arm-rtems5/bin/ld:
/home/eshan/development/rtems/kernel/rtems-libbsd/build/arm-rtems5-xilinx_zynq_a9_qemu-default/../../testsuite/at_functions/test_main.c:96:
undefined reference to `unlinkat'
/home/eshan/development/rtems/5/lib/gcc/arm-rtems5/7.5.0/../../../../arm-rtems5/bin/ld:
/home/eshan/development/rtems/kernel/rtems-libbsd/build/arm-rtems5-xilinx_zynq_a9_qemu-default/../../testsuite/at_functions/test_main.c:99:
undefined reference to `futimesat'
/home/eshan/development/rtems/5/lib/gcc/arm-rtems5/7.5.0/../../../../arm-rtems5/bin/ld:
/home/eshan/development/rtems/kernel/rtems-libbsd/build/arm-rtems5-xilinx_zynq_a9_qemu-default/../../testsuite/at_functions/test_main.c:102:
undefined reference to `openat'
/home/eshan/development/rtems/5/lib/gcc/arm-rtems5/7.5.0/../../../../arm-rtems5/bin/ld:
/home/eshan/development/rtems/kernel/rtems-libbsd/build/arm-rtems5-xilinx_zynq_a9_qemu-default/../../testsuite/at_functions/test_main.c:105:
undefined reference to `fchmodat'
/home/eshan/development/rtems/5/lib/gcc/arm-rtems5/7.5.0/../../../../arm-rtems5/bin/ld:
/home/eshan/development/rtems/kernel/rtems-libbsd/build/arm-rtems5-xilinx_zynq_a9_qemu-default/../../testsuite/at_functions/test_main.c:108:
undefined reference to `mkfifoat'
/home/eshan/development/rtems/5/lib/gcc/arm-rtems5/7.5.0/../../../../arm-rtems5/bin/ld:
/home/eshan/development/rtems/kernel/rtems-libbsd/build/arm-rtems5-xilinx_zynq_a9_qemu-default/../../testsuite/at_functions/test_main.c:111:
undefined reference to `mknodat'
/home/eshan/development/rtems/5/lib/gcc/arm-rtems5/7.5.0/../../../../arm-rtems5/bin/ld:
/home/eshan/development/rtems/kernel/rtems-libbsd/build/arm-rtems5-xilinx_zynq_a9_qemu-default/../../testsuite/at_functions/test_main.c:114:
undefined reference to `utimensat'
collect2: error: ld returned 1 exit status

Waf: Leaving directory
`/home/eshan/development/rtems/kernel/rtems-libbsd/build/arm-rtems5-xilinx_zynq_a9_qemu-default'
Build failed
 -> task in 'at_functions.exe' failed with exit status 1 (run with -v to
display more information)


-- 
Thanks
- Eshan
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

[PATCH v2 2/2] break fenv.c file to function files

2020-07-23 Thread Eshan dhawan
Signed-off-by: Eshan dhawan 
---
 newlib/libm/machine/arm/Makefile.am   |   6 +-
 newlib/libm/machine/arm/Makefile.in   |  34 +++-
 newlib/libm/machine/arm/fe_dfl_env.c  |  38 +++-
 newlib/libm/machine/arm/feclearexcept.c   |  45 -
 newlib/libm/machine/arm/fedisableexcept.c |  47 +
 newlib/libm/machine/arm/feenableexcept.c  |  48 +
 newlib/libm/machine/arm/fegetenv.c|  42 +++-
 newlib/libm/machine/arm/fegetexcept.c |  44 +
 newlib/libm/machine/arm/fegetexceptflag.c |  46 -
 newlib/libm/machine/arm/fegetround.c  |  49 -
 newlib/libm/machine/arm/feholdexcept.c|  47 -
 newlib/libm/machine/arm/fenv.c| 223 --
 newlib/libm/machine/arm/feraiseexcept.c   |  44 -
 newlib/libm/machine/arm/fesetenv.c|  43 -
 newlib/libm/machine/arm/fesetexceptflag.c |  47 -
 newlib/libm/machine/arm/fesetround.c  |  46 -
 newlib/libm/machine/arm/fetestexcept.c|  45 -
 newlib/libm/machine/arm/feupdateenv.c |  50 -
 18 files changed, 662 insertions(+), 282 deletions(-)
 create mode 100644 newlib/libm/machine/arm/fedisableexcept.c
 create mode 100644 newlib/libm/machine/arm/feenableexcept.c
 create mode 100644 newlib/libm/machine/arm/fegetexcept.c
 delete mode 100644 newlib/libm/machine/arm/fenv.c

diff --git a/newlib/libm/machine/arm/Makefile.am 
b/newlib/libm/machine/arm/Makefile.am
index 180a37f44..6574c56c9 100644
--- a/newlib/libm/machine/arm/Makefile.am
+++ b/newlib/libm/machine/arm/Makefile.am
@@ -26,13 +26,15 @@ LIB_SOURCES = \
fegetexceptflag.c \
fegetround.c \
feholdexcept.c \
-   fenv.c \
+   fegetexcept.c \
feraiseexcept.c \
fesetenv.c \
fesetexceptflag.c \
fesetround.c \
fetestexcept.c \
-   feupdateenv.c
+   feupdateenv.c \
+   feenableexcept.c \
+   fedisableexcept.c
 
 
 noinst_LIBRARIES = lib.a
diff --git a/newlib/libm/machine/arm/Makefile.in 
b/newlib/libm/machine/arm/Makefile.in
index aa23dd4d5..63de93443 100644
--- a/newlib/libm/machine/arm/Makefile.in
+++ b/newlib/libm/machine/arm/Makefile.in
@@ -54,7 +54,8 @@ build_triplet = @build@
 host_triplet = @host@
 DIST_COMMON = $(srcdir)/../../../Makefile.shared $(srcdir)/Makefile.in \
$(srcdir)/Makefile.am $(top_srcdir)/configure \
-   $(am__configure_deps) $(srcdir)/../../../../mkinstalldirs
+   $(am__configure_deps) $(srcdir)/../../../../mkinstalldirs \
+   $(srcdir)/../../../../mkinstalldirs
 subdir = .
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/../../../acinclude.m4 \
@@ -80,10 +81,11 @@ am__objects_1 = lib_a-e_sqrt.$(OBJEXT) 
lib_a-ef_sqrt.$(OBJEXT) \
lib_a-feclearexcept.$(OBJEXT) lib_a-fe_dfl_env.$(OBJEXT) \
lib_a-fegetenv.$(OBJEXT) lib_a-fegetexceptflag.$(OBJEXT) \
lib_a-fegetround.$(OBJEXT) lib_a-feholdexcept.$(OBJEXT) \
-   lib_a-fenv.$(OBJEXT) lib_a-feraiseexcept.$(OBJEXT) \
+   lib_a-fegetexcept.$(OBJEXT) lib_a-feraiseexcept.$(OBJEXT) \
lib_a-fesetenv.$(OBJEXT) lib_a-fesetexceptflag.$(OBJEXT) \
lib_a-fesetround.$(OBJEXT) lib_a-fetestexcept.$(OBJEXT) \
-   lib_a-feupdateenv.$(OBJEXT)
+   lib_a-feupdateenv.$(OBJEXT) lib_a-feenableexcept.$(OBJEXT) \
+   lib_a-fedisableexcept.$(OBJEXT)
 am_lib_a_OBJECTS = $(am__objects_1)
 lib_a_OBJECTS = $(am_lib_a_OBJECTS)
 DEFAULT_INCLUDES = -I.@am__isrc@
@@ -230,13 +232,15 @@ LIB_SOURCES = \
fegetexceptflag.c \
fegetround.c \
feholdexcept.c \
-   fenv.c \
+   fegetexcept.c \
feraiseexcept.c \
fesetenv.c \
fesetexceptflag.c \
fesetround.c \
fetestexcept.c \
-   feupdateenv.c
+   feupdateenv.c \
+   feenableexcept.c \
+   fedisableexcept.c
 
 noinst_LIBRARIES = lib.a
 lib_a_SOURCES = $(LIB_SOURCES)
@@ -434,11 +438,11 @@ lib_a-feholdexcept.o: feholdexcept.c
 lib_a-feholdexcept.obj: feholdexcept.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) 
$(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-feholdexcept.obj `if test -f 
'feholdexcept.c'; then $(CYGPATH_W) 'feholdexcept.c'; else $(CYGPATH_W) 
'$(srcdir)/feholdexcept.c'; fi`
 
-lib_a-fenv.o: fenv.c
-   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) 
$(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fenv.o `test -f 'fenv.c' || 
echo '$(srcdir)/'`fenv.c
+lib_a-fegetexcept.o: fegetexcept.c
+   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) 
$(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fegetexcept.o `test -f 
'fegetexcept.c' || echo '$(srcdir)/'`fegetexcept.c
 
-lib_a-fenv.obj: fenv.c
-   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) 
$(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fenv.obj `if test -f 
'fenv.c'; then $(CYGPATH_W) 'fenv.c'; else $(CYGPATH_W) '$(srcdir)/fenv.c'; fi`
+lib_a-fegetexcept.obj: fegetexcept.c
+   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS

[PATCH v2 1/2] Changed ARM fenv support similar to X86_64

2020-07-23 Thread Eshan dhawan
Removed soft float files

arm/fenv.c: Fix use of defines and format

Fix the build.  Remove superfluous code.  Remove parameter names in
the header file.  Move implementation details out of the header file.

Patch by: Eshan Dhawan  and
Sebastain huber  

Signed-off-by: Eshan dhawan 
---
 newlib/libc/machine/arm/machine/fenv-mangle.h |  53 ---
 .../libc/machine/arm/machine/fenv-softfloat.h | 187 --
 newlib/libc/machine/arm/machine/fenv-vfp.h| 187 --
 newlib/libc/machine/arm/sys/fenv.h|  66 +---
 newlib/libm/machine/arm/Makefile.am   |   4 +-
 newlib/libm/machine/arm/Makefile.in   |  19 +-
 newlib/libm/machine/arm/fenv-softfp.c |  32 --
 newlib/libm/machine/arm/fenv-vfp.c|  32 --
 newlib/libm/machine/arm/fenv.c| 319 ++
 9 files changed, 127 insertions(+), 772 deletions(-)
 delete mode 100644 newlib/libc/machine/arm/machine/fenv-mangle.h
 delete mode 100644 newlib/libc/machine/arm/machine/fenv-softfloat.h
 delete mode 100644 newlib/libc/machine/arm/machine/fenv-vfp.h
 delete mode 100644 newlib/libm/machine/arm/fenv-softfp.c
 delete mode 100644 newlib/libm/machine/arm/fenv-vfp.c

diff --git a/newlib/libc/machine/arm/machine/fenv-mangle.h 
b/newlib/libc/machine/arm/machine/fenv-mangle.h
deleted file mode 100644
index 476f7b20c..0
--- a/newlib/libc/machine/arm/machine/fenv-mangle.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*-
- * Copyright (c) 2013 Andrew Turner 
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *notice, this list of conditions and the following disclaimer in the
- *documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-#ifdef _FENV_MANGLE_H_
-#error Only include fenv-mangle.h once
-#endif
-
-#define_FENV_MANGLE_H_
-
-#ifndef FENV_MANGLE
-#error FENV_MANGLE is undefined
-#endif
-
-#definefeclearexcept   FENV_MANGLE(feclearexcept)
-#definefegetexceptflag FENV_MANGLE(fegetexceptflag)
-#definefesetexceptflag FENV_MANGLE(fesetexceptflag)
-#defineferaiseexcept   FENV_MANGLE(feraiseexcept)
-#definefetestexceptFENV_MANGLE(fetestexcept)
-#definefegetround  FENV_MANGLE(fegetround)
-#definefesetround  FENV_MANGLE(fesetround)
-#definefegetenvFENV_MANGLE(fegetenv)
-#definefeholdexceptFENV_MANGLE(feholdexcept)
-#definefesetenvFENV_MANGLE(fesetenv)
-#definefeupdateenv FENV_MANGLE(feupdateenv)
-#definefeenableexcept  FENV_MANGLE(feenableexcept)
-#definefedisableexcept FENV_MANGLE(fedisableexcept)
-#definefegetexcept FENV_MANGLE(fegetexcept)
-
diff --git a/newlib/libc/machine/arm/machine/fenv-softfloat.h 
b/newlib/libc/machine/arm/machine/fenv-softfloat.h
deleted file mode 100644
index 5d33e18d0..0
--- a/newlib/libc/machine/arm/machine/fenv-softfloat.h
+++ /dev/null
@@ -1,187 +0,0 @@
- /*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
- *
- * Copyright (c) 2004-2011 David Schultz 
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *notice, this list of conditions and the following disclaimer in the
- *documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL

[PATCH] Removed Soft float from MIPS

2020-07-21 Thread Eshan dhawan
This Patch removes Soft Float code from MIPS.
Instead It adds the soft float code from RISCV

Signed-off-by: Eshan dhawan 
---
 .../machine/mips/machine/fenv-softfloat.h | 55 +++
 newlib/libm/machine/mips/fenv.c   | 10 
 2 files changed, 21 insertions(+), 44 deletions(-)

diff --git a/newlib/libc/machine/mips/machine/fenv-softfloat.h 
b/newlib/libc/machine/mips/machine/fenv-softfloat.h
index cf13e73fc..7c8bc3a89 100644
--- a/newlib/libc/machine/mips/machine/fenv-softfloat.h
+++ b/newlib/libc/machine/mips/machine/fenv-softfloat.h
@@ -50,16 +50,11 @@
  * doesn't matter how you define them.
  */
 #include 
-int __softfloat_float_exception_flags;
-int __softfloat_float_exception_mask;
-int __softfloat_float_rounding_mode;
-
 
 __fenv_static inline int
 feclearexcept(int excepts)
 {
 
-   __softfloat_float_exception_flags &= ~excepts;
return (0);
 }
 
@@ -67,16 +62,14 @@ __fenv_static inline int
 fegetexceptflag(fexcept_t *flagp, int excepts)
 {
 
-   *flagp = __softfloat_float_exception_flags & excepts;
return (0);
+
 }
 
 __fenv_static inline int
 fesetexceptflag(const fexcept_t *flagp, int excepts)
 {
 
-   __softfloat_float_exception_flags &= ~excepts;
-   __softfloat_float_exception_flags |= *flagp & excepts;
return (0);
 }
 
@@ -84,7 +77,7 @@ __fenv_static inline int
 feraiseexcept(int excepts)
 {
 
-return(excepts  ?  -ENOTSUP : 0 );
+   return( excepts != 0 );
 
 }
 
@@ -92,21 +85,25 @@ __fenv_static inline int
 fetestexcept(int excepts)
 {
 
-   return (__softfloat_float_exception_flags & excepts);
+   return (0);
 }
 
 __fenv_static inline int
 fegetround(void)
 {
 
-   return (__softfloat_float_rounding_mode);
+#ifdef FE_TONEAREST
+   return FE_TONEAREST;
+#else
+   return 0;
+#endif
+
 }
 
 __fenv_static inline int
 fesetround(int rounding_mode)
 {
 
-   __softfloat_float_rounding_mode = rounding_mode;
return (0);
 }
 
@@ -114,19 +111,13 @@ __fenv_static inline int
 fegetenv(fenv_t *envp)
 {
 
-   __set_env(*envp, __softfloat_float_exception_flags,
-   __softfloat_float_exception_mask, __softfloat_float_rounding_mode);
return (0);
 }
 
 __fenv_static inline int
 feholdexcept(fenv_t *envp)
 {
-   fenv_t __env;
-
-   fegetenv(envp);
-   __softfloat_float_exception_flags = 0;
-   __softfloat_float_exception_mask = 0;
+
return (0);
 }
 
@@ -134,19 +125,19 @@ __fenv_static inline int
 fesetenv(const fenv_t *envp)
 {
 
-   __softfloat_float_exception_flags = __env_flags(*envp);
-   __softfloat_float_exception_mask = __env_mask(*envp);
-   __softfloat_float_rounding_mode = __env_round(*envp);
+
return (0);
 }
 
 __fenv_static inline int
 feupdateenv(const fenv_t *envp)
 {
-   int __oflags = __softfloat_float_exception_flags;
 
-   fesetenv(envp);
-   feraiseexcept(__oflags);
+#if defined FE_NOMASK_ENV && FE_ALL_EXCEPT != 0
+ if (envp == FE_NOMASK_ENV)
+ return 1;
+#endif
+
return (0);
 }
 
@@ -157,26 +148,22 @@ feupdateenv(const fenv_t *envp)
 __fenv_static inline int
 feenableexcept(int __mask)
 {
-   int __omask = __softfloat_float_exception_mask;
-
-   __softfloat_float_exception_mask |= __mask;
-   return (__omask);
+
+   return (0);
 }
 
 __fenv_static inline int
 fedisableexcept(int __mask)
 {
-   int __omask = __softfloat_float_exception_mask;
-
-   __softfloat_float_exception_mask &= ~__mask;
-   return (__omask);
+
+   return (0);
 }
 
 __fenv_static inline int
 fegetexcept(void)
 {
 
-   return (__softfloat_float_exception_mask);
+   return (0);
 }
 
 #endif /* __BSD_VISIBLE */
diff --git a/newlib/libm/machine/mips/fenv.c b/newlib/libm/machine/mips/fenv.c
index 6e4bb8f33..e2179eb20 100644
--- a/newlib/libm/machine/mips/fenv.c
+++ b/newlib/libm/machine/mips/fenv.c
@@ -44,20 +44,10 @@
  * this as a default environment.
  */
 
-
 #ifdef __mips_soft_float
-#define __set_env(env, flags, mask, rnd) env = ((flags) \
-| (mask)<<_FPUSW_SHIFT  \
-| (rnd) << 24)
-#define __env_flags(env)((env) & FE_ALL_EXCEPT)
-#define __env_mask(env) (((env) >> _FPUSW_SHIFT)\
-& FE_ALL_EXCEPT)
-#define __env_round(env)(((env) >> 24) & _ROUND_MASK)
 #include 
 #endif
 
-
-
 extern inline int feclearexcept(int excepts);
 extern inline int fegetexceptflag(fexcept_t *flagp, int excepts);
 extern inline int fesetexceptflag(const fexcept_t *flagp, int excepts);
-- 
2.17.1

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Reworking MIPS Fenv support

2020-07-21 Thread Eshan Dhawan
Hello everyone,
As I was reworking the MIPS fenv support
I realised it wasn't as bad as ARM fenv since there is no mangle files
There are just headers and extern inline function definitions in the fenv.c
file
That greatly decreased the margin of error
So, I though instead of complete rework
I make changes in the existing fenv-softfp.h file
So as it has softfloat similar to RISC-V
And as only either hard float or soft float definitions are picked at the
linking part
So the errors are not much likely to occur

-- 
Thanks
- Eshan
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

[PATCH v4] Changed ARM fenv support and remodeled it similar to RISCV

2020-07-18 Thread Eshan dhawan
Removed all the Extra files
Added soft fp support similar to RISCV
Has fenv stub implementation.

Signed-off-by: Eshan dhawan 
---
 newlib/libc/machine/arm/machine/fenv-mangle.h |  53 ---
 .../libc/machine/arm/machine/fenv-softfloat.h | 187 --
 newlib/libc/machine/arm/machine/fenv-vfp.h| 187 --
 newlib/libc/machine/arm/sys/fenv.h|  66 +---
 newlib/libm/machine/arm/Makefile.am   |   4 +-
 newlib/libm/machine/arm/Makefile.in   |  19 +-
 newlib/libm/machine/arm/fenv-softfp.c |  32 --
 newlib/libm/machine/arm/fenv-vfp.c|  32 --
 newlib/libm/machine/arm/fenv.c| 319 ++
 9 files changed, 127 insertions(+), 772 deletions(-)
 delete mode 100644 newlib/libc/machine/arm/machine/fenv-mangle.h
 delete mode 100644 newlib/libc/machine/arm/machine/fenv-softfloat.h
 delete mode 100644 newlib/libc/machine/arm/machine/fenv-vfp.h
 delete mode 100644 newlib/libm/machine/arm/fenv-softfp.c
 delete mode 100644 newlib/libm/machine/arm/fenv-vfp.c

diff --git a/newlib/libc/machine/arm/machine/fenv-mangle.h 
b/newlib/libc/machine/arm/machine/fenv-mangle.h
deleted file mode 100644
index 476f7b20c..0
--- a/newlib/libc/machine/arm/machine/fenv-mangle.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*-
- * Copyright (c) 2013 Andrew Turner 
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *notice, this list of conditions and the following disclaimer in the
- *documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-#ifdef _FENV_MANGLE_H_
-#error Only include fenv-mangle.h once
-#endif
-
-#define_FENV_MANGLE_H_
-
-#ifndef FENV_MANGLE
-#error FENV_MANGLE is undefined
-#endif
-
-#definefeclearexcept   FENV_MANGLE(feclearexcept)
-#definefegetexceptflag FENV_MANGLE(fegetexceptflag)
-#definefesetexceptflag FENV_MANGLE(fesetexceptflag)
-#defineferaiseexcept   FENV_MANGLE(feraiseexcept)
-#definefetestexceptFENV_MANGLE(fetestexcept)
-#definefegetround  FENV_MANGLE(fegetround)
-#definefesetround  FENV_MANGLE(fesetround)
-#definefegetenvFENV_MANGLE(fegetenv)
-#definefeholdexceptFENV_MANGLE(feholdexcept)
-#definefesetenvFENV_MANGLE(fesetenv)
-#definefeupdateenv FENV_MANGLE(feupdateenv)
-#definefeenableexcept  FENV_MANGLE(feenableexcept)
-#definefedisableexcept FENV_MANGLE(fedisableexcept)
-#definefegetexcept FENV_MANGLE(fegetexcept)
-
diff --git a/newlib/libc/machine/arm/machine/fenv-softfloat.h 
b/newlib/libc/machine/arm/machine/fenv-softfloat.h
deleted file mode 100644
index 5d33e18d0..0
--- a/newlib/libc/machine/arm/machine/fenv-softfloat.h
+++ /dev/null
@@ -1,187 +0,0 @@
- /*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
- *
- * Copyright (c) 2004-2011 David Schultz 
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *notice, this list of conditions and the following disclaimer in the
- *documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED

Re: [PATCH v3] Changed ARM fenv support similar to X86_64

2020-07-18 Thread Eshan Dhawan
On Sat, Jul 18, 2020 at 9:32 PM Gedare Bloom  wrote:

> On Sat, Jul 18, 2020 at 9:39 AM Eshan Dhawan 
> wrote:
> >
> >
> > > On 18-Jul-2020, at 8:51 PM, Sebastian Huber <
> sebastian.hu...@embedded-brains.de> wrote:
> > >
> > > On 18/07/2020 17:17, Eshan Dhawan wrote:
> > >
> > >>>>> On 18-Jul-2020, at 4:52 PM, Sebastian Huber <
> sebastian.hu...@embedded-brains.de> wrote:
> > >>>> Hello Eshan,
> > >>>> you produce a lot of extra work for me. Your patch applies now. But
> it didn't build:
> > >>>> make[9]: *** No rule to make target 'fenv-vfp.c', needed by
> 'lib_a-fenv-vfp.o'.  Stop.
> > >>>> make[9]: *** Waiting for unfinished jobs
> > >>>> make[9]: Leaving directory
> '/build/git-build/b-gcc-10.1.0-arm-rtems5/arm-rtems5/thumb/newlib/libm/machine/arm'
> > >> Fenv-vpf.c file was deleted as well as the declarations were deleted
> from makefile.am
> > >> So it shouldn’t be compiled
> > >> Did you try Remaking the autoconf files after applying the patch ???
> > >> This patch have the autoconf files
> > > I don't want to run autoconf myself to test your patches. Please
> include the build system changes in your patches.
> > Apologies, I will add the autoconf files from future patches.
>
> auto* generated output is included for newlib patches, but not for
> rtems. We don't keep the generated files in our repo.
>
We don't have to send the auto generated files  in the patch sent to newlib
as well
They are generated by the maintainers there.
So ,I forgot to send in rtems version of the patch as well. Apologies.
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH v3] Changed ARM fenv support similar to X86_64

2020-07-18 Thread Eshan Dhawan

> On 18-Jul-2020, at 8:51 PM, Sebastian Huber 
>  wrote:
> 
> On 18/07/2020 17:17, Eshan Dhawan wrote:
> 
>>>>> On 18-Jul-2020, at 4:52 PM, Sebastian Huber 
>>>>>  wrote:
>>>> Hello Eshan,
>>>> you produce a lot of extra work for me. Your patch applies now. But it 
>>>> didn't build:
>>>> make[9]: *** No rule to make target 'fenv-vfp.c', needed by 
>>>> 'lib_a-fenv-vfp.o'.  Stop.
>>>> make[9]: *** Waiting for unfinished jobs
>>>> make[9]: Leaving directory 
>>>> '/build/git-build/b-gcc-10.1.0-arm-rtems5/arm-rtems5/thumb/newlib/libm/machine/arm'
>> Fenv-vpf.c file was deleted as well as the declarations were deleted from 
>> makefile.am
>> So it shouldn’t be compiled
>> Did you try Remaking the autoconf files after applying the patch ???
>> This patch have the autoconf files
> I don't want to run autoconf myself to test your patches. Please include the 
> build system changes in your patches.
Apologies, I will add the autoconf files from future patches.
>>> Why is x86_64mentioned in the commit message? On the mailing list it was 
>>> discussed to use RISC-V as the model. Please improve the commit message in 
>>> general. It should reflect all the problems discussed on the mailing list 
>>> and how the commit addresses the issues.
>> The files follow the similar file structure as x86_64. So I added X86
> Which file did you use as a template?
The softfp Implementation is taken from riscv but has stub implementation 
>>> Attached is a patch which fixes a couple of obvious things. Please apply 
>>> it, review it, test it, and make a v4 patch out of it with an improved 
>>> commit message.
>> The error isn’t supposed to occur
>> I tested the code on machine
>>> <0001-arm-fenv.c-Fix-use-of-defines-and-format.patch>
>> I will apply the patch and test it
>> And resend it
>> Is this patch applied over the current patch
>> Or the newlib master?
> Over your v3 patch.
Ok, I will apply and test them.
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH v3] Changed ARM fenv support similar to X86_64

2020-07-18 Thread Eshan Dhawan

> On 18-Jul-2020, at 4:52 PM, Sebastian Huber 
>  wrote:
> 
> Hello Eshan,
> 
> you produce a lot of extra work for me. Your patch applies now. But it didn't 
> build:
> 
> make[9]: *** No rule to make target 'fenv-vfp.c', needed by 
> 'lib_a-fenv-vfp.o'.  Stop.
> make[9]: *** Waiting for unfinished jobs
> make[9]: Leaving directory 
> '/build/git-build/b-gcc-10.1.0-arm-rtems5/arm-rtems5/thumb/newlib/libm/machine/arm'
Fenv-vpf.c file was deleted as well as the declarations were deleted from 
makefile.am 
So it shouldn’t be compiled 
Did you try Remaking the autoconf files after applying the patch ??? 
This patch have the autoconf files 
> 
> Why is x86_64 mentioned in the commit message? On the mailing list it was 
> discussed to use RISC-V as the model. Please improve the commit message in 
> general. It should reflect all the problems discussed on the mailing list and 
> how the commit addresses the issues.
The files follow the similar file structure as x86_64. So I added X86
> 
> Attached is a patch which fixes a couple of obvious things. Please apply it, 
> review it, test it, and make a v4 patch out of it with an improved commit 
> message.
The error isn’t supposed to occur 
I tested the code on machine 
> <0001-arm-fenv.c-Fix-use-of-defines-and-format.patch>
I will apply the patch and test it 
And resend it 
Is this patch applied over the current patch 
Or the newlib master?
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

[PATCH v3] Changed ARM fenv support similar to X86_64

2020-07-17 Thread Eshan dhawan
Removed soft float files

Signed-off-by: Eshan dhawan 
---
 newlib/libc/machine/arm/machine/fenv-mangle.h |  53 ---
 .../libc/machine/arm/machine/fenv-softfloat.h | 187 ---
 newlib/libc/machine/arm/machine/fenv-vfp.h| 187 ---
 newlib/libc/machine/arm/sys/fenv.h|  19 +-
 newlib/libm/machine/arm/Makefile.am   |   4 +-
 newlib/libm/machine/arm/fenv-softfp.c |  32 --
 newlib/libm/machine/arm/fenv-vfp.c|  32 --
 newlib/libm/machine/arm/fenv.c| 315 +++---
 8 files changed, 127 insertions(+), 702 deletions(-)
 delete mode 100644 newlib/libc/machine/arm/machine/fenv-mangle.h
 delete mode 100644 newlib/libc/machine/arm/machine/fenv-softfloat.h
 delete mode 100644 newlib/libc/machine/arm/machine/fenv-vfp.h
 delete mode 100644 newlib/libm/machine/arm/fenv-softfp.c
 delete mode 100644 newlib/libm/machine/arm/fenv-vfp.c

diff --git a/newlib/libc/machine/arm/machine/fenv-mangle.h 
b/newlib/libc/machine/arm/machine/fenv-mangle.h
deleted file mode 100644
index 476f7b20c..0
--- a/newlib/libc/machine/arm/machine/fenv-mangle.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*-
- * Copyright (c) 2013 Andrew Turner 
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *notice, this list of conditions and the following disclaimer in the
- *documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-#ifdef _FENV_MANGLE_H_
-#error Only include fenv-mangle.h once
-#endif
-
-#define_FENV_MANGLE_H_
-
-#ifndef FENV_MANGLE
-#error FENV_MANGLE is undefined
-#endif
-
-#definefeclearexcept   FENV_MANGLE(feclearexcept)
-#definefegetexceptflag FENV_MANGLE(fegetexceptflag)
-#definefesetexceptflag FENV_MANGLE(fesetexceptflag)
-#defineferaiseexcept   FENV_MANGLE(feraiseexcept)
-#definefetestexceptFENV_MANGLE(fetestexcept)
-#definefegetround  FENV_MANGLE(fegetround)
-#definefesetround  FENV_MANGLE(fesetround)
-#definefegetenvFENV_MANGLE(fegetenv)
-#definefeholdexceptFENV_MANGLE(feholdexcept)
-#definefesetenvFENV_MANGLE(fesetenv)
-#definefeupdateenv FENV_MANGLE(feupdateenv)
-#definefeenableexcept  FENV_MANGLE(feenableexcept)
-#definefedisableexcept FENV_MANGLE(fedisableexcept)
-#definefegetexcept FENV_MANGLE(fegetexcept)
-
diff --git a/newlib/libc/machine/arm/machine/fenv-softfloat.h 
b/newlib/libc/machine/arm/machine/fenv-softfloat.h
deleted file mode 100644
index 5d33e18d0..0
--- a/newlib/libc/machine/arm/machine/fenv-softfloat.h
+++ /dev/null
@@ -1,187 +0,0 @@
- /*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
- *
- * Copyright (c) 2004-2011 David Schultz 
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *notice, this list of conditions and the following disclaimer in the
- *documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED

Re: [PATCH] Change ARM fenv support similar to x86_64

2020-07-17 Thread Eshan Dhawan
On Sat, Jul 18, 2020 at 2:36 AM Sebastian Huber <
sebastian.hu...@embedded-brains.de> wrote:

> On 17/07/2020 22:56, Eshan dhawan wrote:
>
> > +#ifdef __ARM_PCS_VFP
>
> Why do you use this define an not
>
> #ifndef __SOFTFP__
>
> like glibc?
>
OK :)
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH] Change ARM fenv support similar to x86_64

2020-07-17 Thread Eshan Dhawan
Hello everyone,
This is the version 2 of the previous arm fenv patch
apologies, I forgot to add the -v2 in the git send mail

-Eshan

On Sat, Jul 18, 2020 at 2:26 AM Eshan dhawan 
wrote:

> All the extra files have been removed
>
> Signed-off-by: Eshan dhawan 
> ---
>  newlib/libc/machine/arm/machine/fenv-mangle.h |  53 ---
>  .../libc/machine/arm/machine/fenv-softfloat.h | 187 ---
>  newlib/libc/machine/arm/machine/fenv-vfp.h| 187 ---
>  newlib/libc/machine/arm/sys/fenv.h|  19 +-
>  newlib/libm/machine/arm/Makefile.am   |   4 +-
>  newlib/libm/machine/arm/fenv-softfp.c |  32 --
>  newlib/libm/machine/arm/fenv-vfp.c|  32 --
>  newlib/libm/machine/arm/fenv.c| 315 +++---
>  8 files changed, 127 insertions(+), 702 deletions(-)
>  delete mode 100644 newlib/libc/machine/arm/machine/fenv-mangle.h
>  delete mode 100644 newlib/libc/machine/arm/machine/fenv-softfloat.h
>  delete mode 100644 newlib/libc/machine/arm/machine/fenv-vfp.h
>  delete mode 100644 newlib/libm/machine/arm/fenv-softfp.c
>  delete mode 100644 newlib/libm/machine/arm/fenv-vfp.c
>
> diff --git a/newlib/libc/machine/arm/machine/fenv-mangle.h
> b/newlib/libc/machine/arm/machine/fenv-mangle.h
> deleted file mode 100644
> index 476f7b20c..0
> --- a/newlib/libc/machine/arm/machine/fenv-mangle.h
> +++ /dev/null
> @@ -1,53 +0,0 @@
> -/*-
> - * Copyright (c) 2013 Andrew Turner 
> - * All rights reserved.
> - *
> - * Redistribution and use in source and binary forms, with or without
> - * modification, are permitted provided that the following conditions
> - * are met:
> - * 1. Redistributions of source code must retain the above copyright
> - *notice, this list of conditions and the following disclaimer.
> - * 2. Redistributions in binary form must reproduce the above copyright
> - *notice, this list of conditions and the following disclaimer in the
> - *documentation and/or other materials provided with the distribution.
> - *
> - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
> - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
> - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
> PURPOSE
> - * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
> - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
> CONSEQUENTIAL
> - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
> - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
> - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
> STRICT
> - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
> WAY
> - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
> - * SUCH DAMAGE.
> - *
> - * $FreeBSD$
> - */
> -
> -#ifdef _FENV_MANGLE_H_
> -#error Only include fenv-mangle.h once
> -#endif
> -
> -#define_FENV_MANGLE_H_
> -
> -#ifndef FENV_MANGLE
> -#error FENV_MANGLE is undefined
> -#endif
> -
> -#definefeclearexcept   FENV_MANGLE(feclearexcept)
> -#definefegetexceptflag FENV_MANGLE(fegetexceptflag)
> -#definefesetexceptflag FENV_MANGLE(fesetexceptflag)
> -#defineferaiseexcept   FENV_MANGLE(feraiseexcept)
> -#definefetestexceptFENV_MANGLE(fetestexcept)
> -#definefegetround  FENV_MANGLE(fegetround)
> -#definefesetround  FENV_MANGLE(fesetround)
> -#definefegetenvFENV_MANGLE(fegetenv)
> -#definefeholdexceptFENV_MANGLE(feholdexcept)
> -#definefesetenvFENV_MANGLE(fesetenv)
> -#definefeupdateenv FENV_MANGLE(feupdateenv)
> -#definefeenableexcept  FENV_MANGLE(feenableexcept)
> -#definefedisableexcept FENV_MANGLE(fedisableexcept)
> -#definefegetexcept FENV_MANGLE(fegetexcept)
> -
> diff --git a/newlib/libc/machine/arm/machine/fenv-softfloat.h
> b/newlib/libc/machine/arm/machine/fenv-softfloat.h
> deleted file mode 100644
> index 5d33e18d0..0
> --- a/newlib/libc/machine/arm/machine/fenv-softfloat.h
> +++ /dev/null
> @@ -1,187 +0,0 @@
> - /*-
> - * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
> - *
> - * Copyright (c) 2004-2011 David Schultz 
> - * All rights reserved.
> - *
> - * Redistribution and use in source and binary forms, with or without
> - * modification, are permitted provided that the following conditions
> - * are met:
> - * 1. Redistributions of source code must retain the above copyright
> - *notice, this list of conditions and the following disclaimer.
> - * 2. Redistributions in binary form must reproduce the above copyright

[PATCH] Change ARM fenv support similar to x86_64

2020-07-17 Thread Eshan dhawan
All the extra files have been removed

Signed-off-by: Eshan dhawan 
---
 newlib/libc/machine/arm/machine/fenv-mangle.h |  53 ---
 .../libc/machine/arm/machine/fenv-softfloat.h | 187 ---
 newlib/libc/machine/arm/machine/fenv-vfp.h| 187 ---
 newlib/libc/machine/arm/sys/fenv.h|  19 +-
 newlib/libm/machine/arm/Makefile.am   |   4 +-
 newlib/libm/machine/arm/fenv-softfp.c |  32 --
 newlib/libm/machine/arm/fenv-vfp.c|  32 --
 newlib/libm/machine/arm/fenv.c| 315 +++---
 8 files changed, 127 insertions(+), 702 deletions(-)
 delete mode 100644 newlib/libc/machine/arm/machine/fenv-mangle.h
 delete mode 100644 newlib/libc/machine/arm/machine/fenv-softfloat.h
 delete mode 100644 newlib/libc/machine/arm/machine/fenv-vfp.h
 delete mode 100644 newlib/libm/machine/arm/fenv-softfp.c
 delete mode 100644 newlib/libm/machine/arm/fenv-vfp.c

diff --git a/newlib/libc/machine/arm/machine/fenv-mangle.h 
b/newlib/libc/machine/arm/machine/fenv-mangle.h
deleted file mode 100644
index 476f7b20c..0
--- a/newlib/libc/machine/arm/machine/fenv-mangle.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*-
- * Copyright (c) 2013 Andrew Turner 
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *notice, this list of conditions and the following disclaimer in the
- *documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-#ifdef _FENV_MANGLE_H_
-#error Only include fenv-mangle.h once
-#endif
-
-#define_FENV_MANGLE_H_
-
-#ifndef FENV_MANGLE
-#error FENV_MANGLE is undefined
-#endif
-
-#definefeclearexcept   FENV_MANGLE(feclearexcept)
-#definefegetexceptflag FENV_MANGLE(fegetexceptflag)
-#definefesetexceptflag FENV_MANGLE(fesetexceptflag)
-#defineferaiseexcept   FENV_MANGLE(feraiseexcept)
-#definefetestexceptFENV_MANGLE(fetestexcept)
-#definefegetround  FENV_MANGLE(fegetround)
-#definefesetround  FENV_MANGLE(fesetround)
-#definefegetenvFENV_MANGLE(fegetenv)
-#definefeholdexceptFENV_MANGLE(feholdexcept)
-#definefesetenvFENV_MANGLE(fesetenv)
-#definefeupdateenv FENV_MANGLE(feupdateenv)
-#definefeenableexcept  FENV_MANGLE(feenableexcept)
-#definefedisableexcept FENV_MANGLE(fedisableexcept)
-#definefegetexcept FENV_MANGLE(fegetexcept)
-
diff --git a/newlib/libc/machine/arm/machine/fenv-softfloat.h 
b/newlib/libc/machine/arm/machine/fenv-softfloat.h
deleted file mode 100644
index 5d33e18d0..0
--- a/newlib/libc/machine/arm/machine/fenv-softfloat.h
+++ /dev/null
@@ -1,187 +0,0 @@
- /*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
- *
- * Copyright (c) 2004-2011 David Schultz 
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *notice, this list of conditions and the following disclaimer in the
- *documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION

Re: [PATCH] removed SOFTFP fenv support from ARM

2020-07-17 Thread Eshan Dhawan

> On 17-Jul-2020, at 10:40 AM, Sebastian Huber 
>  wrote:
> 
> On 17/07/2020 01:23, Eshan dhawan wrote:
> 
>>  int fegetexcept(void)
>>  {
>> -int __unmasked;
>>  -__unmasked = 0;
>>  #ifndef SOFTFP_ABI
> 
> Do we need this extra define, can't we use
> 
> #ifndef __SOFTFP__
> 
> like in glibc?

“Paradoxically,the -mfloat-abi=softfp does not set the __SOFTFP___ macro, since 
it selects real floating point instructions using the soft-float ABI at 
function-call interfaces.” 

So SOFTFP_ABI is defined. :)
You can read more here : 
https://wiki.debian.org/ArmEabiPort#:~:text=__VFP_FP__%20means%20that,and%20is%20always%20little%2Dendian
Under “ GCC preprocessor macros for floating point ”

-Eshan
> 
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

[PATCH] removed SOFTFP fenv support from ARM

2020-07-16 Thread Eshan dhawan
This patch changes the current ARM fenv support
similar to that in X86_64

Signed-off-by: Eshan dhawan 
---
 newlib/libc/machine/arm/machine/fenv-mangle.h |  53 
 .../libc/machine/arm/machine/fenv-softfloat.h | 187 
 newlib/libc/machine/arm/machine/fenv-vfp.h| 187 
 newlib/libc/machine/arm/sys/fenv.h|  19 +-
 newlib/libm/machine/arm/Makefile.am   |   4 +-
 newlib/libm/machine/arm/fenv-softfp.c |  32 ---
 newlib/libm/machine/arm/fenv-vfp.c|  37 ---
 newlib/libm/machine/arm/fenv.c| 268 +++---
 8 files changed, 100 insertions(+), 687 deletions(-)
 delete mode 100644 newlib/libc/machine/arm/machine/fenv-mangle.h
 delete mode 100644 newlib/libc/machine/arm/machine/fenv-softfloat.h
 delete mode 100644 newlib/libc/machine/arm/machine/fenv-vfp.h
 delete mode 100644 newlib/libm/machine/arm/fenv-softfp.c
 delete mode 100644 newlib/libm/machine/arm/fenv-vfp.c

diff --git a/newlib/libc/machine/arm/machine/fenv-mangle.h 
b/newlib/libc/machine/arm/machine/fenv-mangle.h
deleted file mode 100644
index 476f7b20c..0
--- a/newlib/libc/machine/arm/machine/fenv-mangle.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*-
- * Copyright (c) 2013 Andrew Turner 
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *notice, this list of conditions and the following disclaimer in the
- *documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-#ifdef _FENV_MANGLE_H_
-#error Only include fenv-mangle.h once
-#endif
-
-#define_FENV_MANGLE_H_
-
-#ifndef FENV_MANGLE
-#error FENV_MANGLE is undefined
-#endif
-
-#definefeclearexcept   FENV_MANGLE(feclearexcept)
-#definefegetexceptflag FENV_MANGLE(fegetexceptflag)
-#definefesetexceptflag FENV_MANGLE(fesetexceptflag)
-#defineferaiseexcept   FENV_MANGLE(feraiseexcept)
-#definefetestexceptFENV_MANGLE(fetestexcept)
-#definefegetround  FENV_MANGLE(fegetround)
-#definefesetround  FENV_MANGLE(fesetround)
-#definefegetenvFENV_MANGLE(fegetenv)
-#definefeholdexceptFENV_MANGLE(feholdexcept)
-#definefesetenvFENV_MANGLE(fesetenv)
-#definefeupdateenv FENV_MANGLE(feupdateenv)
-#definefeenableexcept  FENV_MANGLE(feenableexcept)
-#definefedisableexcept FENV_MANGLE(fedisableexcept)
-#definefegetexcept FENV_MANGLE(fegetexcept)
-
diff --git a/newlib/libc/machine/arm/machine/fenv-softfloat.h 
b/newlib/libc/machine/arm/machine/fenv-softfloat.h
deleted file mode 100644
index 5d33e18d0..0
--- a/newlib/libc/machine/arm/machine/fenv-softfloat.h
+++ /dev/null
@@ -1,187 +0,0 @@
- /*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
- *
- * Copyright (c) 2004-2011 David Schultz 
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *notice, this list of conditions and the following disclaimer in the
- *documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA

[PATCH 2/2] added the test files for confstr

2020-07-13 Thread Eshan dhawan
closes #3373

Signed-off-by: Eshan dhawan 
---
 libbsd.py |  1 +
 testsuite/confstr/test_main.c | 71 +++
 2 files changed, 72 insertions(+)
 create mode 100644 testsuite/confstr/test_main.c

diff --git a/libbsd.py b/libbsd.py
index 9beba660..581b3aed 100644
--- a/libbsd.py
+++ b/libbsd.py
@@ -5340,6 +5340,7 @@ class tests(builder.Module):
 self.addTest(mm.generator['test']('ipsec01', ['test_main']))
 self.addTest(mm.generator['test']('openssl01', ['test_main']))
 self.addTest(mm.generator['test']('openssl02', ['test_main']))
+self.addTest(mm.generator['test']('confstr', ['test_main']))
 
 def load(mm):
 
diff --git a/testsuite/confstr/test_main.c b/testsuite/confstr/test_main.c
new file mode 100644
index ..b841fa40
--- /dev/null
+++ b/testsuite/confstr/test_main.c
@@ -0,0 +1,71 @@
+/**
+ * @file
+ *
+ * Following methods are tested in this file : Confstr() 
+ */
+
+/*
+ * Copyright (c) 2020 Eshan Dhawan
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+
+#define TEST_NAME "LIBBSD CONFSTR "
+
+static void 
+test_main(void)
+{
+  int r;
+  char * buf ;
+  const char UPE[] = "unsupported programming environment";
+  size_t len1;
+  len1 = strlen(UPE) + 1; 
+  r = confstr(_CS_PATH, buf, sizeof(buf));
+  if (r != 0){
+printf("This Function is not supported");
+  }
+  assert( r == 0 );
+  r = confstr(_CS_POSIX_V6_ILP32_OFFBIG_CFLAGS, buf, sizeof(buf));
+  if ( r != len1 ){
+printf("lenght not matched");
+  }
+  assert(r == len1);
+  
+  exit(0);
+}
+
+#include 
-- 
2.17.1

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH 1/2] Confstr Port for RTEMS

2020-07-13 Thread Eshan dhawan
File added to LIBBSD

Closes #3373
Signed-off-by: Eshan dhawan 
---
 freebsd/lib/libc/gen/confstr.c | 127 +
 libbsd.py  |   1 +
 2 files changed, 128 insertions(+)
 create mode 100644 freebsd/lib/libc/gen/confstr.c

diff --git a/freebsd/lib/libc/gen/confstr.c b/freebsd/lib/libc/gen/confstr.c
new file mode 100644
index ..653f581b
--- /dev/null
+++ b/freebsd/lib/libc/gen/confstr.c
@@ -0,0 +1,127 @@
+/*-
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
+ * Copyright (c) 1993
+ * The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ *may be used to endorse or promote products derived from this software
+ *without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include 
+__SCCSID("@(#)confstr.c8.1 (Berkeley) 6/4/93");
+__FBSDID("$FreeBSD$");
+
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+
+size_t
+confstr(int name, char *buf, size_t len)
+{
+   const char *p;
+   const char UPE[] = "unsupported programming environment";
+
+   switch (name) {
+#ifndef __rtems__
+   case _CS_PATH:
+   p = _PATH_STDPATH;
+   goto docopy;
+#endif
+   /*
+* POSIX/SUS ``Programming Environments'' stuff
+*
+* We don't support more than one programming environment
+* on any platform (yet), so we just return the empty
+* string for the environment we are compiled for,
+* and the string "unsupported programming environment"
+* for anything else.  (The Standard says that if these
+* values are used on a system which does not support
+* this environment -- determined via sysconf() -- then
+* the value we return is unspecified.  So, we return
+* something which will cause obvious breakage.)
+*/
+   case _CS_POSIX_V6_ILP32_OFF32_CFLAGS:
+   case _CS_POSIX_V6_ILP32_OFF32_LDFLAGS:
+   case _CS_POSIX_V6_ILP32_OFF32_LIBS:
+   case _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS:
+   case _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS:
+   case _CS_POSIX_V6_LPBIG_OFFBIG_LIBS:
+   /*
+* These two environments are never supported.
+*/
+   p = UPE;
+   goto docopy;
+
+   case _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS:
+   case _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS:
+   case _CS_POSIX_V6_ILP32_OFFBIG_LIBS:
+#ifndef __rtems__  
+   if (sizeof(long) * CHAR_BIT == 32 &&
+   sizeof(off_t) > sizeof(long))
+   p = "";
+   else
+#endif
+   p = UPE;
+   goto docopy;
+
+   case _CS_POSIX_V6_LP64_OFF64_CFLAGS:
+   case _CS_POSIX_V6_LP64_OFF64_LDFLAGS:
+   case _CS_POSIX_V6_LP64_OFF64_LIBS:
+#ifndef __rtems__
+   if (sizeof(long) * CHAR_BIT >= 64 &&
+   sizeof(void *) * CHAR_BIT >= 64 &&
+   sizeof(int) * CHAR_BIT >= 32 &&
+   sizeof(off_t) >= sizeof(long))
+   p = "";
+   else
+#endif
+   p = UPE;
+   goto docopy;
+#ifndef __rtems__
+   case _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS:
+   /* XXX - should have more complete coverage */
+   if (sizeof(long) * CHAR_BIT >= 64)
+   p = "_POSIX_V6_LP64_OFF64";
+

[PATCH] Tests for pthread_getcpuclockid method. Ticket:3891

2020-07-10 Thread Eshan dhawan
The test wont run as there are no support by clock_gettime

Signed-off-by: Eshan dhawan 
---
 testsuites/psxtests/Makefile.am   |   9 +
 testsuites/psxtests/configure.ac  |   1 +
 testsuites/psxtests/psxgetcpuclockid01/init.c | 204 ++
 .../psxgetcpuclockid01/psxgetcpuclockid01.doc |  23 ++
 .../psxgetcpuclockid01/psxgetcpuclockid01.scn |   4 +
 5 files changed, 241 insertions(+)
 create mode 100644 testsuites/psxtests/psxgetcpuclockid01/init.c
 create mode 100644 
testsuites/psxtests/psxgetcpuclockid01/psxgetcpuclockid01.doc
 create mode 100644 
testsuites/psxtests/psxgetcpuclockid01/psxgetcpuclockid01.scn

diff --git a/testsuites/psxtests/Makefile.am b/testsuites/psxtests/Makefile.am
index 1f9e4233ec..7924bbea5d 100755
--- a/testsuites/psxtests/Makefile.am
+++ b/testsuites/psxtests/Makefile.am
@@ -462,6 +462,15 @@ psxgetattrnp01_CPPFLAGS = $(AM_CPPFLAGS) 
$(TEST_FLAGS_psxgetattrnp01) \
$(support_includes) -I$(top_srcdir)/include
 endif
 
+if TEST_psxgetcpuclockid01
+psx_tests += psxgetcpuclockid01
+psx_screens += psxgetcpuclockid01/psxgetcpuclockid01.scn
+psx_docs += psxgetcpuclockid01/psxgetcpuclockid01.doc
+psxgetcpuclockid01_SOURCES = psxgetcpuclockid01/init.c
+psxgetcpuclockid01_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_FLAGS_psxgetcpuclockid01) \
+   $(support_includes)
+endif
+
 if TEST_psxgetrusage01
 psx_tests += psxgetrusage01
 psx_screens += psxgetrusage01/psxgetrusage01.scn
diff --git a/testsuites/psxtests/configure.ac b/testsuites/psxtests/configure.ac
index 139787cccb..c509086abc 100644
--- a/testsuites/psxtests/configure.ac
+++ b/testsuites/psxtests/configure.ac
@@ -91,6 +91,7 @@ RTEMS_TEST_CHECK([psxfile01])
 RTEMS_TEST_CHECK([psxfile02])
 RTEMS_TEST_CHECK([psxfilelock01])
 RTEMS_TEST_CHECK([psxgetattrnp01])
+RTEMS_TEST_CHECK([psxgetcpuclockid01])
 RTEMS_TEST_CHECK([psxgetrusage01])
 RTEMS_TEST_CHECK([psxglobalcon01])
 RTEMS_TEST_CHECK([psxglobalcon02])
diff --git a/testsuites/psxtests/psxgetcpuclockid01/init.c 
b/testsuites/psxtests/psxgetcpuclockid01/init.c
new file mode 100644
index 00..4977a11290
--- /dev/null
+++ b/testsuites/psxtests/psxgetcpuclockid01/init.c
@@ -0,0 +1,204 @@
+/*
+ *  @file
+ *  @brief Test suite for getcpuclockid methods
+ */
+
+/*
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (C) 2020 embedded brains GmbH, Eshan Dhawan
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include "tmacros.h"
+#include "test_support.h"
+
+const char rtems_test_name[] = "PSXGETCPUCLOCKID 1";
+
+/* Forward declaration to avoid warnings */
+void *POSIX_Init (void * argument);
+void *test_pthread(void *);
+
+static char buffer[512];
+
+static const T_action actions[] = {
+  T_report_hash_sha256,
+  T_check_task_context,
+  T_check_file_descriptors,
+  T_check_rtems_barriers,
+  T_check_rtems_extensions,
+  T_check_rtems_message_queues,
+  T_check_rtems_partitions,
+  T_check_rtems_periods,
+  T_check_rtems_regions,
+  T_check_rtems_semaphores,
+  T_check_rtems_tasks,
+  T_check_rtems_timers,
+  T_check_posix_keys
+};
+
+static const T_config config = {
+  .name = "psxgetcpuclockid1",
+  .buf = buffer,
+  .buf_size = sizeof(buffer),
+  .putchar = rtems_put_char,
+  .verbosity = T_VERBOSE,
+  .now = T_now_clock,
+  .action_count = T_ARRAY_SIZE(actions),
+  .actions = actions
+};
+
+/* test_pthread function begins */
+void *test_pthread(void *arg)
+{
+  int i;
+  /*do something*/
+  for( i = 0; i < 20; i++ );
+
+  pthr

Adding File descriptors to RTEMS

2020-07-10 Thread Eshan Dhawan
Hello everyone,
As a part of my GSOC project I will be adding file descriptors
List of some missing methods :
https://docs.google.com/document/d/1n-JOFUbFn6V1kViAGWsEGbVHL9MxlMyKP0BbZhEA1Rs/edit

Where will be the functions be added?
Also what would be a good starting point :)
-- 
Thanks
- Eshan
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Adding Test for Confstr() to LIBBSD

2020-07-10 Thread Eshan Dhawan
Hello everyone,
I was planning to add test for Confstr() to RTEMS-Libbsd.
In which testsuite the test cases will be added?

I had sent a patch to port confstr to libbsd earlier
Link to the patch :
https://lists.rtems.org/pipermail/devel/2020-June/060235.html

Thanks
- Eshan
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

[PATCH] ftw.h port for newlib

2020-07-09 Thread Eshan dhawan
added _FTW_ENABLE_

Signed-off-by: Eshan dhawan 
---
 newlib/configure.host |   2 +-
 newlib/libc/include/ftw.h |  64 ++
 newlib/libc/posix/Makefile.am |   2 +-
 newlib/libc/posix/ftw.c   |  36 
 newlib/libc/posix/nftw.c  | 154 ++
 5 files changed, 256 insertions(+), 2 deletions(-)
 create mode 100644 newlib/libc/include/ftw.h
 create mode 100644 newlib/libc/posix/ftw.c
 create mode 100644 newlib/libc/posix/nftw.c

diff --git a/newlib/configure.host b/newlib/configure.host
index a84c0c80a..33a3175c7 100644
--- a/newlib/configure.host
+++ b/newlib/configure.host
@@ -661,7 +661,7 @@ case "${host}" in
default_newlib_io_c99_formats="yes"
newlib_cflags="${newlib_cflags} -ffunction-sections -fdata-sections "
newlib_cflags="${newlib_cflags} -D_COMPILING_NEWLIB"
-newlib_cflags="${newlib_cflags} -DCLOCK_PROVIDED -DMALLOC_PROVIDED 
-DEXIT_PROVIDED -DSIGNAL_PROVIDED -DGETREENT_PROVIDED 
-DREENTRANT_SYSCALLS_PROVIDED -DHAVE_NANOSLEEP -DHAVE_BLKSIZE -DHAVE_FCNTL 
-DHAVE_ASSERT_FUNC"
+newlib_cflags="${newlib_cflags} -DCLOCK_PROVIDED -DMALLOC_PROVIDED 
-DEXIT_PROVIDED -DSIGNAL_PROVIDED -DGETREENT_PROVIDED 
-DREENTRANT_SYSCALLS_PROVIDED -DHAVE_NANOSLEEP -DHAVE_BLKSIZE -DHAVE_FCNTL 
-DHAVE_ASSERT_FUNC -D_FTW_ENABLE_"
 # turn off unsupported items in posix directory 
newlib_cflags="${newlib_cflags} -D_NO_GETLOGIN -D_NO_GETPWENT 
-D_NO_GETUT -D_NO_GETPASS -D_NO_SIGSET -D_NO_WORDEXP -D_NO_POPEN 
-D_NO_POSIX_SPAWN"
;;
diff --git a/newlib/libc/include/ftw.h b/newlib/libc/include/ftw.h
new file mode 100644
index 0..f88ce87b2
--- /dev/null
+++ b/newlib/libc/include/ftw.h
@@ -0,0 +1,64 @@
+/*
+* Copyright © 2005-2020 Rich Felker, et al.
+*
+* Permission is hereby granted, free of charge, to any person obtaining
+* a copy of this software and associated documentation files (the
+* "Software"), to deal in the Software without restriction, including
+* without limitation the rights to use, copy, modify, merge, publish,
+* distribute, sublicense, and/or sell copies of the Software, and to
+* permit persons to whom the Software is furnished to do so, subject to
+* the following conditions:
+*
+* The above copyright notice and this permission notice shall be
+* included in all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+*/
+
+#ifndef _FTW_H
+#define_FTW_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include 
+#include 
+
+#define FTW_F   1
+#define FTW_D   2
+#define FTW_DNR 3
+#define FTW_NS  4
+#define FTW_SL  5
+#define FTW_DP  6
+#define FTW_SLN 7
+
+#define FTW_PHYS  1
+#define FTW_MOUNT 2
+#define FTW_CHDIR 4
+#define FTW_DEPTH 8
+
+struct FTW {
+   int base;
+   int level;
+};
+
+int ftw(const char *, int (*)(const char *, const struct stat *, int), int);
+int nftw(const char *, int (*)(const char *, const struct stat *, int, struct 
FTW *), int, int);
+
+#if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE)
+#define ftw64 ftw
+#define nftw64 nftw
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/newlib/libc/posix/Makefile.am b/newlib/libc/posix/Makefile.am
index 6cdee1df0..5a358f782 100644
--- a/newlib/libc/posix/Makefile.am
+++ b/newlib/libc/posix/Makefile.am
@@ -10,7 +10,7 @@ GENERAL_SOURCES = \
opendir.c readdir.c readdir_r.c \
regcomp.c regerror.c regexec.c regfree.c \
rewinddir.c sleep.c usleep.c \
-   telldir.c
+   telldir.c ftw.c nftw.c
 
 ELIX_2_SOURCES = \
 scandir.c seekdir.c
diff --git a/newlib/libc/posix/ftw.c b/newlib/libc/posix/ftw.c
new file mode 100644
index 0..c295fa984
--- /dev/null
+++ b/newlib/libc/posix/ftw.c
@@ -0,0 +1,36 @@
+/*
+* Copyright © 2005-2020 Rich Felker, et al.
+*
+* Permission is hereby granted, free of charge, to any person obtaining
+* a copy of this software and associated documentation files (the
+* "Software"), to deal in the Software without restriction, including
+* without limitation the rights to use, copy, modify, merge, publish,
+* distribute, sublicense, and/or sell copies of the Software, and to
+* permit persons to whom the Software is furnished to do so, subject to
+* the following conditions:
+*
+* The above copyright notice and this permission notice shall be
+* included in all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED "AS IS"

[PATCH] Test suite for FTW.H methods

2020-07-09 Thread Eshan dhawan
It mainly uses nftw to test
as ftw also calls nftw with flag as 0

Signed-off-by: Eshan dhawan 
---
 testsuites/psxtests/Makefile.am   |  26 +++
 testsuites/psxtests/configure.ac  |   1 +
 testsuites/psxtests/psxftw01/init.c   | 204 ++
 testsuites/psxtests/psxftw01/psxftw01.doc |  18 ++
 testsuites/psxtests/psxftw01/psxftw01.scn |  10 ++
 testsuites/psxtests/psxftw01/psxftw01.tar | Bin 0 -> 10240 bytes
 6 files changed, 259 insertions(+)
 create mode 100644 testsuites/psxtests/psxftw01/init.c
 create mode 100644 testsuites/psxtests/psxftw01/psxftw01.doc
 create mode 100644 testsuites/psxtests/psxftw01/psxftw01.scn
 create mode 100644 testsuites/psxtests/psxftw01/psxftw01.tar

diff --git a/testsuites/psxtests/Makefile.am b/testsuites/psxtests/Makefile.am
index 1f9e4233ec..39a6995827 100755
--- a/testsuites/psxtests/Makefile.am
+++ b/testsuites/psxtests/Makefile.am
@@ -453,6 +453,32 @@ psxfilelock01_CPPFLAGS = $(AM_CPPFLAGS) 
$(TEST_FLAGS_psxfilelock01) \
$(support_includes)
 endif
 
+if TEST_psxftw01
+psx_tests += psxftw01
+psx_screens += psxftw01/psxftw01.scn
+psx_docs += psxftw01/psxftw01.doc
+psxftw01_SOURCES = psxftw01/init.c psxfile01/test_cat.c \
+   psxftw01-tar.c psxftw01-tar.h psxftw01-tar-gz.c psxftw01-tar-gz.h
+
+psxftw01_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_FLAGS_psxftw01) \
+   $(support_includes) $(test_includes) -I$(top_srcdir)/include
+psxftw01_LDADD = $(RTEMS_ROOT)cpukit/librtemscpu.a $(RTEMS_ROOT)cpukit/libz.a 
$(LDADD)
+psxftw01-tar.c: psxftw01/psxftw01.tar
+   $(AM_V_GEN)$(BIN2C) -C $< $@
+psxftw01-tar.h: psxftw01/psxftw01.tar
+   $(AM_V_GEN)$(BIN2C) -H $< $@
+psxftw01-tar.o: psxftw01-tar.c psxftw01-tar.h
+psxftw01.tar.gz: psxftw01/psxftw01.tar
+   $(AM_V_GEN)$(GZIP) < $< > $@
+psxftw01-tar-gz.c: psxftw01.tar.gz
+   $(AM_V_GEN)$(BIN2C) -C $< $@
+psxftw01-tar-gz.h: psxftw01.tar.gz
+   $(AM_V_GEN)$(BIN2C) -H $< $@
+CLEANFILES += psxftw01.tar psxftw01-tar.c psxftw01-tar.h \
+   psxftw01.tar.gz psxftw01-tar-gz.c psxftw01-tar-gz.h
+psxftw01/init.c: psxftw01-tar.h psxftw01-tar-gz.h $(TAR01_XZ_H)
+endif
+
 if TEST_psxgetattrnp01
 psx_tests += psxgetattrnp01
 psx_screens += psxgetattrnp01/psxgetattrnp01.scn
diff --git a/testsuites/psxtests/configure.ac b/testsuites/psxtests/configure.ac
index 139787cccb..3f95010cd3 100644
--- a/testsuites/psxtests/configure.ac
+++ b/testsuites/psxtests/configure.ac
@@ -90,6 +90,7 @@ RTEMS_TEST_CHECK([psxfenv01])
 RTEMS_TEST_CHECK([psxfile01])
 RTEMS_TEST_CHECK([psxfile02])
 RTEMS_TEST_CHECK([psxfilelock01])
+RTEMS_TEST_CHECK([psxftw01])
 RTEMS_TEST_CHECK([psxgetattrnp01])
 RTEMS_TEST_CHECK([psxgetrusage01])
 RTEMS_TEST_CHECK([psxglobalcon01])
diff --git a/testsuites/psxtests/psxftw01/init.c 
b/testsuites/psxtests/psxftw01/init.c
new file mode 100644
index 00..8e7e996d10
--- /dev/null
+++ b/testsuites/psxtests/psxftw01/init.c
@@ -0,0 +1,204 @@
+/*
+ *  @file
+ *  @brief Test suite for ftw.h methods
+ */
+
+/*
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (C) 2020 Eshan Dhawan, embedded brains GmbH, Joel Sherrill
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+/* Header files */
+#include  /* for device driver prototypes */
+#include "tmacros.h"
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include "psxftw01-tar.h"
+#include "psxftw01-tar-gz.h"
+
+#define TARFILE_STARTpsxftw01_tar
+#define TARFILE_SIZE psxftw01_tar_size
+#define TARFILE_GZ_START psxftw01_tar_gz
+#

Re: Error in bootstraping RTEMS

2020-07-05 Thread Eshan Dhawan


Sent from my iPhone

> On 05-Jul-2020, at 6:20 PM, Vijay Kumar Banerjee  wrote:
> 
> On Sun, Jul 5, 2020 at 12:40 AM Eshan Dhawan  wrote:
>> 
>> hello everyone,
>> I was bootstrapping my branch and got this error
>> link to the branch : https://github.com/eshandhawan51/rtems/tree/ftw_test
>> It has tests for FTW.H tests
>> error :
>> 120/121: autoreconf: testsuites/libtests/configure.ac
>> Makefile.am:457: error: lib_tests must be set with '=' before using '+='
> Hi Eshan,
> 
> In line 457 of psxtests/Makefile.am [1] you have added psxftw01 to
> lib_tests, it should be added in psx_tests instead. You can look at
> the other tests added in the same Makefile.am as a reference.
> 
Thanks Vijay for the help :) 

-Eshan 

> Best regards,
> Vijay
> 
> [1]: 
> https://github.com/eshandhawan51/rtems/blob/ftw_test/testsuites/psxtests/Makefile.am#L457
> 
>> Makefile.am:458: error: lib_screens must be set with '=' before using '+='
>> Makefile.am:459: error: lib_docs must be set with '=' before using '+='
>> Makefile.am:460: warning: variable 'tar01_SOURCES' is defined but no program 
>> or
>> Makefile.am:460: library has 'tar01' as canonical name (possible typo)
>> Makefile.am:465: warning: variable 'tar01_LDADD' is defined but no program or
>> Makefile.am:465: library has 'tar01' as canonical name (possible typo)
>> autoreconf: automake failed with exit status: 1
>> error: error: autoreconf: autoreconf -i --no-recursive
>> Bootstrap FAILED
>> 
>> --
>> Thanks
>> - Eshan
>> ___
>> devel mailing list
>> devel@rtems.org
>> http://lists.rtems.org/mailman/listinfo/devel
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

  1   2   3   >