115 MB could be saved in mcode images by not installing gcc and libc6-dev in run_debian.dockerfile. This does however affect the testsuite of ghdl. The following tests fail without gcc:
Saving 115 MB from the mcode image is very tempting. That would make it very minimal, and perfect for CI.
GCC is added to mcode images for co-simulation purposes. When LLVM or GCC backends are used, GHDL can build C sources "internally". This allows providing VHDL sources and C sources, and let GHDL do the magic. With mcode, that's not possible, because it can only interact with pre-built shared libraries. Hence, a C compiler is required for users to convert their co-simulation C/C++ sources into a shared library. Providing it in the runtime image is convenient because it ensures that any image can be used for co-simulation with foreign languages.
We should not force all the users to download GCC, unless they need/want to.
Roadmap
[x] Skip tests in GHDL's testsuite if a C compiler is not available. (ghdl/ghdl#1510)
[x] Create ghdl/cosim:mcode, ghdl/cosim:py and ghdl/cosim:vunit-cocotb for replacing current ghdl/ghdl:-mcode and ghdl/vunit:llvm images.
[ ] Remove GCC from ghdl/run:* images.
[ ] Remove make and curl from ghdl/vunit:* images.
Realated to #32. Specifically https://github.com/ghdl/docker/pull/32#issuecomment-722979057 and https://github.com/ghdl/docker/pull/32#issuecomment-725840960
Background/summary
115 MB could be saved in mcode images by not installing gcc and libc6-dev in run_debian.dockerfile. This does however affect the testsuite of ghdl. The following tests fail without gcc:
Saving 115 MB from the mcode image is very tempting. That would make it very minimal, and perfect for CI.
GCC is added to mcode images for co-simulation purposes. When LLVM or GCC backends are used, GHDL can build C sources "internally". This allows providing VHDL sources and C sources, and let GHDL do the magic. With mcode, that's not possible, because it can only interact with pre-built shared libraries. Hence, a C compiler is required for users to convert their co-simulation C/C++ sources into a shared library. Providing it in the runtime image is convenient because it ensures that any image can be used for co-simulation with foreign languages.
We should not force all the users to download GCC, unless they need/want to.
Roadmap