Hi Zbigniew,
Zbigniew Halas wrote: > I was thinking of that approach as well. The only drawback is that some libm > functions (or rather stubs) are implemented as part of HelenOS POSIX library > and they are required to build some components being part of HelenOS (binutils > at least). These are apparently stubs and there is no reason why math functions should be in the POSIX library. > It could be solved by using proper linking order or by separating libm > functions from POSIX library which will allow to link POSIX library > independently from libm. > If you think it's a proper solution I will do that. I don't think that's the way to do it. Why should we have two different copies of the functions, one working and one non-working? Clearly the stub functions in POSIX library were introduced to allow binutils to build. If you replace them with fully working versions (located elsewhere), there should be no problem. They could live in a math library or in the C library. (There is no reason why math-related functions should live in a separate library, that's jjust a UNIXism). > > I have been busy with other thing and haven't been working on Helenos "> > recently, but now I'm planning to bring my Python port to fully usable > > state. The next thing needed is a math library." Can you elaborate? Is the problem Python (core? optional component?) refusing to compile? compiles but not working properly? "I'm planning to integrate > > openlibm (https://github.com/JuliaLang/openlibm/) with Helenos. > > which is meant to be a standalone math library. It's based on FreeBSD's > > msun library (which is in turn based on Sun's fdlibm). > > As it's standalone it should be easier to port than FreeBSD's msun > > library, > > and actually I managed to build it for ia32 architecture (with a few dirty > > hacks) in not too long time and try it with Python. > > > > What are you thoughts on integrating openlibm into Helenos?" >From licensing point of view it seems okay. I am still very wary of introducing any foreign code in HelenOS (especially for a core component). I am also dubious that it is strictly necessary to get basic Python up and running. For example, why would Bazaar running in Python need a working cos( ) function to work? If it's a build dependency, a stub function would do the trick.... Even if some specific math functionality was needed, I think implementing it from scratch wouldn't be too difficult either. We already have softint and softfloat libraries which provide some of the runtime support needed for basic int and float operations. They may not be perfect, but they do the job. Regards, Jiri
_______________________________________________ HelenOS-devel mailing list [email protected] http://lists.modry.cz/listinfo/helenos-devel
