From 3166b39f36cbae5ce8928ea86c113549e8683cc9 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Thu, 15 Jan 2026 11:12:22 -0600 Subject: [PATCH] optstdcc.yml, cpuopts.yml: Use C23 to compile RTEMS Prior to this change, the RTEMS build system did not specify the version of C to compile with. Closes #5327 --- spec/build/cpukit/cpuopts.yml | 2 ++ spec/build/cpukit/optstdcc.yml | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 spec/build/cpukit/optstdcc.yml diff --git a/spec/build/cpukit/cpuopts.yml b/spec/build/cpukit/cpuopts.yml index fab7f0668b..6d9f81125f 100644 --- a/spec/build/cpukit/cpuopts.yml +++ b/spec/build/cpukit/cpuopts.yml @@ -17,6 +17,8 @@ links: uid: optclang - role: build-dependency uid: optarflags +- role: build-dependency + uid: optstdcc - role: build-dependency uid: optwarn - role: build-dependency diff --git a/spec/build/cpukit/optstdcc.yml b/spec/build/cpukit/optstdcc.yml new file mode 100644 index 0000000000..39be0373bb --- /dev/null +++ b/spec/build/cpukit/optstdcc.yml @@ -0,0 +1,22 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +actions: +- get-string: null +- split: null +- env-assign: null +- env-append: CFLAGS +build-type: option +copyrights: +- Copyright (C) 2026 On-Line Applications Research Corporation +default: +- enabled-by: true + value: + - -std=gnu23 -D_BSD_SOURCE +description: | + Specifies the C Language version and additional APIs available to + the program. gnuNN allows GCC extensions and POSIX APIs. Switching + to stdNN requires the addition of -D_POSIX_C_SOURCE=202405L to + compit le for POSIX Issue 8 that RTEMS is aligned to. +enabled-by: true +links: [] +name: CC_STD_VERSION_FLAGS +type: build