fixed to use cmake, and spdlog

This commit is contained in:
Màrius Montón 2021-12-08 13:00:53 +01:00
parent 632dd5bad9
commit d5990300b2
No known key found for this signature in database
GPG Key ID: FA199E7A752699F0
1 changed files with 28 additions and 24 deletions

View File

@ -12,40 +12,44 @@ RUN apt-get update -q && apt-get install -qy --no-install-recommends \
wget \ wget \
g++-8 \ g++-8 \
xterm \ xterm \
libboost-all-dev libspdlog-dev \
&& apt-get clean \ && apt-get clean \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
RUN mkdir -p /usr/src/systemc \ RUN mkdir -p /usr/src/riscv64 \
&& wget --no-check-certificate https://accellera.org/images/downloads/standards/systemc/systemc-$SYSTEMC_VERSION.tar.gz \ && wget --no-check-certificate https://accellera.org/images/downloads/standards/systemc/systemc-$SYSTEMC_VERSION.tar.gz \
&& tar fzxC systemc-$SYSTEMC_VERSION.tar.gz /usr/src/systemc \ && tar fzxC systemc-$SYSTEMC_VERSION.tar.gz /usr/src/riscv64 \
&& cd /usr/src/systemc/systemc-$SYSTEMC_VERSION \ && cd /usr/src/riscv64/systemc-$SYSTEMC_VERSION \
&& mkdir objs \ && mkdir build \
&& cd objs \ && cd build \
&& export CXX=g++-8 \ && cmake .. -DCMAKE_CXX_STANDARD=17 \
&& mkdir -p /usr/local/systemc-$SYSTEMC_VERSION \
&& ../configure --prefix=/usr/local/systemc-$SYSTEMC_VERSION CXXFLAGS="-DSC_CPLUSPLUS=201103L"\
&& make \ && make \
&& make install \ && make install \
&& cd / \ && cd / \
&& rm -rf /usr/src/systemc
ENV CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:/usr/local/systemc-$SYSTEMC_VERSION/include RUN rm -r /root/.ssh
ENV LIBRARY_PATH=$LIBRARY_PATH:/usr/local/systemc-$SYSTEMC_VERSION/lib-linux64
ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/systemc-$SYSTEMC_VERSION/lib-linux64
ENV SYSTEMC=/usr/local/systemc-$SYSTEMC_VERSION
RUN mkdir -p /root/.ssh RUN mkdir -p /root/.ssh
RUN ssh-keyscan github.com > /root/.ssh/known_hosts RUN ssh-keyscan github.com > /root/.ssh/known_hosts
RUN git config --global http.sslBackend "openssl"
RUN cd /usr/src/riscv64 \
&& git config --global http.sslVerify false \
&& git clone https://github.com/gabime/spdlog.git \
&& cd spdlog \
&& cmake -H. -B_builds -DCMAKE_BUILD_TYPE=Release \
&& cmake --build _builds --config Release \
&& cmake -H. -B_builds -DCMAKE_INSTALL_PREFIX=install -DCMAKE_BUILD_TYPE=Release \
&& cmake --build _builds --target install
RUN cd /usr/src/riscv64 \
&& chmod -R a+rw . \
&& git config --global http.sslVerify false \
&& git clone https://github.com/mariusmm/RISC-V-TLM.git \
&& cd RISC-V-TLM \
&& mkdir build \
&& cd build \
&& chmod a+rw . \
&& cmake .. \
&& make
RUN rm -fr /usr/src/riscv64 \ WORKDIR /usr/src/riscv64
&& mkdir -p /usr/src/riscv64 \
&& cd /usr/src/riscv64 \
&& git config --global http.sslVerify false \
&& git clone https://github.com/mariusmm/RISC-V-TLM.git \
&& cd RISC-V-TLM \
&& mkdir obj \
&& make