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

integrate macros into the SDK #117

Merged
merged 3 commits into from
Jun 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -895,6 +895,19 @@ RUN \
-C /${MUSL_SYSROOT}/usr/share/licenses -T toolchain-licenses.txt && \
tar xvf toolchain.tar -C /

# =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^=
#
# Generate macros for the target.

FROM sdk as sdk-macros
ARG ARCH

COPY macros/* /tmp/

WORKDIR /tmp
RUN \
cat ${ARCH} shared rust cargo > /etc/rpm/macros.bottlerocket

# =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^=
#
# Collects all toolchain builds as single image layer
Expand Down Expand Up @@ -994,6 +1007,11 @@ COPY --chown=0:0 --from=sdk-e2fsprogs \
/home/builder/NOTICE \
/usr/share/licenses/dir2fs/

# "sdk-macros" has the rpm macros
COPY --chown=0:0 --from=sdk-macros \
/etc/rpm/macros.bottlerocket \
/etc/rpm/macros.bottlerocket

# Add Rust programs and libraries to the path.
# Also add symlinks to help out with sysroot discovery.
RUN \
Expand Down
2 changes: 1 addition & 1 deletion macros/aarch64
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
%_cross_cpu_family arm
%_cross_endian little

%_cross_efi_arch aa64
%_cross_grub_efi_format arm64-efi
%_cross_grub_efi_image bootaa64.efi

%_cross_go_arch arm64
2 changes: 1 addition & 1 deletion macros/shared
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
%_cross_vendor bottlerocket
%_cross_libc gnu
%_cross_os %{_cross_vendor}-%{_cross_arch}-
%_cross_os %{_cross_vendor}-
%_cross_triple %{_cross_arch}-%{_cross_vendor}-linux
%_cross_target %{_cross_triple}-%{_cross_libc}
%dist %{nil}
Expand Down
2 changes: 1 addition & 1 deletion macros/x86_64
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
%_cross_cpu_family x86
%_cross_endian little

%_cross_efi_arch x64
%_cross_grub_efi_format x86_64-efi
%_cross_grub_efi_image bootx64.efi

%_cross_go_arch amd64