ホーム > Home (English) > System > Genkai > Genkai Software > GNU Compiler Collection

GNU Compiler Collection

The GNU Compiler Collection is a set of compilers for C, C++, Fortran, and other programming languages developed and distributed by the GNU Project.

Usage

GNU Compiler Collection version 8.5.0 is available on the login node and compute nodes. No module command is needed to use it.

Version 12.2.1 is also available by loading the gcc-toolset module.

# gcc 8.5.0 is available by default
[ku40000105@genkai0002 ~]$ module list
No Modulefiles Currently Loaded.
[ku40000105@genkai0002 ~]$ which gcc
/usr/bin/gcc
[ku40000105@genkai0002 ~]$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/8/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-redhat-linux
Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,lto
 --prefix=/usr --mandir=/usr/share/man --infodir=
 /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 --enable-plugin
   --enable-initfini-array --with-isl --disable-libmpx --enable-offload-targets=nvptx-none --without-cuda-driver --enable-gnu-indirect-function
    --enable-cet --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
Thread model: posix
gcc version 8.5.0 20210514 (Red Hat 8.5.0-18) (GCC)
# Load gcc-toolset (gcc-toolset/12) module to make gcc 12.2.1 available
[ku40000105@genkai0002 ~]$ module load gcc-toolset
[ku40000105@genkai0002 ~]$ module list
Currently Loaded Modulefiles:
 1) gcc-toolset/12
[ku40000105@genkai0002 ~]$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/opt/rh/gcc-toolset-12/root/usr/libexec/gcc/x86_64-redhat-linux/12/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-redhat-linux
Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,lto
 --prefix=/opt/rh/gcc-toolset-12/root/usr --mandir=/opt/rh/gcc-toolset-12/root/usr/share/man
  --infodir=/opt/rh/gcc-toolset-12/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 --enable-libstdcxx-backtrace
     --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl=
     /builddir/build/BUILD/gcc-12.2.1-20221121/obj-x86_64-redhat-linux/isl-install --enable-offload-targets=nvptx-none --without-cuda-driver
      --enable-offload-defaulted --enable-gnu-indirect-function --enable-cet --with-tune=generic --with-arch_32=
      x86-64 --build=x86_64-redhat-linux
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.2.1 20221121 (Red Hat 12.2.1-7) (GCC)
[ku40000105@genkai0002 ~]$ which gcc
/opt/rh/gcc-toolset-12/root/usr/bin/gcc