Skip to content

Commit

Permalink
wip armv7l
Browse files Browse the repository at this point in the history
  • Loading branch information
aeltorio committed Dec 15, 2024
1 parent e2897bc commit 5addbee
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,6 @@ RUN if [ "$(dpkg --print-architecture)" = "armhf" ]; then \
ln -svf /usr/bin/ar /usr/bin/arm-linux-musleabihf-ar; \
ln -svf /usr/bin/strip /usr/bin/arm-linux-musleabihf-strip; \
ln -svf /usr/bin/ranlib /usr/bin/arm-linux-musleabihf-ranlib; \
cp -v /usr/lib/gcc/arm-linux-gnueabihf/11/include/stddef.h /usr/include/; \
cp -av /usr/include/arm-linux-musleabihf/bits /usr/include/; \
ln -svf /usr/include/arm-linux-gnueabihf/asm /usr/include/asm; \
ln -svf /usr/include/arm-linux-gnueabihf/sys /usr/include/sys; \
ln -svf /usr/include/arm-linux-gnueabihf/curl /usr/include/curl; \
ln -svf /usr/include/arm-linux-gnueabihf/gnu /usr/include/gnu; \
ln -svf /usr/include/arm-linux-musleabihf/*.h /usr/include/; \
echo "armv7-unknown-linux-musleabihf" > /build/_target ; \
fi
RUN if [ "$(dpkg --print-architecture)" = "arm64" ]; then \
Expand Down Expand Up @@ -47,6 +40,9 @@ RUN --mount=type=tmpfs,target=/root/.cargo export TARGET=$(cat /build/_target) \
&& if [ ! -f /root/.cargo/config.toml ]; then \
echo "" > /root/.cargo/config.toml; \
fi && \
&& if [ "$(dpkg --print-architecture)" = "armhf" ]; then \
export CFLAFS+=" -I/usr/include/arm-linux-musleabihf -I/usr/lib/gcc/arm-linux-gnueabihf/11/include "; \
fi && \
awk 'BEGIN{net_section=0;git_fetch_found=0;printed=0}/^\[net\]/{net_section=1;print;next}/^\[/{if(net_section&&!git_fetch_found){print "git-fetch-with-cli = true";printed=1}net_section=0;print;next}net_section&&/^git-fetch-with-cli\s*=/{print "git-fetch-with-cli = true";git_fetch_found=1;next}{print}END{if(!printed&&!git_fetch_found){if(!net_section)print "\n[net]";print "git-fetch-with-cli = true"}}' /root/.cargo/config.toml > /root/.cargo/config.tmp && \
mv /root/.cargo/config.tmp /root/.cargo/config.toml \
&& . /root/.cargo/env && cd /build \
Expand Down

0 comments on commit 5addbee

Please sign in to comment.