Skip to content

Commit

Permalink
feat: update gcc to 14.2
Browse files Browse the repository at this point in the history
Add some small fixes to make it compiple.

Signed-off-by: Andrey Smirnov <[email protected]>
  • Loading branch information
smira committed Nov 6, 2024
1 parent 9a98f73 commit e346cc1
Show file tree
Hide file tree
Showing 8 changed files with 51 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Pkgfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
format: v1alpha2

vars:
TOOLS_IMAGE: ghcr.io/siderolabs/tools:v1.9.0-alpha.0-5-g63ecd80
TOOLS_IMAGE: ghcr.io/siderolabs/tools:v1.9.0-alpha.0-7-g3750064

# renovate: datasource=github-releases depName=containernetworking/plugins
cni_version: v1.6.0
Expand Down
22 changes: 22 additions & 0 deletions apparmor/patches/basename.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
https://gitlab.alpinelinux.org/alpine/aports/-/raw/master/main/apparmor/libapparmor-basename.patch

--- a/libraries/libapparmor/testsuite/test_multi.c
+++ b/libraries/libapparmor/testsuite/test_multi.c
@@ -1,5 +1,3 @@
-#define _GNU_SOURCE /* for glibc's basename version */
-
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -7,6 +5,11 @@

#include <aalogparse.h>

+static const char *basename(const char *path)
+{
+ return strrchr(path, '/') ? strrchr(path, '/')+1 : path;
+}
+
int print_results(aa_log_record *record);

int main(int argc, char **argv)
11 changes: 8 additions & 3 deletions apparmor/pkg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,25 @@ steps:
- |
tar -xzf apparmor.tar.gz --strip-components=1
patch -p1 < /pkg/patches/basename.patch
mkdir -p /usr/bin \
&& ln -sf /toolchain/bin/env /usr/bin/env
ln -s /toolchain/bin/echo /toolchain/bin/which
ln -s /toolchain/include/linux /usr/include/linux
cd libraries/libapparmor
./autogen.sh
./configure --disable-dependency-tracking --disable-man-pages
./configure \
--disable-dependency-tracking \
--disable-man-pages
build:
- |
cd libraries/libapparmor
make -j $(nproc)
cd ../../parser
cd ../../parser
make arch -j $(nproc)
install:
- |
Expand Down
5 changes: 3 additions & 2 deletions kernel/build/config-amd64
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
# Automatically generated file; DO NOT EDIT.
# Linux/x86 6.6.59 Kernel Configuration
#
CONFIG_CC_VERSION_TEXT="gcc (GCC) 13.3.0"
CONFIG_CC_VERSION_TEXT="gcc (GCC) 14.2.0"
CONFIG_CC_IS_GCC=y
CONFIG_GCC_VERSION=130300
CONFIG_GCC_VERSION=140200
CONFIG_CLANG_VERSION=0
CONFIG_AS_IS_GNU=y
CONFIG_AS_VERSION=24301
Expand Down Expand Up @@ -6379,6 +6379,7 @@ CONFIG_ARCH_SUPPORTS_KMAP_LOCAL_FORCE_MAP=y
CONFIG_HAVE_ARCH_KASAN=y
CONFIG_HAVE_ARCH_KASAN_VMALLOC=y
CONFIG_CC_HAS_KASAN_GENERIC=y
CONFIG_CC_HAS_KASAN_SW_TAGS=y
CONFIG_CC_HAS_WORKING_NOSANITIZE_ADDRESS=y
# CONFIG_KASAN is not set
CONFIG_HAVE_ARCH_KFENCE=y
Expand Down
4 changes: 2 additions & 2 deletions kernel/build/config-arm64
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
# Automatically generated file; DO NOT EDIT.
# Linux/arm64 6.6.59 Kernel Configuration
#
CONFIG_CC_VERSION_TEXT="gcc (GCC) 13.3.0"
CONFIG_CC_VERSION_TEXT="gcc (GCC) 14.2.0"
CONFIG_CC_IS_GCC=y
CONFIG_GCC_VERSION=130300
CONFIG_GCC_VERSION=140200
CONFIG_CLANG_VERSION=0
CONFIG_AS_IS_GNU=y
CONFIG_AS_VERSION=24301
Expand Down
12 changes: 12 additions & 0 deletions libattr/patches/basename.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
https://gitlab.alpinelinux.org/alpine/aports/-/blob/master/main/attr/attr-basename.patch

diff -Naur a/tools/attr.c b/tools/attr.c
--- a/tools/attr.c 2024-08-03 05:18:35.620953300 -0400
+++ b/tools/attr.c 2024-08-03 05:19:17.751848345 -0400
@@ -28,6 +28,7 @@
#include <errno.h>
#include <string.h>
#include <locale.h>
+#include <libgen.h>

#include <attr/attributes.h>
2 changes: 2 additions & 0 deletions libattr/pkg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ steps:
- |
tar -xf attr.tar.xz --strip-components=1
patch -p1 < /pkg/patches/basename.patch
OPTIMIZER="$CFLAGS" \
DEBUG=-DNDEBUG \
INSTALL_USER=root \
Expand Down
1 change: 1 addition & 0 deletions musl/pkg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ steps:
tar -xzf musl.tar.gz --strip-components=1
patch -p1 < /pkg/patches/handle-aux-at-base.patch
patch -p1 < /pkg/patches/close-range.patch
mkdir /bin
ln -sv /toolchain/bin/bash /bin/sh
Expand Down

0 comments on commit e346cc1

Please sign in to comment.