Re: Partial libstdc++ Support

Matthijs Kooijman <[email protected]> Tue, 2 Feb 2021 13:27:08 +0100
Newsgroups gmane.comp.hardware.avr.gcc
Message-ID <[email protected]>
Hey John,

> Naturally, much of the C++ standard library isn't remotely suitable for
> AVRs, and should not be supported. However, there are a fair amount of
> features that I believe would work very nicely, and would be worthwhile
> to support.
I've been playing with the same thought for a while and briefly looked
into this.

It's worthwile to note that other embedded targets (notably ARM) seem to
just include the c++ standard libraries that come with gcc which
supports a lot of the useful stuff.

Then, I think avr *could* use the same approach, except that the
convention so far is to just disable the standard library on all avr-gcc
builds. Maybe because there are bugs or things not yet properly
implemented for AVR, but not using the standard library will in itself
lead to more bugs in AVR if you ever try to enable it.

Having said that, I think there have been some people in the past who
tried enabling the gcc c++ standard library for avr, which has indeed
seen some success. I've been meaning to try this as well with the
Arduino-built avr-gcc version or maybe the Debian version, which are the
versions I use most, but haven't found the time so far (probably will
not have time for this in the near future either).

From my previous look into this, I collected some links that might
prove useful. I'll share them here without further comment (I'd have to
look at them again to comment):

 - http://gcc.1065356.n8.nabble.com/avr-freestanding-libstdc-td1710708.html#a1710857
 - https://www.reddit.com/r/cpp/comments/esk2wy/standard_c_library_on_gccs_avr_target/
 - https://patchwork.ozlabs.org/project/gcc/patch/CADfx-VSmfye0Xe7xMWVFZKDZhQbwFcw7RbNYe=6irDJUzPtHzg@mail.gmail.com/
 - https://patches-gcc.linaro.org/patch/9338/
 - https://patches-gcc.linaro.org/patch/9338/
 - http://avr-libstdcxx.gitlab.io/

Gr.

Matthijs
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEMyF3AetYrDfGJ9el6ZMxy91tJYwFAmAZRRkACgkQ6ZMxy91t
JYzR/hAA0JXPa8rQ+RQqvkQKFmmIYQNb1JlLDm7Drb+dwqVOULKHuQ0MwwdV//X+
MzGoYdMah/BSUcm7kvQhnR4STcAT2IM/WP1M73rpn4bQtDcZlEoKtjb7OylkZivI
rJl9TVgRmTGdDD4LRBHpu3kssRaIP5cDo/0kyRjcJWfpXiqaQ21eVkmG+QkmvIZh
3xl5EIZKl2tLOBuO/baYQJyZsIKjj0j50zjkqoot14Y5a08zF83iBCAkUx+b1Zi/
qARbqm41UNyOLr6abvALE+bRfMUIDlMEplRfkHlg76OmulA3pymzcS9S6MHtR01g
C4D3jXc6Nrm69kszBOwSoIn1OvgP4tqRohVOCnvJqMaYes5sVkg3v/PWNNr+E/U/
EwXMApJagrnboKotqCTRV/B+7OGUQQJiNJnnv2Z25fIvo66fQ9VjkU8hIpQ/zWo+
cWzh84YkrPZJeWdw6yQgruAZYunigIqw6/lpw1kJJdahTiUREGmTLFr1z/kKz8uN
dYMTOeKWcqye6+G0OMXleubEZIlL4KuqP6bYKTI0xKrZ8tL87kjb58ShX5QlriUq
gzBL9btfBbinOG2o/9JhxfzboMa2z40I/RfFRw20OeQBxQnzdq7W+UoejJHykBUX
JUnCU18q1gONWWiBZg5zj0B3LsvhFejHul1dUUBU7uDlp5M9oN4=
=AGjZ
-----END PGP SIGNATURE-----