Skip to content

Commit dc75f2c

Browse files
committed
Updated deps and compilers
1 parent 609f7e9 commit dc75f2c

File tree

296 files changed

+27988
-25019
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

296 files changed

+27988
-25019
lines changed

Dockerfile

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
FROM ubuntu:latest 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 && \
55
apt-get update && \
66
apt-get install -y \
77
build-essential \
88
# Intall clang compiler used by macos
9-
clang \
9+
clang-13 \
1010
cmake \
1111
curl \
1212
dh-autoreconf \
@@ -24,9 +24,12 @@ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone &
2424
tar \
2525
unzip \
2626
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+
2831
# 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"
3033
# install proper arm toolchains (already present in the toolchains.tar.gz archive)
3134
# 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 && \
3235
# 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 && \
3538
git pull && \
3639
# use a specific version of osxcross (it does not have tags), this commit has the automatic install of compiler_rt libraries
3740
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 && \
3943
ENABLE_COMPILER_RT_INSTALL=1 SDK_VERSION=10.15 ./build_compiler_rt.sh
4044
# Set toolchains paths
4145
# arm-linux-gnueabihf-gcc -> linux_arm
@@ -50,25 +54,25 @@ WORKDIR /workdir
5054
# Handle libusb and libudev compilation and merging
5155
COPY deps/ /opt/lib/
5256
# 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
6064

61-
FROM ubuntu:latest
65+
FROM ubuntu:22.04
6266
# Copy all the installed toolchains and compiled libs
6367
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
6569
ENV TZ=Europe/Rome
6670
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && \
6771
apt-get update && \
6872
apt-get install -y \
6973
build-essential \
7074
# Intall clang compiler used by macos
71-
clang \
75+
clang-13 \
7276
cmake \
7377
dh-autoreconf \
7478
git \
@@ -79,7 +83,9 @@ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone &
7983
tar \
8084
bison \
8185
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++
8389
# Set toolchains paths
8490
# arm-linux-gnueabihf-gcc -> linux_arm
8591
# aarch64-linux-gnu-gcc -> linux_arm64

deps/build_libs.sh

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ else
1515
CROSS_COMPILER=$CC
1616
CROSS_COMPILER_CXX=$CXX
1717
fi
18-
cd /opt/lib/libusb-1.0.26
18+
cd /opt/lib/libusb-1.0.28
1919
LIBUSB_DIR=$(pwd)
2020
export LIBUSB_DIR
2121
./configure --prefix="${PREFIX}" --with-pic --disable-udev --enable-static --disable-shared --host="${CROSS_COMPILE}"
@@ -30,7 +30,7 @@ if [[ $CROSS_COMPILE == "x86_64-apple-darwin13" ]]; then
3030
export LIBUSB_1_0_CFLAGS=-I${PREFIX}/include/libusb-1.0
3131
export LIBUSB_1_0_LIBS="-L${PREFIX}/lib -lusb-1.0"
3232
fi
33-
cd /opt/lib/libusb-compat-0.1.7
33+
cd /opt/lib/libusb-compat-0.1.8
3434
LIBUSB0_DIR=$(pwd)
3535
export LIBUSB0_DIR
3636
PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig" ./configure --prefix="${PREFIX}" --enable-static --disable-shared --host="${CROSS_COMPILE}"
@@ -52,9 +52,10 @@ if [[ $CROSS_COMPILE == "x86_64-apple-darwin13" ]]; then
5252
CMAKE_EXTRA_FLAG="$CMAKE_EXTRA_FLAG -DCMAKE_AR=$AR -DCMAKE_RANLIB=$RANLIB"
5353
fi
5454

55-
cmake -DCMAKE_C_COMPILER="$CROSS_COMPILER" -DCMAKE_CXX_COMPILER="$CROSS_COMPILER_CXX" -DCMAKE_INSTALL_PREFIX="$PREFIX" "$CMAKE_EXTRA_FLAG" -DLIBUSB_INCLUDE_DIR="$PREFIX/include/libusb-1.0" -DLIBFTDI_LIBRARY_DIRS="$PREFIX/lib" -DLIBUSB_LIBRARIES="usb-1.0" ../
56-
make -j"$(nproc)"
57-
make install
55+
# TODO: did not build anymore (missing -L${PREFIX}/lib to libusb-1.0?)
56+
#cmake -DCMAKE_C_COMPILER="$CROSS_COMPILER" -DCMAKE_CXX_COMPILER="$CROSS_COMPILER_CXX" -DCMAKE_INSTALL_PREFIX="$PREFIX" "$CMAKE_EXTRA_FLAG" -DLIBUSB_INCLUDE_DIR="$PREFIX/include/libusb-1.0" -DLIBFTDI_LIBRARY_DIRS="$PREFIX/lib" -DLIBUSB_LIBRARIES="usb-1.0" ../
57+
#make -j"$(nproc)"
58+
#make install
5859

5960
cd /opt/lib/libelf-0.8.13
6061
LIBELF_DIR=$(pwd)

0 commit comments

Comments
 (0)