We intend to remove gets() - see PR 228914 and review D12298 https://reviews.freebsd.org/D12298. gcc ports fail to build without gets due to __gets_chk in libssp; on a gets-less system gcc should omit this support from libssp.
A commit references this bug: Author: gerald Date: Sat Sep 1 20:17:46 UTC 2018 New revision: 478722 URL: https://svnweb.freebsd.org/changeset/ports/478722 Log: Disable the build/use of libssp/gets-chk since FreeBSD 12 and later do not feature gets() any longer. PR: 222796, 231066 Differential Revision: https://reviews.freebsd.org/D12298 Changes: head/lang/gcc7/files/patch-gets-no-more
I reported the situation around GCC upstream, which did not lead to a code change yet. Thus I'm moving forward to patch important lang/gcc* ports -- initially lang/gcc7 as the default, next lang/gcc8 as the future default, and lang/gcc9-devel -- still hoping for some updates to come in upstream. The following I plan to leave as is, and mark as BROKEN on FreeBSD 12 when it comes to that - older versions of GCC, and - devel versions that are actively maintained upstream still and feature a stable sibling that tracks the same release branch. Users should hardly need those, let alone in combination with FreeBSD 12, and I'm hoping for the -devel ports to be ready when FreeBSD 12 goes live for real.
A commit references this bug: Author: gerald Date: Sun Sep 2 00:08:51 UTC 2018 New revision: 478752 URL: https://svnweb.freebsd.org/changeset/ports/478752 Log: Forward port r478722 | gerald | 2018-09-01 from lang/gcc7: Disable the build/use of libssp/gets-chk since FreeBSD 12 and later do not feature gets() any longer. PR: 222796, 231066 Differential Revision: https://reviews.freebsd.org/D12298 Changes: head/lang/gcc8/files/patch-gets-no-more
A commit references this bug: Author: gerald Date: Sat Sep 8 08:16:55 UTC 2018 New revision: 479233 URL: https://svnweb.freebsd.org/changeset/ports/479233 Log: Forward port r478722 | gerald | 2018-09-01 from lang/gcc7: Disable the build/use of libssp/gets-chk since FreeBSD 12 and later do not feature gets() any longer. (I was planning to make this part of a routine update, alas last week's snapshot was broken on i386-unknown-freebsd10.x and so will this week's still.) PR: 222796, 231066 Differential Revision: https://reviews.freebsd.org/D12298 Changes: head/lang/gcc9-devel/files/patch-gets-no-more
A commit references this bug: Author: gerald Date: Sun Sep 30 07:35:17 UTC 2018 New revision: 480939 URL: https://svnweb.freebsd.org/changeset/ports/480939 Log: Recommend the use of GCC 7 or later over this port, since that is now the default version of GCC for the Ports Collection. And backport r478722 | gerald | 2018-09-01 from lang/gcc7: [1] Disable the build/use of libssp/gets-chk since FreeBSD 12 and later do not feature gets() any longer. PR: 222796, 231066 [1] Differential Revision: https://reviews.freebsd.org/D12298 [1] Changes: head/lang/gcc5/Makefile head/lang/gcc5/files/patch-gets-no-more
I believe sufficiently many of the lang/gcc* ports have now been patches to be able to close this report, namely all that should be relevant for regular use. (I'll still see that we hopefully can get this addressed upstream as well, which should then flow back into the -devel ports and obviate the need for local patches.)