Skip to content

Commit f9d111c

Browse files
committed
some other updates
1 parent dc75f2c commit f9d111c

File tree

1 file changed

+18
-16
lines changed

1 file changed

+18
-16
lines changed

Dockerfile

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ubuntu:22.04 as build
1+
FROM ubuntu:22.04 AS build
22

33
ENV TZ=Europe/Rome
44
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && \
@@ -12,7 +12,7 @@ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone &
1212
dh-autoreconf \
1313
git \
1414
gperf \
15-
# various libs required to compile osxcross
15+
# various libs requied to compile osxcross
1616
libxml2-dev \
1717
libssl-dev \
1818
libz-dev \
@@ -26,21 +26,24 @@ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone &
2626
llvm \
2727
&& rm -rf /var/lib/apt/lists/* \
2828
&& ln -s /usr/bin/clang-13 /usr/bin/clang \
29-
&& ln -s /usr/bin/clang++-13 /usr/bin/clang++
29+
&& ln -s /usr/bin/clang++-13 /usr/bin/clang++ \
30+
# pretend to have 1.17 instead of 1.16
31+
&& ln -s /usr/bin/aclocal /usr/bin/aclocal-1.17 \
32+
&& ln -s /usr/bin/automake /usr/bin/automake-1.17
3033

3134
# Install toolchains in /opt
3235
RUN curl -L downloads.arduino.cc/tools/internal/toolchains.tar.gz | tar -xz "opt"
3336
# install proper arm toolchains (already present in the toolchains.tar.gz archive)
3437
# curl -L 'https://developer.arm.com/-/media/Files/downloads/gnu-a/8.3-2019.03/binrel/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf.tar.xz' | tar -xJC /opt && \
3538
# curl -L 'https://developer.arm.com/-/media/Files/downloads/gnu-a/8.3-2019.03/binrel/gcc-arm-8.3-2019.03-x86_64-aarch64-linux-gnu.tar.xz' | tar -xJC /opt
3639

37-
RUN cd /opt/osxcross && \
38-
git pull && \
40+
WORKDIR /opt/osxcross
41+
RUN git pull && \
3942
# use a specific version of osxcross (it does not have tags), this commit has the automatic install of compiler_rt libraries
4043
git checkout b875d7c1360c8ff2077463d7a5a12e1cff1cc683 && \
41-
UNATTENDED=1 SDK_VERSION=10.15 ./build.sh
42-
RUN cd /opt/osxcross && \
44+
UNATTENDED=1 SDK_VERSION=10.15 ./build.sh && \
4345
ENABLE_COMPILER_RT_INSTALL=1 SDK_VERSION=10.15 ./build_compiler_rt.sh
46+
4447
# Set toolchains paths
4548
# arm-linux-gnueabihf-gcc -> linux_arm
4649
# aarch64-linux-gnu-gcc -> linux_arm64
@@ -49,18 +52,16 @@ RUN cd /opt/osxcross && \
4952
# o64-clang -> darwin_amd64
5053
ENV PATH=/opt/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf/bin/:/opt/gcc-arm-8.3-2019.03-x86_64-aarch64-linux-gnu/bin/:/opt/x86_64-ubuntu16.04-linux-gnu-gcc/bin/:/opt/i686-ubuntu16.04-linux-gnu/bin/:/opt/osxcross/target/bin/:$PATH
5154

52-
WORKDIR /workdir
53-
5455
# Handle libusb and libudev compilation and merging
5556
COPY deps/ /opt/lib/
5657
# compiler name is arm-linux-gnueabihf-gcc '-gcc' is added by ./configure
57-
RUN CROSS_COMPILE=x86_64-ubuntu16.04-linux-gnu /opt/lib/build_libs.sh
58-
RUN CROSS_COMPILE=arm-linux-gnueabihf /opt/lib/build_libs.sh
59-
RUN CROSS_COMPILE=aarch64-linux-gnu /opt/lib/build_libs.sh
60-
RUN CROSS_COMPILE=i686-ubuntu16.04-linux-gnu /opt/lib/build_libs.sh
61-
RUN CROSS_COMPILE=i686-w64-mingw32 /opt/lib/build_libs.sh
62-
# CROSS_COMPILER is used to override the compiler
63-
RUN CROSS_COMPILER=o64-clang CROSS_COMPILE=x86_64-apple-darwin13 AR=/opt/osxcross/target/bin/x86_64-apple-darwin13-ar RANLIB=/opt/osxcross/target/bin/x86_64-apple-darwin13-ranlib /opt/lib/build_libs.sh
58+
RUN CROSS_COMPILE=x86_64-ubuntu16.04-linux-gnu /opt/lib/build_libs.sh && \
59+
CROSS_COMPILE=arm-linux-gnueabihf /opt/lib/build_libs.sh && \
60+
CROSS_COMPILE=aarch64-linux-gnu /opt/lib/build_libs.sh && \
61+
CROSS_COMPILE=i686-ubuntu16.04-linux-gnu /opt/lib/build_libs.sh && \
62+
CROSS_COMPILE=i686-w64-mingw32 /opt/lib/build_libs.sh && \
63+
# CROSS_COMPILER is used to override the compiler
64+
CROSS_COMPILER=o64-clang CROSS_COMPILE=x86_64-apple-darwin13 AR=/opt/osxcross/target/bin/x86_64-apple-darwin13-ar RANLIB=/opt/osxcross/target/bin/x86_64-apple-darwin13-ranlib /opt/lib/build_libs.sh
6465

6566
FROM ubuntu:22.04
6667
# Copy all the installed toolchains and compiled libs
@@ -86,6 +87,7 @@ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone &
8687
&& rm -rf /var/lib/apt/lists/* \
8788
&& ln -s /usr/bin/clang-13 /usr/bin/clang \
8889
&& ln -s /usr/bin/clang++-13 /usr/bin/clang++
90+
8991
# Set toolchains paths
9092
# arm-linux-gnueabihf-gcc -> linux_arm
9193
# aarch64-linux-gnu-gcc -> linux_arm64

0 commit comments

Comments
 (0)