foundationdb/build/Dockerfile.devel

71 lines
3.2 KiB
Docker

FROM foundationdb/foundationdb-build:0.1.19
USER root
ARG FDB_ARTIFACTSURL=http://foundationdb.org
ADD artifacts /mnt/artifacts
# Install build tools for building via make
RUN \
yum install -y distcc-server gperf rubygems python34 libmpc-devel npm cgdb jq
# Download and install llvm-10.0.0
RUN cd / &&\
curl -L $FDB_ARTIFACTSURL/downloads/docker/foundationdb-dev/LLVM-10.0.0-Linux.rpm > /mnt/artifacts/LLVM-10.0.0-Linux.rpm &&\
yum install -y /mnt/artifacts/LLVM-10.0.0-Linux.rpm &&\
curl -L $FDB_ARTIFACTSURL/downloads/docker/foundationdb-dev/gcc910.conf > /etc/ld.so.conf.d/gcc910.conf
# Download and install gcc-9.3.0
RUN cd / &&\
curl -L $FDB_ARTIFACTSURL/downloads/docker/foundationdb-dev/gcc-9.3.0.tar.gz | tar -xvz &&\
mv -iv /usr/local/bin/go /usr/local/bin/go.gcc93 &&\
mv -iv /usr/local/bin/gofmt /usr/local/bin/gofmt.gcc93
# Download and install distcc 3.3.2 new centos binaries
RUN cd / &&\
curl -L $FDB_ARTIFACTSURL/downloads/docker/foundationdb-dev/distcc-3.3.2-centos.tar.gz | tar -xvz &&\
mkdir -p /usr/lib/gcc-cross &&\
update-distcc-symlinks &&\
mv -iv /usr/bin/distcc /usr/bin/distcc.orig &&\
mv -iv /usr/bin/distccd /usr/bin/distccd.orig &&\
mv -iv /usr/bin/distccmon-text /usr/bin/distccmon-text.orig
# Replace the clang and gcc links with dereferenced file
# Add md5sum links to compilers to allow unique id of binary
# Copy new devtoolset tools to /usr/local/bin
RUN cp -iv /usr/local/bin/clang++ /usr/local/bin/clang++.deref &&\
mv -iv /usr/local/bin/clang++ /usr/local/bin/clang++.lnk &&\
mv -iv /usr/local/bin/clang++.deref /usr/local/bin/clang++ &&\
cp -iv /usr/local/bin/clang /usr/local/bin/clang.deref &&\
mv -iv /usr/local/bin/clang /usr/local/bin/clang.lnk &&\
mv -iv /usr/local/bin/clang.deref /usr/local/bin/clang &&\
cp -iv /usr/local/bin/g++ /usr/local/bin/g++.deref &&\
mv -iv /usr/local/bin/g++ /usr/local/bin/g++.lnk &&\
mv -iv /usr/local/bin/g++.deref /usr/local/bin/g++ &&\
cp -iv /usr/local/bin/gcc /usr/local/bin/gcc.deref &&\
mv -iv /usr/local/bin/gcc /usr/local/bin/gcc.lnk &&\
mv -iv /usr/local/bin/gcc.deref /usr/local/bin/gcc &&\
for compiler in /usr/local/bin/gcc /usr/local/bin/g++ /opt/rh/devtoolset-8/root/usr/bin/g++ /opt/rh/devtoolset-8/root/usr/bin/gcc /usr/local/bin/clang /usr/local/bin/clang++; do md5file=$(md5sum "${compiler}" | cut -d\ -f1) && ln -sv "${compiler##*\/}" "${compiler}.${md5file:0:8}"; done &&\
for toolexe in addr2line ar as ld gdb valgrind; do cp -iv "/opt/rh/devtoolset-8/root/usr/bin/${toolexe}" "/usr/local/bin/${toolexe}"; done &&\
ldconfig &&\
rm -rf /mnt/artifacts
LABEL version=0.11.10
ENV DOCKER_IMAGEVER=0.11.10
ENV CLANGCC=/usr/local/bin/clang.de8a65ef
ENV CLANGCXX=/usr/local/bin/clang++.de8a65ef
ENV GCC80CC=/opt/rh/devtoolset-8/root/usr/bin/gcc.00f99754
ENV GCC80CXX=/opt/rh/devtoolset-8/root/usr/bin/g++.12c01dd6
ENV GCC93CC=/usr/local/bin/gcc.04edd07a
ENV GCC93CXX=/usr/local/bin/g++.b058d8c5
ENV CC=/usr/local/bin/clang.de8a65ef
ENV CXX=/usr/local/bin/clang++.de8a65ef
ENV USE_LD=LLD
ENV USE_LIBCXX=1
ENV CCACHE_NOHASHDIR=true
ENV CCACHE_UMASK=0000
ENV CCACHE_SLOPPINESS="file_macro,time_macros,include_file_mtime,include_file_ctime,file_stat_matches"
CMD scl enable devtoolset-8 rh-python36 rh-ruby24 -- bash