parent
961fc05af6
commit
e74d8801b0
77
Dockerfile
77
Dockerfile
@ -53,32 +53,67 @@ RUN make -j $(nproc)
|
|||||||
RUN make DESTDIR=/rootfs install && \
|
RUN make DESTDIR=/rootfs install && \
|
||||||
rm -r /rootfs/usr/share/man
|
rm -r /rootfs/usr/share/man
|
||||||
|
|
||||||
# FROM bootstrap-c-toolchain AS build-gcc
|
FROM bootstrap-c-toolchain AS build-gcc
|
||||||
|
ARG GCC_VERSION=14.2.0
|
||||||
|
ARG MPFR_VERSION=4.2.2
|
||||||
|
ARG GMP_VERSION=6.2.1
|
||||||
|
ARG MPC_VERSION=1.3.1
|
||||||
|
|
||||||
# WORKDIR /source
|
WORKDIR /source
|
||||||
# 14.2.0
|
|
||||||
# 4.2.2
|
|
||||||
# 6.2.1
|
|
||||||
# 1.3.1
|
|
||||||
# RUN wget https://ftp.gnu.org/gnu/gcc/gcc-{{ .gcc_version }}/gcc-{{ .gcc_version }}.tar.xz -O gcc.tar.gz
|
|
||||||
|
|
||||||
# RUN tar -xJf binutils.tar.xz --strip-components=1 && \
|
RUN wget https://ftp.gnu.org/gnu/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.xz -O gcc.tar.gz
|
||||||
# ./configure \
|
RUN wget https://ftp.gnu.org/gnu/mpfr/mpfr-${MPFR_VERSION}/gcc-${MPFR_VERSION}.tar.xz -O mpfr.tar.gz
|
||||||
# --build=${BUILD} \
|
RUN wget https://ftp.gnu.org/gnu/gmp/gmp-${GMP_VERSION}/gcc-${GMP_VERSION}.tar.xz -O gmp.tar.gz
|
||||||
# --host=${HOST} \
|
RUN wget https://ftp.gnu.org/gnu/mpc/mpc-${MPC_VERSION}/gcc-${MPC_VERSION}.tar.xz -O mpc.tar.gz
|
||||||
# --prefix=/usr \
|
|
||||||
# --disable-nls \
|
|
||||||
# --disable-gdb \
|
|
||||||
# --disable-gprofng \
|
|
||||||
# --disable-werror \
|
|
||||||
# --enable-deterministic-archives \
|
|
||||||
# --enable-targets=aarch64-linux-musl,aarch64_be-linux-musl,i686-linux-musl,x86_64-linux-musl,x86_64-linux-muslx32,x86_64-pep
|
|
||||||
|
|
||||||
# RUN make -j $(nproc)
|
RUN mkdir mpfr && \
|
||||||
|
tar -xJf mpfr.tar.xz --strip-components=1 -C mpfr && \
|
||||||
|
mkdir gmp && \
|
||||||
|
tar -xJf gmp.tar.xz --strip-components=1 -C gmp && \
|
||||||
|
mkdir mpc && \
|
||||||
|
tar -xzf mpc.tar.gz --strip-components=1 -C mpc && \
|
||||||
|
tar -xJf gcc.tar.xz --strip-components=1 && \
|
||||||
|
mkdir build && \
|
||||||
|
cd build && \
|
||||||
|
cat ../gcc/limitx.h ../gcc/glimits.h ../gcc/limity.h > `dirname $(gcc -print-libgcc-file-name)`/include-fixed/limits.h && \
|
||||||
|
../configure \
|
||||||
|
--build=${BUILD} \
|
||||||
|
--host=${HOST} \
|
||||||
|
--prefix=/usr \
|
||||||
|
--libdir=/usr/lib \
|
||||||
|
--disable-multilib \
|
||||||
|
--disable-nls \
|
||||||
|
--enable-shared \
|
||||||
|
--enable-plugin \
|
||||||
|
--enable-languages=c,c++ \
|
||||||
|
--enable-__cxa_atexit \
|
||||||
|
--enable-c99 \
|
||||||
|
--enable-long-long \
|
||||||
|
--enable-threads=posix \
|
||||||
|
--enable-clocale=generic \
|
||||||
|
--enable-libstdcxx-time \
|
||||||
|
--enable-checking=release \
|
||||||
|
--enable-fully-dynamic-string \
|
||||||
|
--enable-default-pie \
|
||||||
|
--disable-symvers \
|
||||||
|
--disable-gnu-indirect-function \
|
||||||
|
--disable-libmudflap \
|
||||||
|
--disable-libsanitizer \
|
||||||
|
--disable-libmpx \
|
||||||
|
--disable-lto-plugin \
|
||||||
|
--disable-libssp \
|
||||||
|
--disable-bootstrap
|
||||||
|
|
||||||
# RUN make DESTDIR=/rootfs install && \
|
RUN cd build && \
|
||||||
# rm -r /rootfs/usr/share/man
|
make -j $(nproc)
|
||||||
|
|
||||||
|
RUN cd build && \
|
||||||
|
make DESTDIR=/rootfs install-strip && \
|
||||||
|
ln -sv gcc /rootfs/usr/bin/cc && \
|
||||||
|
mv /rootfs/usr/lib64/* /rootfs/usr/lib/ && \
|
||||||
|
rm -rf /rootfs/usr/lib64
|
||||||
|
|
||||||
FROM busybox AS final
|
FROM busybox AS final
|
||||||
COPY --from=build-make /rootfs/ /
|
COPY --from=build-make /rootfs/ /
|
||||||
COPY --from=build-binutils /rootfs/ /
|
COPY --from=build-binutils /rootfs/ /
|
||||||
|
COPY --from=build-gcc /rootfs/ /
|
||||||
|
Loading…
x
Reference in New Issue
Block a user