Skip to content

Commit 2cc84e1

Browse files
committed
Bump Buildroot version and select GCC 14 with binutils 2.42
This commit intends to avoid a recent glibc bug that mistakenly uses 64-bit time on 32-bit machines. Consider the Linux `input_event` structure: struct input_event { struct timeval time; __u16 type; __u16 code; __s32 value; }; On RV32 Linux, the total size of this structure should be 16 bytes (8+2+2+4). However, due to a known glibc bug [2] that incorrectly utilizes the 64-bit time type, the actual size of the structure becomes 24 bytes (16+2+2+4). Without this fix, the bug would affect the usage of DirectFB2 in the semu project. Fortunately, upgrading the toolchain version resolves the issue. [1] https://lore.kernel.org/lkml/[email protected]/T/ [2] https://sourceware.org/pipermail/libc-help/2024-January/006563.html
1 parent 207a4d7 commit 2cc84e1

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

configs/buildroot.config

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ BR2_TOOLCHAIN_BUILDROOT_GLIBC=y
2222
BR2_TOOLCHAIN_BUILDROOT_LIBC="glibc"
2323
# BR2_TOOLCHAIN_BUILDROOT_CXX is not set
2424
BR2_KERNEL_HEADERS_6_1=y
25-
BR2_BINUTILS_VERSION_2_41_X=y
25+
BR2_BINUTILS_VERSION_2_42_X=y
2626
# BR2_BINUTILS_GPROFNG is not set
27-
BR2_GCC_VERSION_12_X=y
27+
BR2_GCC_VERSION_14_X=y
2828
BR2_EXTRA_GCC_CONFIG_OPTIONS="--enable-softfloat"
2929
BR2_TOOLCHAIN_HEADERS_AT_LEAST="6.1"
30-
BR2_TOOLCHAIN_GCC_AT_LEAST_12=y
31-
BR2_TOOLCHAIN_GCC_AT_LEAST="12"
30+
BR2_TOOLCHAIN_GCC_AT_LEAST_14=y
31+
BR2_TOOLCHAIN_GCC_AT_LEAST="14"
3232
BR2_SSP_NONE=y
3333
# BR2_SSP_REGULAR is not set
3434
# BR2_SSP_STRONG is not set

scripts/build-image.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ PARALLEL="-j$(nproc)"
2121

2222
function do_buildroot
2323
{
24-
ASSERT git clone https://github.com/buildroot/buildroot -b 2024.02.x --depth=1
24+
ASSERT git clone https://github.com/buildroot/buildroot -b 2024.05.2 --depth=1
2525
cp -f configs/buildroot.config buildroot/.config
2626
cp -f configs/busybox.config buildroot/busybox.config
2727
# Otherwise, the error below raises:

0 commit comments

Comments
 (0)