Skip to content

Commit

Permalink
configs: common: enable c++11 thread support via c11 threads
Browse files Browse the repository at this point in the history
Add support for ISO C++11 threads, mutexes, condition variables,
semaphores, locks, scoped locks, synchronized streams, and
futures (async programming) via ISO C11 threads.

Signed-off-by: Christopher Friedt <[email protected]>
  • Loading branch information
cfriedt-friedtco committed Sep 15, 2024
1 parent 0c5b22f commit f2d16be
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion configs/aarch64-zephyr-elf.config
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ CT_ARCH_64=y
CT_TARGET_VENDOR="zephyr"
CT_TARGET_CFLAGS="-moverride=tune=no_ldp_stp_qregs -ftls-model=local-exec"
CT_MULTILIB=y
CT_GDB_CROSS_EXTRA_CONFIG_ARRAY="--enable-targets=arm-zephyr-eabi"
CT_GDB_CROSS_EXTRA_CONFIG_ARRAY="--enable-targets=arm-zephyr-eabi --enable-threads=c11 --enable-libstdcxx-time=c11 --enable-libstdcxx-threads"
5 changes: 4 additions & 1 deletion configs/common.config
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,11 @@ CT_GDB_CUSTOM_LOCATION="${GITHUB_WORKSPACE}/gdb"
# GCC
CT_GCC_SRC_CUSTOM=y
CT_GCC_CUSTOM_LOCATION="${GITHUB_WORKSPACE}/gcc"
CT_CC_GCC_EXTRA_CONFIG_ARRAY="--with-gnu-ld --with-gnu-as --enable-initfini-array"
# NOTE: --enable-threads=c11 is still necessary here to override the value inherited by
# build/cc/gcc.sh with baremetal "mode"
CT_CC_GCC_EXTRA_CONFIG_ARRAY="--with-gnu-ld --with-gnu-as --enable-initfini-array --enable-threads=c11 --enable-libstdcxx-time=c11 --enable-libstdcxx-threads"
CT_CC_LANG_CXX=y
CT_THREADS_C11=y

# Newlib
CT_NEWLIB_SRC_CUSTOM=y
Expand Down
2 changes: 1 addition & 1 deletion configs/x86_64-zephyr-elf.config
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ CT_TARGET_VENDOR="zephyr"
CT_TARGET_CFLAGS="-ftls-model=local-exec"
CT_MULTILIB=y
CT_BINUTILS_EXTRA_CONFIG_ARRAY="--enable-targets=x86_64-pep"
CT_CC_GCC_EXTRA_CONFIG_ARRAY="--with-gnu-ld --with-gnu-as --enable-initfini-array --with-cpu-32=i586 --with-arch-32=i586 --with-cpu-64=generic --with-arch-64=x86-64"
CT_CC_GCC_EXTRA_CONFIG_ARRAY="--with-gnu-ld --with-gnu-as --enable-initfini-array --with-cpu-32=i586 --with-arch-32=i586 --with-cpu-64=generic --with-arch-64=x86-64 --enable-threads=c11 --enable-libstdcxx-time=c11 --enable-libstdcxx-threads"
2 changes: 1 addition & 1 deletion gcc
Submodule gcc updated from f14124 to 00a6f7

0 comments on commit f2d16be

Please sign in to comment.