Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions tools/ci/docker/linux/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,43 @@ RUN mkdir -p gcc-arm-none-eabi && \
curl -s -L "https://developer.arm.com/-/media/Files/downloads/gnu/13.2.Rel1/binrel/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi.tar.xz" \
| tar -C gcc-arm-none-eabi --strip-components 1 -xJ

###############################################################################
# Build image for tool required by FDPIC module builds
###############################################################################
FROM nuttx-toolchain-base AS nuttx-toolchain-fdpic
# Build the arm-uclinuxfdpiceabi binutils. The stock arm-none-eabi compiler
# emits correct FDPIC objects, but its assembler and linker cannot handle
# them: ld is configured with the armelf emulation alone and links an FDPIC
# object into an ordinary shared object, turning every import into an
# R_ARM_JUMP_SLOT where the ABI wants an R_ARM_FUNCDESC_VALUE. No
# distribution packages this target, so it is built here.
RUN apt-get update -qq && DEBIAN_FRONTEND="noninteractive" apt-get install -y -qq \
bison \
flex \
g++ \
gcc \
make \
texinfo \
zlib1g-dev

RUN mkdir -p /tools/fdpic-tools/source && \
curl -s -L --fail "https://sourceware.org/pub/binutils/releases/binutils-2.43.tar.xz" \
| tar -C /tools/fdpic-tools/source --strip-components=1 -xJ

# MAKEINFO=true because the info pages are of no use here and building them
# is the slowest part of a binutils build.

RUN mkdir -p /tools/fdpic-tools/build && cd /tools/fdpic-tools/build && \
/tools/fdpic-tools/source/configure \
--target=arm-uclinuxfdpiceabi \
--prefix=/tools/binutils-arm-uclinuxfdpiceabi \
--disable-nls \
--disable-werror \
--with-system-zlib && \
make -j$(nproc) MAKEINFO=true && make install-strip MAKEINFO=true && \
rm -rf /tools/binutils-arm-uclinuxfdpiceabi/share && \
cd /tools && rm -rf fdpic-tools

###############################################################################
# Build image for tool required by ARM64 builds
###############################################################################
Expand Down Expand Up @@ -470,6 +507,10 @@ ENV PATH="/tools/gcc-arm-none-eabi/bin:$PATH"
COPY --from=nuttx-toolchain-arm64 /tools/gcc-aarch64-none-elf/ gcc-aarch64-none-elf/
ENV PATH="/tools/gcc-aarch64-none-elf/bin:$PATH"

# FDPIC module toolchain
COPY --from=nuttx-toolchain-fdpic /tools/binutils-arm-uclinuxfdpiceabi/ binutils-arm-uclinuxfdpiceabi/
ENV PATH="/tools/binutils-arm-uclinuxfdpiceabi/bin:$PATH"

# AVR32 toolchain
COPY --from=nuttx-toolchain-avr32 /tools/gcc-avr32-gnu/ gcc-avr32-gnu/
ENV PATH="/tools/gcc-avr32-gnu/bin:$PATH"
Expand Down
Loading