-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.libffi
36 lines (31 loc) · 1.21 KB
/
Dockerfile.libffi
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
36
FROM linuxdeepin/deepin:beige-loong64-v1.4.0
ARG LIBFFI_VERSION="3.4.6"
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 \
gcc-13 \
make \
autoconf \
automake \
libtool \
pkg-config
WORKDIR /root
RUN curl -LO https://github.com/libffi/libffi/releases/download/v${LIBFFI_VERSION}/libffi-${LIBFFI_VERSION}.tar.gz && \
tar xf libffi-${LIBFFI_VERSION}.tar.gz
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 100 \
--slave /usr/bin/g++ g++ /usr/bin/g++-13 \
--slave /usr/bin/gcov gcov /usr/bin/gcov-13 \
--slave /usr/bin/gcc-ar gcc-ar /usr/bin/gcc-ar-13 \
--slave /usr/bin/gcc-ranlib gcc-ranlib /usr/bin/gcc-ranlib-13
WORKDIR /root/build
RUN /root/libffi-${LIBFFI_VERSION}/configure \
CFLAGS="-mcmodel=medium" \
--prefix=/root/build/out \
--enable-pax_emutramp \
--enable-static \
--disable-docs && \
make libffi_convenience.la && \
tar czf libffi.tar.gz --directory=.libs .