add libunwind

This commit is contained in:
Lance Vick 2023-12-06 04:56:43 -08:00
parent 2438c4c54f
commit 48726ae4f2
Signed by: lrvick
GPG Key ID: 8E47A1EC35A1551D
2 changed files with 54 additions and 1 deletions

View File

@ -41,7 +41,7 @@ out/m4.oci.tgz: \
out/gcc.oci.tgz \ out/gcc.oci.tgz \
out/binutils.oci.tgz \ out/binutils.oci.tgz \
out/musl.oci.tgz \ out/musl.oci.tgz \
out/make.oci.tgz \ out/make.oci.tgz
docker build -t imgrep/m4 --output type=oci,dest=$@ m4 docker build -t imgrep/m4 --output type=oci,dest=$@ m4
out/autoconf.oci.tgz: \ out/autoconf.oci.tgz: \
@ -109,6 +109,18 @@ out/libxml2.oci.tgz: \
out/libtool.oci.tgz out/libtool.oci.tgz
docker build -t imgrep/libxml2 --output type=oci,dest=$@ libxml2 docker build -t imgrep/libxml2 --output type=oci,dest=$@ libxml2
out/libunwind.oci.tgz: \
out/busybox.oci.tgz \
out/gcc.oci.tgz \
out/binutils.oci.tgz \
out/musl.oci.tgz \
out/make.oci.tgz \
out/bash.oci.tgz \
out/autoconf.oci.tgz \
out/automake.oci.tgz \
out/libtool.oci.tgz
docker build -t imgrep/libunwind --output type=oci,dest=$@ libunwind
out/openssl.oci.tgz: \ out/openssl.oci.tgz: \
out/gcc.oci.tgz \ out/gcc.oci.tgz \
out/binutils.oci.tgz \ out/binutils.oci.tgz \

41
libunwind/Dockerfile Normal file
View File

@ -0,0 +1,41 @@
FROM imgrep/busybox:latest as busybox
FROM imgrep/gcc:latest as gcc
FROM imgrep/binutils:latest as binutils
FROM imgrep/musl:latest as musl
FROM imgrep/make:latest as make
FROM imgrep/autoconf:latest as autoconf
FROM imgrep/automake:latest as automake
FROM imgrep/libtool:latest as libtool
FROM busybox as build
ENV SRC_SITE=https://github.com/libunwind/libunwind/releases/download
ENV SRC_VERSION=1.7.2
ENV SRC_HASH=a18a6a24307443a8ace7a8acc2ce79fbbe6826cd0edf98d6326d0225d6a5d6e6
RUN wget ${SRC_SITE}/v${SRC_VERSION}/libunwind-${SRC_VERSION}.tar.gz
RUN echo "${SRC_HASH} libunwind-${SRC_VERSION}.tar.gz" | sha256sum -c
RUN tar -xf libunwind-${SRC_VERSION}.tar.gz
WORKDIR libunwind-${SRC_VERSION}
COPY --from=gcc . /
COPY --from=binutils . /
COPY --from=make . /
COPY --from=musl . /
COPY --from=autoconf . /
COPY --from=automake . /
COPY --from=libtool . /
#LDFLAGS="-lucontext" CFLAGS="-fno-stack-protector" \
RUN set -eux; \
./configure \
--build=x86_64-unknown-linux-musl \
--host=x86_64-unknown-linux-musl \
--prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/share/man \
--localstatedir=/usr/share/man \
--enable-cxx-exceptions \
--disable-tests \
--infodir=/usr/share/info; \
make;
RUN make DESTDIR=/home/user/rootfs install
FROM scratch
COPY --from=build /home/user/rootfs /