On Mon, 2022-06-20 at 09:31 +0100, david allan finch
wrote:> Is there an rpm of GCC 12 (or at least higher than 9) available to
> download and install, or is it a case of downloading and build from the
> source yourself?
>
That's what Software Collections is for.
https://www.softwarecollections.org/
Specifically you need one of the devtoolset collections - it goes up to
11 which, unsurprisingly, provides gcc-11 on CentOS 7. So:
# yum install centos-release-scl
# yum install devtoolset-11
# scl enable devtoolset-11 bash
and gives:
# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/opt/rh/devtoolset-11/root/usr/libexec/gcc/x86_64-redhat-linux/11/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --enable-bootstrap
--enable-languages=c,c++,fortran,lto --prefix=/opt/rh/devtoolset-11/root/usr
--mandir=/opt/rh/devtoolset-11/root/usr/share/man
--infodir=/opt/rh/devtoolset-11/root/usr/share/info
--with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared
--enable-threads=posix --enable-checking=release --enable-multilib
--with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions
--enable-gnu-unique-object --enable-linker-build-id
--with-gcc-major-version-only --with-linker-hash-style=gnu
--with-default-libstdcxx-abi=gcc4-compatible --enable-plugin
--enable-initfini-array
--with-isl=/builddir/build/BUILD/gcc-11.2.1-20210728/obj-x86_64-redhat-linux/isl-install
--enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64
--build=x86_64-redhat-linux
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 11.2.1 20210728 (Red Hat 11.2.1-1) (GCC)
P.