Skip to content

Instantly share code, notes, and snippets.

@eine
Last active April 17, 2019 11:44
Show Gist options
  • Save eine/acb5a3d14c303527ee1e5b309bffe181 to your computer and use it in GitHub Desktop.
Save eine/acb5a3d14c303527ee1e5b309bffe181 to your computer and use it in GitHub Desktop.
#docker run --rm -it debian:stretch-slim bash -c "$(cat ./ghdl_stretch-gcc.sh)"
set -e
apt-get update -qq \
&& apt-get install -y curl gnat gcc g++ make zlib1g-dev lbzip2 flex autogen dejagnu texinfo \
&& mkdir gcc-srcs \
&& curl -L https://github.com/gcc-mirror/gcc/archive/gcc-7_2_0-release.tar.gz | tar -xz -C gcc-srcs --strip-components=1 \
&& cd gcc-srcs \
&& ./contrib/download_prerequisites \
&& cd .. \
&& mkdir ghdl \
&& curl -L https://github.com/tgingold/ghdl/archive/v0.35.tar.gz | tar -xz -C ghdl --strip-components=1 \
&& cd ghdl \
&& mkdir build; cd build \
&& ../configure --with-gcc=../../gcc-srcs --prefix="/opt/ghdl" \
&& make copy-sources \
&& mkdir gcc-objs; cd gcc-objs \
&& mkdir /install-ghdl \
&& ../../../gcc-srcs/configure --prefix="/opt/ghdl" --enable-languages=c,vhdl --disable-bootstrap --disable-lto --disable-multilib --disable-libssp --disable-libgomp --disable-libquadmath --enable-shared CFLAGS=-fPIC \
&& make -j$(nproc) && make install \
&& cd .. \
&& make ghdllib \
&& make install \
&& cd ../testsuite \
&& export GHDL=/opt/ghdl/bin/ghdl \
&& ./testsuite.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment