Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support the latest newlib, libc++ and GCC #442

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
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
16 changes: 12 additions & 4 deletions Configuration.mk
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,10 @@ else ifeq ($(CC_rv32_version_major),12)
NEWLIB_VERSION_rv32 := 4.3.0.20230120
else ifeq ($(CC_rv32_version_major),13)
NEWLIB_VERSION_rv32 := 4.3.0.20230120
else ifeq ($(CC_rv32_version_major),14)
NEWLIB_VERSION_rv32 := 4.4.0.20231231
else
NEWLIB_VERSION_rv32 := 4.3.0.20230120
NEWLIB_VERSION_rv32 := 4.4.0.20231231
endif
NEWLIB_VERSION_rv32i := $(NEWLIB_VERSION_rv32)
NEWLIB_VERSION_rv32imc := $(NEWLIB_VERSION_rv32)
Expand All @@ -270,8 +272,10 @@ else ifeq ($(CC_rv32_version_major),12)
LIBCPP_VERSION_rv32 := 12.3.0
else ifeq ($(CC_rv32_version_major),13)
LIBCPP_VERSION_rv32 := 13.2.0
else ifeq ($(CC_rv32_version_major),14)
LIBCPP_VERSION_rv32 := 14.1.0
else
LIBCPP_VERSION_rv32 := 13.2.0
LIBCPP_VERSION_rv32 := 14.1.0
endif
LIBCPP_VERSION_rv32i := $(LIBCPP_VERSION_rv32)
LIBCPP_VERSION_rv32imc := $(LIBCPP_VERSION_rv32)
Expand Down Expand Up @@ -393,8 +397,10 @@ else ifeq ($(CC_cortex-m_version_major),12)
NEWLIB_VERSION_cortex-m := 4.3.0.20230120
else ifeq ($(CC_cortex-m_version_major),13)
NEWLIB_VERSION_cortex-m := 4.3.0.20230120
else ifeq ($(CC_cortex-m_version_major),14)
NEWLIB_VERSION_cortex-m := 4.4.0.20231231
else
NEWLIB_VERSION_cortex-m := 4.3.0.20230120
NEWLIB_VERSION_cortex-m := 4.4.0.20231231
endif
NEWLIB_VERSION_cortex-m0 := $(NEWLIB_VERSION_cortex-m)
NEWLIB_VERSION_cortex-m3 := $(NEWLIB_VERSION_cortex-m)
Expand All @@ -411,8 +417,10 @@ else ifeq ($(CC_cortex-m_version_major),12)
LIBCPP_VERSION_cortex-m := 12.3.0
else ifeq ($(CC_cortex-m_version_major),13)
LIBCPP_VERSION_cortex-m := 13.2.0
else ifeq ($(CC_cortex-m_version_major),14)
LIBCPP_VERSION_cortex-m := 14.1.0
else
LIBCPP_VERSION_cortex-m := 13.2.0
LIBCPP_VERSION_cortex-m := 14.1.0
endif
LIBCPP_VERSION_cortex-m0 := $(LIBCPP_VERSION_cortex-m)
LIBCPP_VERSION_cortex-m3 := $(LIBCPP_VERSION_cortex-m)
Expand Down
26 changes: 26 additions & 0 deletions libc++/docker/docker-libc++-14.1.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
FROM debian:trixie

LABEL maintainer="Tock Project Developers <tock-dev@googlegroups.com>"
LABEL version="0.1"
LABEL description="Dockerfile to build libtock-c libc++."

# Disable Prompt During Packages Installation
ARG DEBIAN_FRONTEND=noninteractive
# Update Ubuntu Software repository
RUN apt update

# Install our toolchains
RUN apt install -y gcc-arm-none-eabi gcc-riscv64-unknown-elf

# Install needed tools
RUN apt install -y git build-essential wget rsync zip texinfo

# Install needed library
RUN apt install -y libmpc-dev file

# Clone the libtock-c source so we can use the build scripts
RUN git clone https://github.com/alistair23/libtock-c
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
RUN git clone https://github.com/alistair23/libtock-c
RUN git clone https://github.com/tock/libtock-c

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then it won't build. It's a chicken and egg problem, you need 1607c6b merged first

RUN cd libtock-c && git fetch && git checkout 35f27e15df6a7672fae8cc4eb72350dcc42ef1bd

# Actually build the toolchain
RUN cd libtock-c/libc++ && make GCC_VERSION=14.1.0 NEWLIB_VERSION=4.4.0.20231231 -j16
5 changes: 5 additions & 0 deletions libc++/docker/docker-libc++-14.1.0/docker-create.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash

docker build -t libtock-c-libcpp-14.1.0 .
id=$(docker create libtock-c-libcpp-14.1.0)
docker cp $id:/libtock-c/libc++/libtock-libc++-14.1.0.zip libtock-libc++-14.1.0.zip
27 changes: 27 additions & 0 deletions newlib/docker/docker-newlib-4.4.0.20231231/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
###
### Dockerfile to build libtock-newlib-4.4.0.20231231
###

FROM debian:trixie

LABEL maintainer="Tock Project Developers <tock-dev@googlegroups.com>"
LABEL version="0.1"
LABEL description="Dockerfile to build libtock-c newlib 4.4.0.20231231."

# Disable Prompt During Packages Installation
ARG DEBIAN_FRONTEND=noninteractive
# Update Ubuntu Software repository
RUN apt update

# Install our toolchains
RUN apt install -y gcc-arm-none-eabi gcc-riscv64-unknown-elf

# Install needed tools
RUN apt install -y git build-essential wget rsync texinfo zip

# Clone the libtock-c source so we can use the build scripts
RUN git clone https://github.com/alistair23/libtock-c
RUN cd libtock-c && git fetch && git checkout 35f27e15df6a7672fae8cc4eb72350dcc42ef1bd

# Actually build the toolchain
RUN cd libtock-c/newlib && make NEWLIB_VERSION=4.4.0.20231231
5 changes: 5 additions & 0 deletions newlib/docker/docker-newlib-4.4.0.20231231/docker-create.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash

docker build -t libtock-c-newlib-4.4.0.20231231 .
id=$(docker create libtock-c-newlib-4.4.0.20231231)
docker cp $id:/libtock-c/newlib/libtock-newlib-4.4.0.20231231.zip libtock-newlib-4.4.0.20231231.zip
Empty file.
Loading