Skip to content

Commit f4fd80c

Browse files
committed
zephyr-kernel-src-3.3.0: fix build with gcc-13
Configuration error: | -- Configuring done (4.9s) | CMake Error in CMakeLists.txt: | Target "zephyr_interface" contains relative path in its | INTERFACE_INCLUDE_DIRECTORIES: | | "include-fixed" With GCC-13, limits.h and syslimits.h header files are always being installed to include folder. https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=be9dd80f933480 Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
1 parent b0173e0 commit f4fd80c

2 files changed

Lines changed: 41 additions & 0 deletions

File tree

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
From 1fadb81a0ba1e6ba85445e8fb47916b7ff077170 Mon Sep 17 00:00:00 2001
2+
From: Naveen Saini <naveen.kumar.saini@intel.com>
3+
Date: Mon, 29 May 2023 17:48:20 +0800
4+
Subject: [PATCH] gcc/target.cmake: fix build with gcc-13
5+
6+
Configuration error:
7+
| -- Configuring done (4.9s)
8+
| CMake Error in CMakeLists.txt:
9+
| Target "zephyr_interface" contains relative path in its
10+
| INTERFACE_INCLUDE_DIRECTORIES:
11+
|
12+
| "include-fixed"
13+
14+
With GCC-13, limits.h and syslimits.h header files
15+
are always being installed to include folder.
16+
https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=be9dd80f933480
17+
18+
Upstream-Status: Pending
19+
20+
Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
21+
---
22+
cmake/compiler/gcc/target.cmake | 2 +-
23+
1 file changed, 1 insertion(+), 1 deletion(-)
24+
25+
diff --git a/cmake/compiler/gcc/target.cmake b/cmake/compiler/gcc/target.cmake
26+
index c970048297..b8a70b7919 100644
27+
--- a/cmake/compiler/gcc/target.cmake
28+
+++ b/cmake/compiler/gcc/target.cmake
29+
@@ -34,7 +34,7 @@ if(NOT DEFINED NOSYSDEF_CFLAG)
30+
set(NOSYSDEF_CFLAG -undef)
31+
endif()
32+
33+
-foreach(file_name include/stddef.h include-fixed/limits.h)
34+
+foreach(file_name include/stddef.h include/limits.h)
35+
execute_process(
36+
COMMAND ${CMAKE_C_COMPILER} --print-file-name=${file_name}
37+
OUTPUT_VARIABLE _OUTPUT
38+
--
39+
2.34.1
40+

meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-kernel-src-3.3.0.inc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ SRC_URI_ZEPHYR_THRIFT ?= "git://github.com/zephyrproject-rtos/thrift;protocol=ht
117117
SRC_URI_PATCHES ?= "\
118118
file://0001-3.3-x86-fix-efi-binary-generation-issue-in-cross-compila.patch;patchdir=zephyr \
119119
file://0002-3.3-toolchain-gcc-Fix-separator-between-directives-on-sa.patch;patchdir=zephyr \
120+
file://0001-gcc-target.cmake-fix-build-with-gcc-13.patch;patchdir=zephyr \
120121
"
121122

122123
SRC_URI = "\

0 commit comments

Comments
 (0)