Code Monkey home page Code Monkey logo

Comments (18)

pfalcon avatar pfalcon commented on May 28, 2024

@galak, I believe I heard about issue this issue with different newlib version, and here it hits again.

from sdk-ng.

pabigot avatar pabigot commented on May 28, 2024

Recording for posterity: Some research indicates that xtensa uses a custom newlib that was forked from newlib 2.0.0 around 2014-10-26 and has been unchanged since 2015-04-08. Updating to newlib 3.1.0 as used in the other targets seems unlikely.

I agree this is annoying as it requires special case code in Zephyr just to accommodate this platform, and has caused strife in reviews of zephyrproject-rtos/zephyr#16626. I suspect it will stay this way as long as xtensa is a supported platform.

from sdk-ng.

pfalcon avatar pfalcon commented on May 28, 2024

@pabigot, as you did the research, perhaps you could elaborate on some points:

xtensa uses a custom newlib that was forked

Going from passive voice to active, who forked it? And where exactly? And what kind of "xtensa" is that which uses a custom newlib? (E.g., I hack xtensa in my own free time, and don't use any outdated forked newlib's.)

Updating to newlib 3.1.0 as used in the other targets seems unlikely.

For comparison, we have "minlibc" kind of libc in Zephyr, which doesn't have any custom xtensa version. Of course, that's a bit contrived example, as minlibc doesn't do anything which would require platform dependence. But some guys like @nashif, in addition (or "in replacement" is what they have in mind?) to 2 libc's we already have, want to bring 3rd: zephyrproject-rtos/zephyr#16451 (comment) . That also would not have any purposely outdated xtensa variant, or mixing up this 3rd one into the picture would be totally wrong IMHO.

seems unlikely.

Bottom line, that's fine. We just need to accept the fact Zephyr has very wide scope, and different subsystems are supported to a different extent for different targets. Here, the talk is that Xtensa target in its current shape is not ready for POSIX subsystem support. If we can't fix it now, we can remove it from CI for that subsystem. Again, "now". This can, and hopefully will, change later. But currently, need to workaround targets like Xtensa is detrimental to the further development of POSIX subsys (which needs a lot of work itself).

from sdk-ng.

pabigot avatar pabigot commented on May 28, 2024

Zephyr is using https://github.com/jcmvbkbc/newlib-xtensa.

I can't comment on alternative approaches or the potential of a standard newlib on xtensa.

from sdk-ng.

pfalcon avatar pfalcon commented on May 28, 2024

Zephyr is using https://github.com/jcmvbkbc/newlib-xtensa.

Oh, then it should be easy to ask first-hand. Hey @jcmvbkbc, do you still work on Xtensa? Any comments on the concerns expressed above? (That your fork of newlib is rather outdated; is it really the case no/not enough things were submitted upstream?) Thanks.

from sdk-ng.

nashif avatar nashif commented on May 28, 2024

see jcmvbkbc/newlib-xtensa#5

from sdk-ng.

pfalcon avatar pfalcon commented on May 28, 2024

see jcmvbkbc/newlib-xtensa#5

So, the picture is now clear: Xtensa couldn't be supported in Zephyr beyond minlibc. However, an old fork was found, which kinda allowed to support newlibc somewhat. Well, more thorough use leads to issues. So, looking towards proposing to TSC to do the needful on a next case Xtensa poses an issue to POSIX subsys maintenance. (So far, we have 2 workarounds, which wasn't that bad, but one is still not merged, even though 2nd is exactly the same as 1st.)

from sdk-ng.

pabigot avatar pabigot commented on May 28, 2024

newlib 3.1.0 has some xtensa stuff, but the sdk build breaks because it's not a supported CPU.

from sdk-ng.

jcmvbkbc avatar jcmvbkbc commented on May 28, 2024

Any comments on the concerns expressed above? (That your fork of newlib is rather outdated; is it really the case no/not enough things were submitted upstream?)

That's true. I haven't touched it in a while. I guess I can update it to the most recent newlib and attempt to submit it upstream.

from sdk-ng.

nashif avatar nashif commented on May 28, 2024

I guess I can update it to the most recent newlib and attempt to submit it upstream.

@jcmvbkbc that would be great, thanks. We can help with the testing.

from sdk-ng.

galak avatar galak commented on May 28, 2024

@jcmvbkbc that would be great, thanks. We can help with the testing.

@jcmvbkbc any updates on updating newlib for xtensa?

from sdk-ng.

galak avatar galak commented on May 28, 2024

@jcmvbkbc any updates on this?

from sdk-ng.

jcmvbkbc avatar jcmvbkbc commented on May 28, 2024

@galak it's in progress. I expect to publish updated version/start upstreaming it later this month.

from sdk-ng.

galak avatar galak commented on May 28, 2024

@galak it's in progress. I expect to publish updated version/start upstreaming it later this month.

@jcmvbkbc Great to hear, thanks for the update!

from sdk-ng.

galak avatar galak commented on May 28, 2024

@jcmvbkbc just touching base to see if any progress on the newlib update. thanks.

from sdk-ng.

galak avatar galak commented on May 28, 2024

@jcmvbkbc any updates on newer newlib?

from sdk-ng.

galak avatar galak commented on May 28, 2024

Closing is newlib is now in sync for Zephyr SDK across all SDK variants including xtensa.

from sdk-ng.

pfalcon avatar pfalcon commented on May 28, 2024

Great news!

from sdk-ng.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.