Skip to content

Commit

Permalink
Merge pull request #117 from bcressey/integrate-macros
Browse files Browse the repository at this point in the history
integrate macros into the SDK
  • Loading branch information
bcressey authored Jun 21, 2023
2 parents 03bc205 + e17b597 commit 67b317c
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 3 deletions.
18 changes: 18 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -939,6 +939,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 @@ -1039,6 +1052,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

0 comments on commit 67b317c

Please sign in to comment.