Den ons. 4. dec. 2019 kl. 22.43 skrev Jonathan Wakely <jwak...@redhat.com>:
>
> On 03/12/19 23:38 +0100, Paul M. Bendixen wrote:
> >Hello
> >I've made an implementation of P0829 and tested it with gcc for avr.
>
> This is great, thanks!
>
> What's the status of libstdc++ for AVR? If I understand correctly, it
> doesn't build by default when GCC is configured for AVR. Are you
> overriding that, or just copying the headers somewhere and including
> them in your programs?
>
The status is that it isn't built by default for AVR. I use the method described
in "Real time C++" by Christopher Kormanyos and modified it a bit.

I have a docker image that is built as part of CI at
https://gitlab.com/avr-libstdcxx/avr-libstdcxx-docker that describes
the build process.
I use avrlibc instead of newlib and it seems to work well.

> >I've included the patch and I believe it might need some modification.
> >Should I rather just maintain my own fork until P0829 is a bit
> >further? (It is currently being split into smaller proposals).
>
> Yes, I think it's too early to actually make this change. Our current
> !_GLIBCXX_HOSTED build conforms to the requirements of a freestanding
> implementation (for anything from C++98 to C++17) so I'd prefer not to
> mess with that drastically until the P0829 work has made more
> progress. Despite that, I'm very happy to see somebody take on the
> task, and will be glad to apply a patch like this when the time is
> right.
>
I also considered using another macro ( such as _P0829_FREESTANDING )
so that it might be added directly. I will try to keep the branch up to date
with regards to the current proposal.
If anyone else is interested, the code is at:
https://gitlab.com/avr-libstdcxx/

> >I have not included further tests, nor actually run the tests since
> >everything is in header files is only includes of already existing
> >libstdc++ code.
>
> If we were serious about improving our freestanding support, we'd need
> to partition the testsuite into the parts that should pass for
> freestanding, and mark all the other tests UNSUPPORTED. That would
> mean we could run tests for a freestanding build and not get thousands
> of failures for tests that are not expected to work for freestanding.
> That would be a big project though.
>
> Your patch is mostly just adding #if in various places, not adding new
> code, and so I'm not sure it needs a copyright assignment (the changes
> probably aren't copyrightable anyway). But if you plan to contribute
> to GCC it would be good to get an assignment in place (if you don't
> have one already). See https://gcc.gnu.org/contribute.html#legal for
> more information, and feel free to contact me directly if you have any
> questions or if you want to start the process.
>
> Thanks again for the patch. Please do keep working on it as the P0829
> work evolves, so that we can integrate it with libstdc++ at some
> point.
>

Thank you, I will


-- 
• − − •/• −/• • −/• − • •/− • • •/•/− •/− • •/• •/− • • −/•/− •/• − −
•− •/− − •/− −/• −/• •/• − • •/• − • − • −/− • − •/− − −/− −//

Reply via email to