From 70b5b51326a3fe499301fcdcb07b90a350fb8cef Mon Sep 17 00:00:00 2001 From: CrazyMax <1951866+crazy-max@users.noreply.github.com> Date: Wed, 11 Dec 2024 11:55:20 +0100 Subject: [PATCH 1/3] ld: use faster download source for binutils Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com> --- src/ld/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ld/Dockerfile b/src/ld/Dockerfile index 4250629..0c8a7b2 100644 --- a/src/ld/Dockerfile +++ b/src/ld/Dockerfile @@ -193,7 +193,7 @@ WORKDIR /work COPY --link --from=xx / / COPY --link --from=patches-binutils / patches/ ARG BINUTILS_VERSION -RUN wget https://ftp.gnu.org/gnu/binutils/binutils-${BINUTILS_VERSION}.tar.gz +RUN wget https://sourceware.org/pub/binutils/releases/binutils-${BINUTILS_VERSION}.tar.gz ARG TARGETPLATFORM # first build version for current architecture that is used then cross compiling RUN export CC=xx-clang CXX=xx-clang++ LD=lld BINUTILS_TARGET=${TARGETPLATFORM} && unset TARGETPLATFORM && \ From 55756b3bb2eaa1f02baa6dfd28c203378daff337 Mon Sep 17 00:00:00 2001 From: CrazyMax <1951866+crazy-max@users.noreply.github.com> Date: Wed, 11 Dec 2024 12:15:18 +0100 Subject: [PATCH 2/3] ld: use heredocs and ADD to clone in dockerfile Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com> --- src/ld/Dockerfile | 257 ++++++++++++++++++++++++++++++---------------- 1 file changed, 166 insertions(+), 91 deletions(-) diff --git a/src/ld/Dockerfile b/src/ld/Dockerfile index 0c8a7b2..d1e2118 100644 --- a/src/ld/Dockerfile +++ b/src/ld/Dockerfile @@ -1,4 +1,4 @@ -#syntax=docker/dockerfile:1.8 +#syntax=docker/dockerfile:1 #check=error=true ARG ALPINE_VERSION=3.21 @@ -16,41 +16,54 @@ RUN apk add --no-cache git clang lld cmake make python3 bash COPY --link --from=xx / / ARG LIBTAPI_VERSION WORKDIR /work -RUN git clone https://github.com/tpoechtrager/apple-libtapi --depth 1 -b ${LIBTAPI_VERSION} +ADD "https://github.com/tpoechtrager/apple-libtapi.git#${LIBTAPI_VERSION}" apple-libtapi WORKDIR apple-libtapi RUN --mount=target=/tmp/libtapi-cmake-args.patch,source=libtapi-cmake-args.patch \ git apply /tmp/libtapi-cmake-args.patch RUN apk add --no-cache gcc g++ -RUN NOMAKE=1 CMAKE_EXTRA_ARGS="$(xx-clang --print-cmake-defines) -DCMAKE_CXX_FLAGS=-D_LARGEFILE64_SOURCE" ./build.sh && \ - cd build && \ - make -j $(nproc) clang-tblgen llvm-tblgen && \ - cp -a bin/clang-tblgen bin/llvm-tblgen /usr/bin/ && \ - cd .. && rm -rf build +RUN < Date: Mon, 13 Jan 2025 09:47:14 +0100 Subject: [PATCH 3/3] ld: skip verification on non-binary files Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com> --- src/ld/Dockerfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ld/Dockerfile b/src/ld/Dockerfile index d1e2118..d679314 100644 --- a/src/ld/Dockerfile +++ b/src/ld/Dockerfile @@ -330,7 +330,11 @@ RUN <