Skip to content

Switch to GCC 14 #1273

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

Merged
merged 1 commit into from
May 12, 2025
Merged
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
2 changes: 1 addition & 1 deletion .containerversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
46
47
4 changes: 0 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -337,10 +337,6 @@ if(NOT CMAKE_BUILD_TYPE STREQUAL "DEBUG")
endif()
endif()

# Disallow duplicate definitions, which is the default since GCC
# 10. It was not default in gcc-arm-none-eabi-8-2018-q4.
string(APPEND CMAKE_C_FLAGS " -fno-common")

# For `struct timespec` and `strdup`
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_XOPEN_SOURCE=600")

Expand Down
18 changes: 8 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,16 @@ RUN echo "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main" >> /etc/a

# Install gcc8-arm-none-eabi
RUN if [ "${TARGETPLATFORM}" = "linux/arm64" ]; then \
GNU_TOOLCHAIN=https://developer.arm.com/-/media/Files/downloads/gnu/13.3.rel1/binrel/arm-gnu-toolchain-13.3.rel1-aarch64-arm-none-eabi.tar.xz \
GNU_TOOLCHAIN_HASH=c8824bffd057afce2259f7618254e840715f33523a3d4e4294f471208f976764 \
GNU_TOOLCHAIN_FORMAT=xz; \
GNU_TOOLCHAIN=https://developer.arm.com/-/media/Files/downloads/gnu/14.2.rel1/binrel/arm-gnu-toolchain-14.2.rel1-aarch64-arm-none-eabi.tar.xz \
GNU_TOOLCHAIN_HASH=87330bab085dd8749d4ed0ad633674b9dc48b237b61069e3b481abd364d0a684; \
else \
GNU_TOOLCHAIN=https://developer.arm.com/-/media/Files/downloads/gnu-rm/8-2018q4/gcc-arm-none-eabi-8-2018-q4-major-linux.tar.bz2 \
GNU_TOOLCHAIN_HASH=fb31fbdfe08406ece43eef5df623c0b2deb8b53e405e2c878300f7a1f303ee52 \
GNU_TOOLCHAIN_FORMAT=bz2; \
GNU_TOOLCHAIN=https://developer.arm.com/-/media/Files/downloads/gnu/14.2.rel1/binrel/arm-gnu-toolchain-14.2.rel1-x86_64-arm-none-eabi.tar.xz \
GNU_TOOLCHAIN_HASH=62a63b981fe391a9cbad7ef51b17e49aeaa3e7b0d029b36ca1e9c3b2a9b78823; \
fi; \
wget -O gcc.tar.${GNU_TOOLCHAIN_FORMAT} ${GNU_TOOLCHAIN} &&\
echo "$GNU_TOOLCHAIN_HASH gcc.tar.${GNU_TOOLCHAIN_FORMAT}" | sha256sum -c &&\
tar -xvf gcc.tar.${GNU_TOOLCHAIN_FORMAT} -C /usr/local --strip-components=1 &&\
rm -f gcc.tar.${GNU_TOOLCHAIN_FORMAT}
curl -sSL -o gcc.tar.xz ${GNU_TOOLCHAIN} && \
Copy link
Collaborator

Choose a reason for hiding this comment

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

out of curiosity, why wget->curl?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think we should pick one and not install the other and I think curl is better than wget.

echo "$GNU_TOOLCHAIN_HASH gcc.tar.xz" | sha256sum -c && \
tar -xvf gcc.tar.xz -C /usr/local --strip-components=1 && \
rm -f gcc.tar.xz

# Tools for building
RUN apt-get update && apt-get install -y \
Expand Down
2 changes: 1 addition & 1 deletion src/sd.c
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ bool sd_list_subdir(sd_list_t* list_out, const char* subdir)
}
list_out->num_files = 0;
size_t allocated_files = 16;
list_out->files = (char**)calloc(sizeof(char*), allocated_files);
list_out->files = (char**)calloc(allocated_files, sizeof(char*));
Copy link
Collaborator

Choose a reason for hiding this comment

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

🙈

if (list_out->files == NULL) {
Abort("Error: alloc sd_list_subdir");
}
Expand Down