Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ld: update ld64 and dependencies #140

Merged
merged 3 commits into from
Jan 9, 2024
Merged

ld: update ld64 and dependencies #140

merged 3 commits into from
Jan 9, 2024

Conversation

tonistiigi
Copy link
Owner

No description provided.

This makes sure triple-clang and xx-clang have the same behavior.

For some reason, triple-clang does not load the config automatically
anymore starting from debian trixie.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
inherits = ["_ld-base"]
matrix = {
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There was something off in here. ld64 is not built per target architecture like binutils/ld is, only per runner architecture.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yes indeed 👍

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It takes ~50m to build on the same runner, we should look at distributing each built platform on a dedicated runner:

image

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SGTM but can be follow-up

ARG LIBTAPI_VERSION
RUN git clone https://github.com/tpoechtrager/apple-libtapi --depth 1 -b ${LIBTAPI_VERSION}
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)" ./build.sh && \
RUN NOMAKE=1 CMAKE_EXTRA_ARGS="$(xx-clang --print-cmake-defines) -DCMAKE_CXX_FLAGS=-D_LARGEFILE64_SOURCE" ./build.sh && \
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fails with missing lseek64 otherwise.

codesign -f -s - "$out"
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically I don't think this is needed anymore as new ld64 can do ad-hoc signatures automatically.

make -j $(nproc) -C ld64 && \
xx-verify --static ld64/src/ld/ld

FROM --platform=${BUILDPLATFORM} alpine:${ALPINE_VERSION} AS sigtool-base
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because of this wrong stage order the latest prebuilt ld64 version is missing these files and broken

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😞

@crazy-max crazy-max merged commit 6c33ebf into master Jan 9, 2024
53 of 54 checks passed
@crazy-max crazy-max deleted the ld64-update branch January 9, 2024 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants