[Pkg-rust-maintainers] Bug#881846: build for armel

Emilio Pozuelo Monfort pochu at debian.org
Thu Jan 11 20:19:02 UTC 2018


Hi Adrian,

Not sure if you saw this mail. Does this help us somehow?

Cheers,
Emilio

On Thu, 28 Dec 2017 13:20:59 -0200 Marco A L Barbosa <malbarbo at gmail.com> wrote:
> After https://github.com/rust-lang/rust/pull/47018 got merged I was able to
> cross build to armel (but not tested) using this docker file
> 
> FROM ubuntu:17.10
> 
> RUN apt-get update && apt-get install -y --no-install-recommends \
>   g++ \
>   make \
>   file \
>   curl \
>   ca-certificates \
>   python2.7 \
>   git \
>   cmake \
>   sudo \
>   xz-utils \
>   zlib1g-dev \
>   g++-arm-linux-gnueabi \
>   bzip2 \
>   patch \
>   libssl-dev \
>   pkg-config
> 
> WORKDIR /tmp
> 
> ENV TARGETS=armv4t-unknown-linux-gnueabi
> 
> RUN echo "#!/bin/sh\narm-linux-gnueabi-gcc -Wl,--allow-multiple-definition
> \"\$@\"" > /usr/bin/arm-linux-gnueabi-gcc2
> RUN chmod +x /usr/bin/arm-linux-gnueabi-gcc2
> RUN cat /usr/bin/arm-linux-gnueabi-gcc2
> 
> ENV CC_armv4t_unknown_linux_gnueabi=arm-linux-gnueabi-gcc2 \
>     CFLAGS_armv4t_unknown_linux_gnueabi="-march=armv4t -marm
> -mfloat-abi=soft" \
>     CXX_armv4t_unknown_linux_gnueabi=arm-linux-gnueabi-g++ \
>     CXXFLAGS_armv4t_unknown_linux_gnueabi="-march=armv4t -marm
> -mfloat-abi=soft"
> 
> # Suppress some warnings in the openwrt toolchains we downloaded
> ENV STAGING_DIR=/tmp
> 
> ENV RUST_CONFIGURE_ARGS \
>       --target=$TARGETS \
>       --host=$TARGETS
> ENV SCRIPT python2.7 ../x.py dist --host $TARGETS --target $TARGETS
> 
> # sccache
> COPY scripts/sccache.sh /scripts/
> RUN sh /scripts/sccache.sh
> 
> 
> Ubuntu 17.10 was necessary because it has a recent gcc (with fix for
> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=727621)
> 
> --allow-multiple-definition hack was necessary because function
> __sync_fetch_and_add_4 (and similar) is defined in libgcc and
> compiler_builtins (
> https://github.com/rust-lang-nursery/compiler-builtins/pull/115)
> 



More information about the Pkg-rust-maintainers mailing list