Skip to content

Commit 621cfee

Browse files
committed
Switch to GCC 14
1 parent 01ae93f commit 621cfee

File tree

4 files changed

+10
-16
lines changed

4 files changed

+10
-16
lines changed

.containerversion

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
46
1+
47

CMakeLists.txt

-4
Original file line numberDiff line numberDiff line change
@@ -333,10 +333,6 @@ if(NOT CMAKE_BUILD_TYPE STREQUAL "DEBUG")
333333
endif()
334334
endif()
335335

336-
# Disallow duplicate definitions, which is the default since GCC
337-
# 10. It was not default in gcc-arm-none-eabi-8-2018-q4.
338-
string(APPEND CMAKE_C_FLAGS " -fno-common")
339-
340336
# For `struct timespec` and `strdup`
341337
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_XOPEN_SOURCE=600")
342338

Dockerfile

+8-10
Original file line numberDiff line numberDiff line change
@@ -34,18 +34,16 @@ RUN echo "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main" >> /etc/a
3434

3535
# Install gcc8-arm-none-eabi
3636
RUN if [ "${TARGETPLATFORM}" = "linux/arm64" ]; then \
37-
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 \
38-
GNU_TOOLCHAIN_HASH=c8824bffd057afce2259f7618254e840715f33523a3d4e4294f471208f976764 \
39-
GNU_TOOLCHAIN_FORMAT=xz; \
37+
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 \
38+
GNU_TOOLCHAIN_HASH=87330bab085dd8749d4ed0ad633674b9dc48b237b61069e3b481abd364d0a684; \
4039
else \
41-
GNU_TOOLCHAIN=https://developer.arm.com/-/media/Files/downloads/gnu-rm/8-2018q4/gcc-arm-none-eabi-8-2018-q4-major-linux.tar.bz2 \
42-
GNU_TOOLCHAIN_HASH=fb31fbdfe08406ece43eef5df623c0b2deb8b53e405e2c878300f7a1f303ee52 \
43-
GNU_TOOLCHAIN_FORMAT=bz2; \
40+
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 \
41+
GNU_TOOLCHAIN_HASH=62a63b981fe391a9cbad7ef51b17e49aeaa3e7b0d029b36ca1e9c3b2a9b78823; \
4442
fi; \
45-
wget -O gcc.tar.${GNU_TOOLCHAIN_FORMAT} ${GNU_TOOLCHAIN} &&\
46-
echo "$GNU_TOOLCHAIN_HASH gcc.tar.${GNU_TOOLCHAIN_FORMAT}" | sha256sum -c &&\
47-
tar -xvf gcc.tar.${GNU_TOOLCHAIN_FORMAT} -C /usr/local --strip-components=1 &&\
48-
rm -f gcc.tar.${GNU_TOOLCHAIN_FORMAT}
43+
curl -sSL -o gcc.tar.xz ${GNU_TOOLCHAIN} && \
44+
echo "$GNU_TOOLCHAIN_HASH gcc.tar.xz" | sha256sum -c && \
45+
tar -xvf gcc.tar.xz -C /usr/local --strip-components=1 && \
46+
rm -f gcc.tar.xz
4947

5048
# Tools for building
5149
RUN apt-get update && apt-get install -y \

src/sd.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ bool sd_list_subdir(sd_list_t* list_out, const char* subdir)
228228
}
229229
list_out->num_files = 0;
230230
size_t allocated_files = 16;
231-
list_out->files = (char**)calloc(sizeof(char*), allocated_files);
231+
list_out->files = (char**)calloc(allocated_files, sizeof(char*));
232232
if (list_out->files == NULL) {
233233
Abort("Error: alloc sd_list_subdir");
234234
}

0 commit comments

Comments
 (0)