-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.libgcc
35 lines (31 loc) · 1.04 KB
/
Dockerfile.libgcc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
FROM linuxdeepin/deepin:beige-loong64-v1.4.0
ARG GCC_VERSION="13.3.0"
ENV DEBIAN_FRONTEND=noninteractive
RUN echo 'deb https://mirrors.ustc.edu.cn/deepin/beige beige main commercial community' > /etc/apt/sources.list && \
apt-get update && \
apt-get install -y --no-install-recommends \
ca-certificates \
curl \
flex \
gawk \
bzip2 \
binutils \
build-essential \
libgmp-dev \
libmpfr-dev \
libmpc-dev \
libisl-dev
WORKDIR /root
RUN curl -LO https://github.com/gcc-mirror/gcc/archive/refs/tags/releases/gcc-${GCC_VERSION}.tar.gz && \
tar xf gcc-*
WORKDIR /root/build
RUN /root/gcc-releases-gcc-*/configure \
-v \
--prefix=/root/build \
--enable-languages=c \
--disable-multilib \
--disable-bootstrap \
CC="gcc" CXX="g++" CFLAGS="-g -O2 -mcmodel=medium" CXXFLAGS="-g -O2 -mcmodel=medium" && \
make -j1 V=s all-target-libgcc MAKEINFO=missing && \
make install-target-libgcc && \
tar czf libgcc.tar.gz --directory=lib .