dev-util/mingw64-runtime: avoid libssp references without -fstack-protector
authorSergei Trofimovich <slyfox@gentoo.org>
Tue, 28 Jan 2020 08:36:43 +0000 (08:36 +0000)
committerSergei Trofimovich <slyfox@gentoo.org>
Tue, 28 Jan 2020 08:37:01 +0000 (08:37 +0000)
commit6f70a8ffce550175305d9e208168af3aed1ae523
tree7dbb4e674b8ceedab055a09bacd12d8353b6dd79
parent503bae323a7670ba9fd9f72a8be0107d6f230110
dev-util/mingw64-runtime: avoid libssp references without -fstack-protector

mingw64-runtime-7.0.0 added basic support of _FORTIFY_SOURCE to harden
strcpy() and memcpy() via __strcpy_chk() __memcpy_chk() similar to glibc.

Unfortunately that imposes a new dependency on every caller that defines
_FORTIFY_SOURCE to link against libssp as minw64-runtime does not provide
__strcpy_chk() and friends. For comparison glibc does provide __strcpy_chk.

To avoid widespread breakage (including build failure of USE=ssp gcc itself)
we enable __strcpy_chk() checks only when -fstack-protector* options are set.

Package-Manager: Portage-2.3.85, Repoman-2.3.20
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
dev-util/mingw64-runtime/files/mingw64-runtime-7.0.0-fortify-only-ssp.patch [new file with mode: 0644]
dev-util/mingw64-runtime/mingw64-runtime-7.0.0-r1.ebuild [new file with mode: 0644]