Skip to content
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

Build fixes for gcc13 #9

Merged
merged 1 commit into from
Jun 11, 2024
Merged
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
16 changes: 15 additions & 1 deletion cmake/compiler/gcc/target.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,21 @@ if(NOT DEFINED NOSYSDEF_CFLAG)
set(NOSYSDEF_CFLAG -undef)
endif()

foreach(file_name include/stddef.h include-fixed/limits.h)
# GCC-13, does not install limits.h on include-fixed anymore
# https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=be9dd80f933480
# Add check for GCC version >= 13.1
execute_process(
COMMAND ${CMAKE_C_COMPILER} -dumpversion
OUTPUT_VARIABLE temp_compiler_version
)

if("${temp_compiler_version}" VERSION_GREATER_EQUAL 13.1.0)
set(fix_header_file include/limits.h)
else()
set(fix_header_file include-fixed/limits.h)
endif()

foreach(file_name include/stddef.h "${fix_header_file}")
execute_process(
COMMAND ${CMAKE_C_COMPILER} --print-file-name=${file_name}
OUTPUT_VARIABLE _OUTPUT
Expand Down
Loading