]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
share/mk: Pass -znoexecstack to ld.bfd when linking libraries and programs.
authorJohn Baldwin <jhb@FreeBSD.org>
Thu, 20 Jul 2023 23:36:35 +0000 (16:36 -0700)
committerJohn Baldwin <jhb@FreeBSD.org>
Thu, 20 Jul 2023 23:37:46 +0000 (16:37 -0700)
commit92053e4f8ae5f6659db7a8fae016f46bb5447bf8
tree897c796a09dcf839b2cfce3b58c24ba7edb6e962
parent59dc489a7e034674c3f52c56c95851bf31dc790b
share/mk: Pass -znoexecstack to ld.bfd when linking libraries and programs.

lld assumes -znoexecstack by default whereas ld.bfd still defaults to
-zexecstack in the absence of .note.GNU-stack annotations.  Adding the
flags centrally avoids having to patch various libraries in the tree
as one-offs (e.g. OpenSSL 3 is the current thing generating new
warnings with ld.bfd).

Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D41120
share/mk/bsd.lib.mk
share/mk/bsd.prog.mk