Skip to content

Commit

Permalink
echo test
Browse files Browse the repository at this point in the history
  • Loading branch information
ParkMyCar committed Aug 31, 2024
1 parent 70d1a3e commit 81128f8
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sysroot/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ WORKDIR /downloads/gcc
RUN curl --fail-early --location "https://ftp.gnu.org/gnu/gcc/gcc-${LIBSTDCXX_VERSION}/gcc-${LIBSTDCXX_VERSION}.tar.xz" \
| tar --xz --extract --strip-components=1 --file -
RUN ./contrib/download_prerequisites
RUN --mount=source=echo_test.sh,target=/usr/bin/echo_test.sh echo_test.sh

FROM base_image AS build_image

Expand Down Expand Up @@ -161,7 +162,7 @@ RUN make install all-target-libgfortran
RUN make install all-target-libstdc++-v3

FROM gcc as gcc_pruned
RUN --mount=source=prune_gcc.sh,target=/usr/bin/prune_gcc.sh prune_gcc.sh
RUN --mount=source=prune_gcc.sh,target=/usr/bin/prune_gcc.sh prune_gcc.sh "${LIBSTDCXX_VERSION}" "${LIBSTDCXX_MAJOR}"

####################################################################################################
# Assemble final sysroots
Expand Down
8 changes: 8 additions & 0 deletions sysroot/echo_test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash

set -eux

echo "${LIBSTDCXX_VERSION}"
echo $LIBSTDCXX_VERSION
echo "${LIBSTDCXX_MAJOR}"
echo $LIBSTDCXX_MAJOR
3 changes: 3 additions & 0 deletions sysroot/prune_gcc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

set -eux

LIBSTDCXX_VERSION=$1
LIBSTDCXX_MAJOR=$2

rm -rf /var/buildlibs/gcc/bin
rm -rf /var/buildlibs/gcc/usr/bin
rm -rf /var/buildlibs/gcc/libexec
Expand Down

0 comments on commit 81128f8

Please sign in to comment.