1
- FROM ubuntu:latest as build
1
+ FROM ubuntu:22.04 as build
2
2
3
3
ENV TZ=Europe/Rome
4
4
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && \
5
5
apt-get update && \
6
6
apt-get install -y \
7
7
build-essential \
8
8
# Intall clang compiler used by macos
9
- clang \
9
+ clang-13 \
10
10
cmake \
11
11
curl \
12
12
dh-autoreconf \
@@ -24,9 +24,12 @@ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone &
24
24
tar \
25
25
unzip \
26
26
llvm \
27
- && rm -rf /var/lib/apt/lists/*
27
+ && rm -rf /var/lib/apt/lists/* \
28
+ && ln -s /usr/bin/clang-13 /usr/bin/clang \
29
+ && ln -s /usr/bin/clang++-13 /usr/bin/clang++
30
+
28
31
# Install toolchains in /opt
29
- RUN curl downloads.arduino.cc/tools/internal/toolchains.tar.gz | tar -xz "opt"
32
+ RUN curl -L downloads.arduino.cc/tools/internal/toolchains.tar.gz | tar -xz "opt"
30
33
# install proper arm toolchains (already present in the toolchains.tar.gz archive)
31
34
# 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 && \
32
35
# 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
@@ -35,7 +38,8 @@ RUN cd /opt/osxcross && \
35
38
git pull && \
36
39
# use a specific version of osxcross (it does not have tags), this commit has the automatic install of compiler_rt libraries
37
40
git checkout b875d7c1360c8ff2077463d7a5a12e1cff1cc683 && \
38
- UNATTENDED=1 SDK_VERSION=10.15 ./build.sh && \
41
+ UNATTENDED=1 SDK_VERSION=10.15 ./build.sh
42
+ RUN cd /opt/osxcross && \
39
43
ENABLE_COMPILER_RT_INSTALL=1 SDK_VERSION=10.15 ./build_compiler_rt.sh
40
44
# Set toolchains paths
41
45
# arm-linux-gnueabihf-gcc -> linux_arm
@@ -50,25 +54,25 @@ WORKDIR /workdir
50
54
# Handle libusb and libudev compilation and merging
51
55
COPY deps/ /opt/lib/
52
56
# compiler name is arm-linux-gnueabihf-gcc '-gcc' is added by ./configure
53
- RUN CROSS_COMPILE=x86_64-ubuntu16.04-linux-gnu /opt/lib/build_libs.sh && \
54
- CROSS_COMPILE=arm-linux-gnueabihf /opt/lib/build_libs.sh && \
55
- CROSS_COMPILE=aarch64-linux-gnu /opt/lib/build_libs.sh && \
56
- CROSS_COMPILE=i686-ubuntu16.04-linux-gnu /opt/lib/build_libs.sh && \
57
- CROSS_COMPILE=i686-w64-mingw32 /opt/lib/build_libs.sh && \
58
- # CROSS_COMPILER is used to override the compiler
59
- 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
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
60
64
61
- FROM ubuntu:latest
65
+ FROM ubuntu:22.04
62
66
# Copy all the installed toolchains and compiled libs
63
67
COPY --from=build /opt /opt
64
- COPY --from=build /usr/lib/llvm-10 /lib/clang/10 .0.0 /usr/lib/llvm-10 /lib/clang/10 .0.0
68
+ COPY --from=build /usr/lib/llvm-13 /lib/clang/13 .0.1 /usr/lib/llvm-13 /lib/clang/13 .0.1
65
69
ENV TZ=Europe/Rome
66
70
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && \
67
71
apt-get update && \
68
72
apt-get install -y \
69
73
build-essential \
70
74
# Intall clang compiler used by macos
71
- clang \
75
+ clang-13 \
72
76
cmake \
73
77
dh-autoreconf \
74
78
git \
@@ -79,7 +83,9 @@ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone &
79
83
tar \
80
84
bison \
81
85
flex \
82
- && rm -rf /var/lib/apt/lists/*
86
+ && rm -rf /var/lib/apt/lists/* \
87
+ && ln -s /usr/bin/clang-13 /usr/bin/clang \
88
+ && ln -s /usr/bin/clang++-13 /usr/bin/clang++
83
89
# Set toolchains paths
84
90
# arm-linux-gnueabihf-gcc -> linux_arm
85
91
# aarch64-linux-gnu-gcc -> linux_arm64
0 commit comments