include + update old linux targets/host.c

This commit is contained in:
2026-03-05 19:16:03 +01:00
parent 6ab17c98e9
commit e6237cc06e
10 changed files with 241 additions and 125 deletions

View File

@ -47,8 +47,7 @@ RUN mkdir gcc-build && cd gcc-build \
# && PATH="$CROSSPREFIX/bin:$PATH" make all-target-libstdc++-v3 -j$(nproc) \
# && PATH="$CROSSPREFIX/bin:$PATH" make install-target-libstdc++-v3
# Build newlib - it seems like because I use the same gcc prefix
# I don't even need to specify it as an include when building?
# Build newlib in the gcc prefix - don't need to specify include paths
ARG NEWLIBVERSION=4.1.0
WORKDIR /
RUN wget ftp://sourceware.org/pub/newlib/newlib-$NEWLIBVERSION.tar.gz \
@ -85,10 +84,6 @@ RUN apt-get update \
wget \
&& apt-get clean
# TODO: Can't find pthread on X86_32
# RUN ln -s /usr/lib/x86_64-linux-gnu/libpthread.so.0 /usr/lib/x86_64-linux-gnu/libpthread.so
# RUN ln -s /usr/lib32/libpthread.so.0 /usr/lib32/libpthread.so
RUN python3 -m pip config set global.break-system-packages true
# Clone WAMR
@ -185,12 +180,13 @@ RUN mkdir build_libiwasm && cd build_libiwasm \
.. \
&& make -j$(nproc)
# Build WAMR libiwasm for the host system
WORKDIR /wamrlib
RUN mkdir build_libiwasm_64 && cd build_libiwasm_64 \
RUN mkdir build_libiwasm_linux && cd build_libiwasm_linux \
&& cmake \
-DWAMR_BUILD_PLATFORM=baremetal \
-DWAMR_BUILD_TARGET=X86_64 \
-DWAMR_BUILD_AOT=0 \
-DWAMR_BUILD_PLATFORM=linux \
-DWAMR_BUILD_TARGET=X86_32 \
-DWAMR_BUILD_AOT=1 \
-DWAMR_BUILD_WAMR_COMPILER=0 \
-DWAMR_BUILD_INTERP=1 \
-DWAMR_BUILD_FAST_INTERP=0 \
@ -225,6 +221,7 @@ RUN apt-get update \
xorriso \
grub-pc-bin \
bochs \
less \
&& apt-get clean
COPY --from=compiler-builder /opt/crosscompiler /opt/crosscompiler
@ -235,7 +232,7 @@ RUN ln -sf /opt/wamr/product-mini/platforms/linux/build_iwasm /opt/wamr-iwasm \
&& ln -sf /opt/wamr/wamr-compiler/build_wamrc /opt/wamr-wamrc \
&& ln -sf /opt/wamr/wamr-compiler/build_libvmlib /opt/wamr-libvmlib \
&& ln -sf /opt/wamr/build_libiwasm /opt/wamr-libiwasm \
&& ln -sf /opt/wamr/build_libiwasm_64 /opt/wamr-libiwasm-64
&& ln -sf /opt/wamr/build_libiwasm_linux /opt/wamr-libiwasm-linux
COPY ./examples /home/ubuntu/examples
WORKDIR /home/ubuntu/examples