ghdl / docker

Scripts to build and use docker images including GHDL
40 stars 10 forks source link

Remove GCC from run/* images #34

Open LukasVik opened 3 years ago

LukasVik commented 3 years ago

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:

testsuite/gna/bug097
testsuite/gna/issue1226
testsuite/gna/issue1228
testsuite/gna/issue1233
testsuite/gna/issue1256
testsuite/gna/issue1326
testsuite/gna/issue450
testsuite/gna/issue531
testsuite/gna/issue98
testsuite/vpi/vpi001
testsuite/vpi/vpi002
testsuite/vpi/vpi003

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