Issue building libselinux

I updated my core Python this afternoon from 3.10 to 3.11 and that is where the problems started. I need to rebuild some packages that relied on 3.10, only libselinux will not build. I do the following:

yay -Syy libselinux

All goes well until the following errors that I can’t seem to figure out (full log):

cc1: error: LTO support has not been enabled in this configuration
error: command '/usr/local/bin/gcc' failed with exit code 1
make[1]: *** [Makefile:147: pywrap] Error 1
make[1]: Leaving directory '/home/user/.cache/yay/libselinux/src/libselinux-3.5/src'
make: *** [Makefile:56: pywrap] Error 2
==> ERROR: A failure occurred in build().
 -> error making: libselinux-exit status 4
 -> Failed to install the following packages. Manual intervention is required:
libselinux - exit status 4

It looks like I need to enable LTO support, however I can’t seem to figure out how to enable it. Can anyone help me out?