Re: [PATCH] newlib: undefine _FORTIFY_SOURCE

Keith Packard <[email protected]>
Newsgroups gmane.comp.lib.newlib
Message-ID <[email protected]>
Mike Frysinger <[email protected]> writes:

> Since newlib isn't prepared to build itself with _FORTIFY_SOURCE, and
> it's not clear if it's even useful, disable it when building the code.

It is useful; I've caught a few library bugs when I turned this on for
picolibc. Fixing newlib to handle -D_FORTIFY_SOURCE could probably start
with the patches I did in picolibc, which mostly just #undef the various
mem and str functions before defining them.

General code:

https://github.com/picolibc/picolibc/commit/c2c593afa60b64bff0a958ad930e0336463db5bf

Arm specific code:

https://github.com/picolibc/picolibc/commit/b3946840fb3a677125bc9232ca93ea7533375188


-- 
-keith
signature.asc (application/pgp-signature, 832 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEw4O3eCVWE9/bQJ2R2yIaaQAAABEFAmGJ59MACgkQ2yIaaQAA
ABGlXRAAgEtJV3mGKKSGTegwmMCxwFcihcsZT5+EiVQ/7JsEAjS4U0Z6igDYqaQa
Hha/7AmQscyWEQKlfSPLfoTpFtIu9QkLqr6yEv/BWj2Jjez4uqI89RtB4Ub+3bDo
7H2gB8bTA03dhYwRNFUGNMBuYiQAnk95WKoczsefBwaVhd/Ad0oUL7SvQd1vj9Jm
rSZFf3Sq1hXEBpH+YLklGKlb0Vw3d6UKQoVJg3H45TaQ0S1kwP387gLu6as10VHu
6EdOOk7ac5l8qf4K7OTis8yPj4zwFuqdn0ZY0JR37XORlgam/Seh6AVNjUMYHY1i
0tjvrW1Eo8SEHmX4s4J/Fr/AlXypTjh3gJZrQpjtmu7nZqPiNQ7dyEw+Z0ABibWt
5o1Gq/5jYzDK4iyvasybQ87ynFnI6803Tz9uaqBh+0fSUPPoLN6zLIv3jYSazDjN
K40lZ/emitvos+7XZrCvTEkATTvSxPyOf9qaR0WvmOrA9tTVa8grIz0VfNuYZjJh
otJqsa8R+pa5NiW89hl2uEaIxousE3f0vMlVJ6yY3KI4DTOcFa+CfLGUeL0Trs3j
e8KCsKPfT6PIOn8R+HtW/I5vtxXX3WtNUU7tNRHutZxQomIjJ6/LauwpJQrBke3Y
qpTMoYalZxij8jks4kPNEh4jSNKZ32zZqRr0Yr+mGPetmaURzIU=
=R+Mn
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.