There’s ben a well-published branch the past few days of a patched GCC 7.2 code-base with the code changes for fending off Spectre while now patches have arrived on the mailing list for Spectre/CVE-2017-5715 of mainline GCC 8…
Source: Phoronix – GCC 8 Patches Posted For Spectre Mitigation