Sign inSign up

openeuler/gcc

Sponsored OSS

By openeuler

•Updated 26 days ago

Image
0

5.2K

openeuler/gcc repository overview

⁠Quick reference

⁠GCC | openEuler

Current GCC docker images are built on the openEuler⁠. This repository is free to use and exempted from per-user rate limits.

The GNU Compiler Collection includes front ends for C, C++, Objective-C, Fortran, Ada, Go, D, Modula-2, and COBOL as well as libraries for these languages (libstdc++,...). GCC was originally written as the compiler for the GNU operating system.

Learn more about GCC on GCC Website⁠⁠.

The tag of each gcc docker image is consist of the version of gcc and the version of basic image. The details are as follows

TagCurrentlyArchitectures
16.2.0-oe2403sp4⁠gcc 16.2.0 on openEuler 24.03-LTS-SP4amd64, arm64
16.1.0-oe2403sp4⁠gcc 16.1.0 on openEuler 24.03-LTS-SP4amd64, arm64
16.1.0-oe2403sp3⁠gcc 16.1.0 on openEuler 24.03-LTS-SP3amd64, arm64
15.1.0-oe2403sp1⁠GCC 15.1.0 on openEuler 24.03-LTS-SP1amd64, arm64

⁠Usage

In this usage, users can select the corresponding {Tag} based on their requirements.

  • Pull the openeuler/gcc image from docker

    docker pull openeuler/gcc:{Tag}
    
  • Run with an interactive shell

    You can start the container with an interactive shell to run your own code using gcc.

    docker run -it --rm openeuler/gcc:{Tag} bash
    
  • Example: A minimal gcc program

    Create a file named hello.c with the following content:

    // hello.c
    #include <stdio.h>
    
    int main() {
        printf("Hello from GCC %d.%d.%d\n",
               __GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__);
        return 0;
    }
    
  • Compile the program: Use the new version of gcc to compile the program:

    /usr/local/gcc/bin/gcc hello.c -o hello
    
  • Run the program

    $ ./hello
    

⁠Question and answering

If you have any questions or want to use some special features, please submit an issue or a pull request on openeuler-docker-images⁠.

Tag summary

Content type

Image

Digest

sha256:4f8ab439e…

Size

3.8 GB

Last updated

26 days ago

docker pull openeuler/gcc

This week's pulls

Pulls:

25

Last week