1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 + |
+
|
diff --git a/Makefile b/Makefile index a862ad6..fe12f0c 100644 --- a/Makefile +++ b/Makefile @@ -40,6 +40,7 @@ out/openssl.oci.tgz: \ out/gcc.oci.tgz \ out/binutils.oci.tgz \ out/busybox.oci.tgz \ + out/linux-headers.oci.tgz \ out/musl.oci.tgz docker build -t imgrep/openssl --output type=oci,dest=$@ packages/openssl @@ -55,6 +56,7 @@ out/perl.oci.tgz: \ out/gcc.oci.tgz \ out/binutils.oci.tgz \ out/busybox.oci.tgz \ + out/make.oci.tgz \ out/musl.oci.tgz docker build -t imgrep/perl --output type=oci,dest=$@ packages/perl @@ -78,6 +80,43 @@ out/python.oci.tgz: \ out/musl.oci.tgz docker build -t imgrep/python --output type=oci,dest=$@ packages/python +out/ninja.oci.tgz: \ + out/busybox.oci.tgz \ + out/gcc.oci.tgz \ + out/binutils.oci.tgz \ + out/musl.oci.tgz \ + out/make.oci.tgz \ + out/openssl.oci.tgz \ + out/python.oci.tgz + docker build -t imgrep/ninja --output type=oci,dest=$@ packages/ninja + +out/cmake.oci.tgz: \ + out/busybox.oci.tgz \ + out/gcc.oci.tgz \ + out/binutils.oci.tgz \ + out/ninja.oci.tgz \ + out/musl.oci.tgz \ + out/make.oci.tgz \ + out/linux-headers.oci.tgz + docker build -t imgrep/cmake --output type=oci,dest=$@ packages/cmake + +out/py-setuptools.oci.tgz: \ + out/busybox.oci.tgz \ + out/python.oci.tgz + docker build -t imgrep/py-setuptools --output type=oci,dest=$@ packages/py-setuptools + +out/llvm.oci.tgz: \ + out/gcc.oci.tgz \ + out/python.oci.tgz \ + out/py-setuptools.oci.tgz \ + out/perl.oci.tgz \ + out/binutils.oci.tgz \ + out/cmake.oci.tgz \ + out/ninja.oci.tgz \ + out/busybox.oci.tgz \ + out/musl.oci.tgz + docker build -t imgrep/llvm --output type=oci,dest=$@ packages/llvm + test: docker build -t imgrep/test-c tests/c docker build -t imgrep/test-go tests/go diff --git a/packages/binutils/Dockerfile b/packages/binutils/Dockerfile index c3ced30..5e3b635 100644 --- a/packages/binutils/Dockerfile +++ b/packages/binutils/Dockerfile @@ -18,20 +18,20 @@ RUN set -ex; \ --target=x86_64-linux-musl \ --with-build-sysroot= \ --with-sysroot=/ \ - --prefix=/ \ + --prefix=/usr \ --mandir=/usr/share/man \ --infodir=/usr/share/info \ --sysconfdir=/etc \ --enable-plugins \ --without-zstd \ --disable-shared \ - --disable-gold \ --disable-jansson \ --disable-gdb \ --disable-gprofng \ --disable-multilib \ --disable-nls \ --disable-werror \ + --enable-gold \ --enable-64-bit-bfd \ --enable-default-execstack=no \ --enable-default-hash-style=gnu \ @@ -43,10 +43,10 @@ RUN set -ex; \ --with-mmap \ --with-pic; \ make -j "$(nproc)"; \ - make DESTDIR="/rootfs" install; + make DESTDIR="/home/user/rootfs" install; COPY --from=musl /usr/lib/libc.so /rootfs/lib/ld-musl-x86_64.so.1 FROM scratch -COPY --from=build /rootfs / +COPY --from=build /home/user/rootfs / ENTRYPOINT ["/bin/ld"] CMD ["--version"] diff --git a/packages/llvm/Dockerfile b/packages/llvm/Dockerfile new file mode 100644 index 0000000..b6fe7f1 --- /dev/null +++ b/packages/llvm/Dockerfile @@ -0,0 +1,80 @@ +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/openssl:latest as openssl +FROM imgrep/python:latest as python +FROM imgrep/py-setuptools:latest as py-setuptools +FROM imgrep/cmake:latest as cmake +FROM imgrep/ninja:latest as ninja + +FROM busybox as build +ENV SRC_SITE=https://github.com/llvm/llvm-project/releases/download +ENV SRC_VERSION=16.0.6 +ENV SRC_HASH=ce5e71081d17ce9e86d7cbcfa28c4b04b9300f8fb7e78422b1feb6bc52c3028e +RUN wget ${SRC_SITE}/llvmorg-${SRC_VERSION}/llvm-project-${SRC_VERSION}.src.tar.xz +RUN echo "${SRC_HASH} llvm-project-${SRC_VERSION}.src.tar.xz" | sha256sum -c +RUN tar -xf llvm-project-${SRC_VERSION}.src.tar.xz +WORKDIR llvm-project-${SRC_VERSION}.src +RUN ls -lah . +ADD . . +RUN patch -p1 < rust-feature-tables.patch +COPY --from=binutils . / +COPY --from=cmake . / +COPY --from=ninja . / +COPY --from=musl . / +COPY --from=gcc . / +COPY --from=python . / +COPY --from=py-setuptools . / + +RUN set -eux; \ + python -c "import setuptools; print(setuptools.__version__)"; \ + cmake \ + -B build \ + -G Ninja \ + -Wno-dev -S llvm \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=/usr/ \ + -DCMAKE_INSTALL_RPATH=/usr/ \ + -DLLVM_DEFAULT_TARGET_TRIPLE="x86_64-linux-musl" \ + -DLLVM_HOST_TRIPLE="x86_64-linux-musl" \ + -DLLVM_APPEND_VC_REV=OFF \ + -DLLVM_BINUTILS_INCDIR=/usr/include \ + -DLLVM_BUILD_DOCS=OFF \ + -DLLVM_BUILD_EXAMPLES=OFF \ + -DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON \ + -DLLVM_BUILD_LLVM_DYLIB=ON \ + -DLLVM_BUILD_TESTS=ON \ + -DLLVM_ENABLE_ASSERTIONS=OFF \ + -DLLVM_ENABLE_DUMP=ON \ + -DLLVM_ENABLE_EH=ON \ + -DLLVM_ENABLE_FFI=ON \ + -DLLVM_ENABLE_LIBCXX=OFF \ + -DLLVM_ENABLE_LIBEDIT=OFF \ + -DLLVM_ENABLE_PIC=ON \ + -DLLVM_ENABLE_RTTI=ON \ + -DLLVM_ENABLE_SPHINX=OFF \ + -DLLVM_ENABLE_TERMINFO=ON \ + -DLLVM_ENABLE_ZLIB=OFF \ + -DLLVM_ENABLE_ZSTD=OFF \ + -DLLVM_INCLUDE_BENCHMARKS=OFF \ + -DLLVM_INCLUDE_EXAMPLES=OFF \ + -DLLVM_INSTALL_UTILS=ON \ + -DLLVM_LINK_LLVM_DYLIB=ON \ + -DLLVM_USE_PERF=ON; \ + cmake --build build + +RUN python3 llvm/utils/lit/setup.py build + +RUN set -eux; \ + export DESTDIR="/home/user/rootfs/"; \ + cmake --install build; \ + python3 llvm/utils/lit/setup.py install --root="$DESTDIR" + +COPY --from=musl /lib* /home/user/rootfs/lib/ + +FROM scratch +COPY --from=build /home/user/rootfs / +USER 100:100 +ENTRYPOINT ["/usr/bin/llc"] +CMD ["--version"] diff --git a/packages/llvm/rust-feature-tables.patch b/packages/llvm/rust-feature-tables.patch new file mode 100644 index 0000000..42fa8f4 --- /dev/null +++ b/packages/llvm/rust-feature-tables.patch @@ -0,0 +1,305 @@ + + +
++ | index : aports | |
Alpine packages build scripts + | uwsgi |
+aboutsummaryrefslogtreecommitdiffstats | + |
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 + |
+
|