From 62ad14a850821d158bf9ff9da9776f1a1f12abf3 Mon Sep 17 00:00:00 2001 From: Stephanos Ioannidis Date: Tue, 4 Oct 2022 21:03:03 +0900 Subject: [PATCH 1/4] ci: Use tar.xz format for Linux and macOS build artifacts This commit updates the CI workflow to output .tar.xz archives for the Linux and macOS build artifacts. The XZ format uses the LZMA compression algorithm, which offers significantly improved data compression ratio. Note that the `-T0` XZ option is used to perform multi-threaded compression in spite of reduced compression ratio; otherwise, compressing the distribution bundle may take tens of minutes to complete. For more details, refer to the issue zephyrproject-rtos/sdk-ng#567. Signed-off-by: Stephanos Ioannidis --- .github/workflows/ci.yml | 45 ++++++++++++++++++++---------------- scripts/template_setup_posix | 2 +- 2 files changed, 26 insertions(+), 21 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8d34720c..aee6ea17 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -216,7 +216,7 @@ jobs: "name": "linux-x86_64", "runner": "zephyr-runner-linux-x64-4xlarge", "container": "ghcr.io/zephyrproject-rtos/sdk-build:v1.2.3", - "archive": "tar.gz" + "archive": "tar.xz" },' fi @@ -225,7 +225,7 @@ jobs: "name": "linux-aarch64", "runner": "zephyr-runner-linux-x64-4xlarge", "container": "ghcr.io/zephyrproject-rtos/sdk-build:v1.2.3", - "archive": "tar.gz" + "archive": "tar.xz" },' fi @@ -234,7 +234,7 @@ jobs: "name": "macos-x86_64", "runner": "zephyr_runner-macos-x86_64", "container": "", - "archive": "tar.gz" + "archive": "tar.xz" },' fi @@ -243,7 +243,7 @@ jobs: "name": "macos-aarch64", "runner": "zephyr_runner-macos-x86_64", "container": "", - "archive": "tar.gz" + "archive": "tar.xz" },' fi @@ -289,7 +289,7 @@ jobs: "runner": "ubuntu-20.04", "container": "", "bundle-host": "linux-x86_64", - "bundle-archive": "tar.gz" + "bundle-archive": "tar.xz" },' fi @@ -299,7 +299,7 @@ jobs: "runner": "macos-11", "container": "", "bundle-host": "macos-x86_64", - "bundle-archive": "tar.gz" + "bundle-archive": "tar.xz" },' fi @@ -754,8 +754,9 @@ jobs: ARCHIVE_NAME=toolchain_${{ matrix.host.name }}_${{ matrix.target }} ARCHIVE_FILE=${ARCHIVE_NAME}.${{ matrix.host.archive }} - if [ "${{ matrix.host.archive }}" == "tar.gz" ]; then - ${TAR} -zcvf ${ARCHIVE_FILE} \ + if [ "${{ matrix.host.archive }}" == "tar.xz" ]; then + XZ_OPT="-T0" \ + ${TAR} -Jcvf ${ARCHIVE_FILE} \ --owner=0 --group=0 -C ${OUTPUT_BASE}/${OUTPUT_DIR} ${{ matrix.target }} elif [ "${{ matrix.host.archive }}" == "zip" ]; then pushd ${OUTPUT_BASE}/${OUTPUT_DIR} @@ -918,9 +919,10 @@ jobs: ARTIFACT=${ARTIFACT[0]} ARTIFACT=$(basename ${ARTIFACT}) ARCHIVE_NAME=hosttools_${{ matrix.host.name }} - ARCHIVE_FILE=hosttools_${{ matrix.host.name }}.tar.gz + ARCHIVE_FILE=hosttools_${{ matrix.host.name }}.tar.xz - ${TAR} -zcvf ${ARCHIVE_FILE} --owner=0 --group=0 \ + XZ_OPT="-T0" \ + ${TAR} -Jcvf ${ARCHIVE_FILE} --owner=0 --group=0 \ -C ${ARTIFACT_ROOT} ${ARTIFACT} # Compute checksum @@ -1024,8 +1026,9 @@ jobs: ARCHIVE_NAME=cmake_${{ matrix.host.name }} ARCHIVE_FILE=${ARCHIVE_NAME}.${{ matrix.host.archive }} - if [ "${{ matrix.host.archive }}" == "tar.gz" ]; then - ${TAR} -zcvf ${ARCHIVE_FILE} --owner=0 --group=0 \ + if [ "${{ matrix.host.archive }}" == "tar.xz" ]; then + XZ_OPT="-T0" \ + ${TAR} -Jcvf ${ARCHIVE_FILE} --owner=0 --group=0 \ -C . cmake elif [ "${{ matrix.host.archive }}" == "zip" ]; then zip -r ${ARCHIVE_FILE} \ @@ -1130,8 +1133,8 @@ jobs: echo "BUNDLE_ARCHIVE_NAME=${ARCHIVE_NAME}" >> $GITHUB_ENV - if [ "${{ matrix.host.archive }}" == "tar.gz" ]; then - EXTRACT="${TAR} -zxvf" + if [ "${{ matrix.host.archive }}" == "tar.xz" ]; then + EXTRACT="${TAR} -Jxvf" elif [ "${{ matrix.host.archive }}" == "zip" ]; then EXTRACT="unzip" fi @@ -1182,8 +1185,9 @@ jobs: popd # Create minimal (without toolchains) distribution bundle archive - if [ "${{ matrix.host.archive }}" == "tar.gz" ]; then - ${TAR} -zcvf ${ARCHIVE_NAME}_minimal.${EXT} --owner=0 --group=0 \ + if [ "${{ matrix.host.archive }}" == "tar.xz" ]; then + XZ_OPT="-T0" \ + ${TAR} -Jcvf ${ARCHIVE_NAME}_minimal.${EXT} --owner=0 --group=0 \ -C . ${ARCHIVE_DIR} elif [ "${{ matrix.host.archive }}" == "zip" ]; then zip -r ${ARCHIVE_NAME}_minimal.${EXT} ${ARCHIVE_DIR} @@ -1211,8 +1215,9 @@ jobs: popd # Create full distribution bundle archive - if [ "${{ matrix.host.archive }}" == "tar.gz" ]; then - ${TAR} -zcvf ${ARCHIVE_NAME}.${EXT} --owner=0 --group=0 \ + if [ "${{ matrix.host.archive }}" == "tar.xz" ]; then + XZ_OPT="-T0" \ + ${TAR} -Jcvf ${ARCHIVE_NAME}.${EXT} --owner=0 --group=0 \ -C . ${ARCHIVE_DIR} elif [ "${{ matrix.host.archive }}" == "zip" ]; then zip -r ${ARCHIVE_NAME}.${EXT} ${ARCHIVE_DIR} @@ -1377,8 +1382,8 @@ jobs: # Extract distribution bundle archive BUNDLE_FILE=${BUNDLE_NAME}.${{ matrix.testenv.bundle-archive }} - if [ "${{ matrix.testenv.bundle-archive }}" == "tar.gz" ]; then - ${TAR} -zxvf ${ARTIFACT_ROOT}/${BUNDLE_FILE} -C tools + if [ "${{ matrix.testenv.bundle-archive }}" == "tar.xz" ]; then + ${TAR} -Jxvf ${ARTIFACT_ROOT}/${BUNDLE_FILE} -C tools elif [ "${{ matrix.testenv.bundle-archive }}" == "zip" ]; then unzip ${ARTIFACT_ROOT}/${BUNDLE_FILE} -d tools fi diff --git a/scripts/template_setup_posix b/scripts/template_setup_posix index 77dff552..71ea4e90 100644 --- a/scripts/template_setup_posix +++ b/scripts/template_setup_posix @@ -186,7 +186,7 @@ esac # Resolve release download base URI dl_rel_base="https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v${version}" -dl_toolchain_filename='toolchain_${host}_${toolchain}.tar.gz' +dl_toolchain_filename='toolchain_${host}_${toolchain}.tar.xz' # Print banner echo "Zephyr SDK ${version} Setup" From de414e7300d92128336e7f333316838bdf322d08 Mon Sep 17 00:00:00 2001 From: Stephanos Ioannidis Date: Tue, 4 Oct 2022 23:07:10 +0900 Subject: [PATCH 2/4] ci: Use 7z format for Windows build artifacts This commit updates the CI workflow to output .7z archives for the Windows build artifacts. The 7z format uses the LZMA compression algorithm, which offers significantly improved data compression ratio. The `-l` option is used such that symbolic links are stored as copies of the linked files because Windows requires administrator privileges to create symbolic links. Note that 7z performs multi-threaded compression by default. For more details, refer to the issue zephyrproject-rtos/sdk-ng#567. Signed-off-by: Stephanos Ioannidis --- .github/workflows/ci.yml | 38 ++++++++++++++++++-------------------- scripts/template_setup_win | 6 +++--- 2 files changed, 21 insertions(+), 23 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index aee6ea17..211b07f1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -252,7 +252,7 @@ jobs: "name": "windows-x86_64", "runner": "zephyr-runner-linux-x64-4xlarge", "container": "ghcr.io/zephyrproject-rtos/sdk-build:v1.2.3", - "archive": "zip" + "archive": "7z" },' fi @@ -309,7 +309,7 @@ jobs: "runner": "windows-2019-8c", "container": "", "bundle-host": "windows-x86_64", - "bundle-archive": "zip" + "bundle-archive": "7z" },' fi @@ -413,7 +413,7 @@ jobs: sudo apt-get install -y autoconf automake bison flex gettext \ help2man libboost-dev libboost-regex-dev \ libncurses5-dev libtool-bin libtool-doc \ - pkg-config texinfo zip + pkg-config texinfo p7zip # Install dependencies for cross compilation if [ "${{ matrix.host.name }}" == "linux-aarch64" ]; then @@ -758,10 +758,9 @@ jobs: XZ_OPT="-T0" \ ${TAR} -Jcvf ${ARCHIVE_FILE} \ --owner=0 --group=0 -C ${OUTPUT_BASE}/${OUTPUT_DIR} ${{ matrix.target }} - elif [ "${{ matrix.host.archive }}" == "zip" ]; then + elif [ "${{ matrix.host.archive }}" == "7z" ]; then pushd ${OUTPUT_BASE}/${OUTPUT_DIR} - zip -r ${GITHUB_WORKSPACE}/${ARCHIVE_FILE} \ - ${{ matrix.target }} + 7z a -t7z -l ${GITHUB_WORKSPACE}/${ARCHIVE_FILE} ${{ matrix.target }} popd fi @@ -985,7 +984,7 @@ jobs: # Install common dependencies sudo apt-get update - sudo apt-get install -y zip + sudo apt-get install -y p7zip # Set environment variables echo "TAR=tar" >> $GITHUB_ENV @@ -1030,9 +1029,8 @@ jobs: XZ_OPT="-T0" \ ${TAR} -Jcvf ${ARCHIVE_FILE} --owner=0 --group=0 \ -C . cmake - elif [ "${{ matrix.host.archive }}" == "zip" ]; then - zip -r ${ARCHIVE_FILE} \ - cmake + elif [ "${{ matrix.host.archive }}" == "7z" ]; then + 7z a -t7z -l ${ARCHIVE_FILE} cmake fi # Compute checksum @@ -1075,7 +1073,7 @@ jobs: # Install common dependencies sudo apt-get update - sudo apt-get install -y jq zip + sudo apt-get install -y jq p7zip # Set environment variables echo "TAR=tar" >> $GITHUB_ENV @@ -1135,8 +1133,8 @@ jobs: if [ "${{ matrix.host.archive }}" == "tar.xz" ]; then EXTRACT="${TAR} -Jxvf" - elif [ "${{ matrix.host.archive }}" == "zip" ]; then - EXTRACT="unzip" + elif [ "${{ matrix.host.archive }}" == "7z" ]; then + EXTRACT="7z x -o." fi # Create bundle directory @@ -1189,8 +1187,8 @@ jobs: XZ_OPT="-T0" \ ${TAR} -Jcvf ${ARCHIVE_NAME}_minimal.${EXT} --owner=0 --group=0 \ -C . ${ARCHIVE_DIR} - elif [ "${{ matrix.host.archive }}" == "zip" ]; then - zip -r ${ARCHIVE_NAME}_minimal.${EXT} ${ARCHIVE_DIR} + elif [ "${{ matrix.host.archive }}" == "7z" ]; then + 7z a -t7z -l ${ARCHIVE_NAME}_minimal.${EXT} ${ARCHIVE_DIR} fi # Stage toolchains @@ -1219,8 +1217,8 @@ jobs: XZ_OPT="-T0" \ ${TAR} -Jcvf ${ARCHIVE_NAME}.${EXT} --owner=0 --group=0 \ -C . ${ARCHIVE_DIR} - elif [ "${{ matrix.host.archive }}" == "zip" ]; then - zip -r ${ARCHIVE_NAME}.${EXT} ${ARCHIVE_DIR} + elif [ "${{ matrix.host.archive }}" == "7z" ]; then + 7z a -t7z -l ${ARCHIVE_NAME}.${EXT} ${ARCHIVE_DIR} fi # Compute checksum @@ -1327,7 +1325,7 @@ jobs: shopt -u dotglob # Install required system packages - choco install ccache dtc-msys2 gperf jq ninja wget unzip + choco install ccache dtc-msys2 gperf jq ninja wget 7zip # Upgrade pip python3 -m pip install --upgrade pip @@ -1384,8 +1382,8 @@ jobs: BUNDLE_FILE=${BUNDLE_NAME}.${{ matrix.testenv.bundle-archive }} if [ "${{ matrix.testenv.bundle-archive }}" == "tar.xz" ]; then ${TAR} -Jxvf ${ARTIFACT_ROOT}/${BUNDLE_FILE} -C tools - elif [ "${{ matrix.testenv.bundle-archive }}" == "zip" ]; then - unzip ${ARTIFACT_ROOT}/${BUNDLE_FILE} -d tools + elif [ "${{ matrix.testenv.bundle-archive }}" == "7z" ]; then + 7z x -otools ${ARTIFACT_ROOT}/${BUNDLE_FILE} fi # Run setup script diff --git a/scripts/template_setup_win b/scripts/template_setup_win index 2100c7d4..d3e1b1cc 100644 --- a/scripts/template_setup_win +++ b/scripts/template_setup_win @@ -37,7 +37,7 @@ set /p VERSION= Date: Tue, 16 Aug 2022 22:24:36 -0700 Subject: [PATCH 3/4] Add picolibc submodule This includes picolibc 1.7.9 + Zephyr fixes, including enabling TLS for all Zephyr architectures that support TLS Signed-off-by: Keith Packard --- .gitmodules | 3 +++ picolibc | 1 + 2 files changed, 4 insertions(+) create mode 160000 picolibc diff --git a/.gitmodules b/.gitmodules index 0feddbdf..50b94643 100644 --- a/.gitmodules +++ b/.gitmodules @@ -13,3 +13,6 @@ [submodule "gdb"] path = gdb url = https://github.com/zephyrproject-rtos/binutils-gdb.git +[submodule "picolibc"] + path = picolibc + url = https://github.com/zephyrproject-rtos/picolibc.git diff --git a/picolibc b/picolibc new file mode 160000 index 00000000..9e699e3e --- /dev/null +++ b/picolibc @@ -0,0 +1 @@ +Subproject commit 9e699e3ebc1c1839c98275e160eda4a77f23eb3c From f005992fe5b5261617746009d3024e48cc452d23 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Tue, 19 Oct 2021 11:05:50 -0700 Subject: [PATCH 4/4] Build picolibc for all SDK architectures This builds both picolibc and libstdc++ with picolibc support using the crosstool-ng support for those configurations. Signed-off-by: Keith Packard --- configs/aarch64-zephyr-elf.config | 8 +++++++- configs/arc-zephyr-elf.config | 8 +++++++- configs/arc64-zephyr-elf.config | 7 +++++++ configs/arm-zephyr-eabi.config | 7 +++++++ configs/mips-zephyr-elf.config | 8 +++++++- configs/nios2-zephyr-elf.config | 7 +++++++ configs/riscv64-zephyr-elf.config | 7 +++++++ configs/sparc-zephyr-elf.config | 7 +++++++ configs/x86_64-zephyr-elf.config | 7 +++++++ configs/xtensa-espressif_esp32_zephyr-elf.config | 8 +++++++- configs/xtensa-espressif_esp32s2_zephyr-elf.config | 8 +++++++- configs/xtensa-intel_apl_adsp_zephyr-elf.config | 7 +++++++ configs/xtensa-intel_bdw_adsp_zephyr-elf.config | 7 +++++++ configs/xtensa-intel_byt_adsp_zephyr-elf.config | 7 +++++++ configs/xtensa-intel_s1000_zephyr-elf.config | 7 +++++++ configs/xtensa-nxp_imx8m_adsp_zephyr-elf.config | 7 +++++++ configs/xtensa-nxp_imx_adsp_zephyr-elf.config | 7 +++++++ configs/xtensa-sample_controller_zephyr-elf.config | 7 +++++++ 18 files changed, 126 insertions(+), 5 deletions(-) diff --git a/configs/aarch64-zephyr-elf.config b/configs/aarch64-zephyr-elf.config index fb9051a5..6217e7a5 100644 --- a/configs/aarch64-zephyr-elf.config +++ b/configs/aarch64-zephyr-elf.config @@ -6,7 +6,7 @@ CT_ARCH_ARM=y CT_MULTILIB=y CT_ARCH_64=y CT_TARGET_VENDOR="zephyr" -CT_TARGET_CFLAGS="-moverride=tune=no_ldp_stp_qregs" +CT_TARGET_CFLAGS="-moverride=tune=no_ldp_stp_qregs -ftls-model=local-exec" CT_BINUTILS_SRC_CUSTOM=y CT_BINUTILS_CUSTOM_LOCATION="${GITHUB_WORKSPACE}/binutils" CT_NEWLIB_SRC_CUSTOM=y @@ -61,3 +61,9 @@ CT_LIBC_NEWLIB_NANO_ENABLE_TARGET_OPTSPACE=y # CT_LIBC_NEWLIB_NANO_LTO is not set CT_LIBC_NEWLIB_NANO_NANO_MALLOC=y CT_LIBC_NEWLIB_NANO_NANO_FORMATTED_IO=y +CT_COMP_LIBS_PICOLIBC=y +CT_PICOLIBC_SRC_CUSTOM=y +CT_PICOLIBC_CUSTOM_LOCATION="${GITHUB_WORKSPACE}/picolibc" +CT_LIBC_PICOLIBC_GLOBAL_ATEXIT=y +CT_LIBC_PICOLIBC_EXTRA_SECTIONS=y +CT_LIBC_PICOLIBC_EXTRA_CONFIG_ARRAY="-Dthread-local-storage=auto -Derrno-function=zephyr -Dsysroot-install=true -Dsysroot-install-skip-checks=true" diff --git a/configs/arc-zephyr-elf.config b/configs/arc-zephyr-elf.config index daafa527..1f318aa9 100644 --- a/configs/arc-zephyr-elf.config +++ b/configs/arc-zephyr-elf.config @@ -4,7 +4,7 @@ CT_EXPERIMENTAL=y # CT_LOG_PROGRESS_BAR is not set CT_ARCH_ARC=y CT_MULTILIB=y -CT_TARGET_CFLAGS="-mno-sdata -mtp-regno=26" +CT_TARGET_CFLAGS="-mno-sdata -mtp-regno=26 -ftls-model=local-exec" CT_TARGET_VENDOR="zephyr" CT_BINUTILS_SRC_CUSTOM=y CT_BINUTILS_CUSTOM_LOCATION="${GITHUB_WORKSPACE}/binutils" @@ -59,3 +59,9 @@ CT_LIBC_NEWLIB_NANO_ENABLE_TARGET_OPTSPACE=y # CT_LIBC_NEWLIB_NANO_LTO is not set CT_LIBC_NEWLIB_NANO_NANO_MALLOC=y CT_LIBC_NEWLIB_NANO_NANO_FORMATTED_IO=y +CT_COMP_LIBS_PICOLIBC=y +CT_PICOLIBC_SRC_CUSTOM=y +CT_PICOLIBC_CUSTOM_LOCATION="${GITHUB_WORKSPACE}/picolibc" +CT_LIBC_PICOLIBC_GLOBAL_ATEXIT=y +CT_LIBC_PICOLIBC_EXTRA_SECTIONS=y +CT_LIBC_PICOLIBC_EXTRA_CONFIG_ARRAY="-Dthread-local-storage=auto -Derrno-function=zephyr -Dsysroot-install=true -Dsysroot-install-skip-checks=true" diff --git a/configs/arc64-zephyr-elf.config b/configs/arc64-zephyr-elf.config index 350cccf2..3da102f0 100644 --- a/configs/arc64-zephyr-elf.config +++ b/configs/arc64-zephyr-elf.config @@ -8,6 +8,7 @@ CT_ARCH_ARC=y CT_MULTILIB=y CT_ARCH_64=y CT_TARGET_VENDOR="zephyr" +CT_TARGET_CFLAGS="-ftls-model=local-exec" CT_BINUTILS_SRC_CUSTOM=y CT_BINUTILS_CUSTOM_LOCATION="${GITHUB_WORKSPACE}/binutils" CT_NEWLIB_SRC_CUSTOM=y @@ -61,3 +62,9 @@ CT_LIBC_NEWLIB_NANO_ENABLE_TARGET_OPTSPACE=y # CT_LIBC_NEWLIB_NANO_LTO is not set CT_LIBC_NEWLIB_NANO_NANO_MALLOC=y CT_LIBC_NEWLIB_NANO_NANO_FORMATTED_IO=y +CT_COMP_LIBS_PICOLIBC=y +CT_PICOLIBC_SRC_CUSTOM=y +CT_PICOLIBC_CUSTOM_LOCATION="${GITHUB_WORKSPACE}/picolibc" +CT_LIBC_PICOLIBC_GLOBAL_ATEXIT=y +CT_LIBC_PICOLIBC_EXTRA_SECTIONS=y +CT_LIBC_PICOLIBC_EXTRA_CONFIG_ARRAY="-Dthread-local-storage=auto -Derrno-function=zephyr -Dsysroot-install=true -Dsysroot-install-skip-checks=true" diff --git a/configs/arm-zephyr-eabi.config b/configs/arm-zephyr-eabi.config index 1652457e..18ed07e2 100644 --- a/configs/arm-zephyr-eabi.config +++ b/configs/arm-zephyr-eabi.config @@ -6,6 +6,7 @@ CT_ARCH_ARM=y CT_ARCH_ARM_INTERWORKING=y CT_MULTILIB=y CT_TARGET_VENDOR="zephyr" +CT_TARGET_CFLAGS="-ftls-model=local-exec" CT_BINUTILS_SRC_CUSTOM=y CT_BINUTILS_CUSTOM_LOCATION="${GITHUB_WORKSPACE}/binutils" CT_NEWLIB_SRC_CUSTOM=y @@ -61,3 +62,9 @@ CT_LIBC_NEWLIB_NANO_ENABLE_TARGET_OPTSPACE=y # CT_LIBC_NEWLIB_NANO_LTO is not set CT_LIBC_NEWLIB_NANO_NANO_MALLOC=y CT_LIBC_NEWLIB_NANO_NANO_FORMATTED_IO=y +CT_COMP_LIBS_PICOLIBC=y +CT_PICOLIBC_SRC_CUSTOM=y +CT_PICOLIBC_CUSTOM_LOCATION="${GITHUB_WORKSPACE}/picolibc" +CT_LIBC_PICOLIBC_GLOBAL_ATEXIT=y +CT_LIBC_PICOLIBC_EXTRA_SECTIONS=y +CT_LIBC_PICOLIBC_EXTRA_CONFIG_ARRAY="-Dthread-local-storage=auto -Derrno-function=zephyr -Dsysroot-install=true -Dsysroot-install-skip-checks=true" diff --git a/configs/mips-zephyr-elf.config b/configs/mips-zephyr-elf.config index 0622cb13..ffd78e8e 100644 --- a/configs/mips-zephyr-elf.config +++ b/configs/mips-zephyr-elf.config @@ -4,7 +4,7 @@ CT_EXPERIMENTAL=y # CT_LOG_PROGRESS_BAR is not set CT_ARCH_MIPS=y CT_MULTILIB=y -CT_TARGET_CFLAGS="-G0 -mno-gpopt" +CT_TARGET_CFLAGS="-G0 -mno-gpopt -ftls-model=local-exec" CT_TARGET_VENDOR="zephyr" CT_BINUTILS_SRC_CUSTOM=y CT_BINUTILS_CUSTOM_LOCATION="${GITHUB_WORKSPACE}/binutils" @@ -60,3 +60,9 @@ CT_LIBC_NEWLIB_NANO_ENABLE_TARGET_OPTSPACE=y # CT_LIBC_NEWLIB_NANO_LTO is not set CT_LIBC_NEWLIB_NANO_NANO_MALLOC=y CT_LIBC_NEWLIB_NANO_NANO_FORMATTED_IO=y +CT_COMP_LIBS_PICOLIBC=y +CT_PICOLIBC_SRC_CUSTOM=y +CT_PICOLIBC_CUSTOM_LOCATION="${GITHUB_WORKSPACE}/picolibc" +CT_LIBC_PICOLIBC_GLOBAL_ATEXIT=y +CT_LIBC_PICOLIBC_EXTRA_SECTIONS=y +CT_LIBC_PICOLIBC_EXTRA_CONFIG_ARRAY="-Dthread-local-storage=auto -Derrno-function=zephyr -Dsysroot-install=true -Dsysroot-install-skip-checks=true" diff --git a/configs/nios2-zephyr-elf.config b/configs/nios2-zephyr-elf.config index a21afd50..8ec4695e 100644 --- a/configs/nios2-zephyr-elf.config +++ b/configs/nios2-zephyr-elf.config @@ -6,6 +6,7 @@ CT_ARCH_NIOS2=y CT_MULTILIB=y CT_ARCH_USE_MMU=y CT_TARGET_VENDOR="zephyr" +CT_TARGET_CFLAGS="-ftls-model=local-exec" CT_BINUTILS_SRC_CUSTOM=y CT_BINUTILS_CUSTOM_LOCATION="${GITHUB_WORKSPACE}/binutils" CT_NEWLIB_SRC_CUSTOM=y @@ -60,3 +61,9 @@ CT_LIBC_NEWLIB_NANO_ENABLE_TARGET_OPTSPACE=y # CT_LIBC_NEWLIB_NANO_LTO is not set CT_LIBC_NEWLIB_NANO_NANO_MALLOC=y CT_LIBC_NEWLIB_NANO_NANO_FORMATTED_IO=y +CT_COMP_LIBS_PICOLIBC=y +CT_PICOLIBC_SRC_CUSTOM=y +CT_PICOLIBC_CUSTOM_LOCATION="${GITHUB_WORKSPACE}/picolibc" +CT_LIBC_PICOLIBC_GLOBAL_ATEXIT=y +CT_LIBC_PICOLIBC_EXTRA_SECTIONS=y +CT_LIBC_PICOLIBC_EXTRA_CONFIG_ARRAY="-Dthread-local-storage=auto -Derrno-function=zephyr -Dsysroot-install=true -Dsysroot-install-skip-checks=true" diff --git a/configs/riscv64-zephyr-elf.config b/configs/riscv64-zephyr-elf.config index f9e853b1..d9eb2270 100644 --- a/configs/riscv64-zephyr-elf.config +++ b/configs/riscv64-zephyr-elf.config @@ -8,6 +8,7 @@ CT_ARCH_64=y CT_ARCH_ARCH="rv32ima_zicsr_zifencei" CT_ARCH_ABI="ilp32" CT_TARGET_VENDOR="zephyr" +CT_TARGET_CFLAGS="-ftls-model=local-exec" CT_BINUTILS_SRC_CUSTOM=y CT_BINUTILS_CUSTOM_LOCATION="${GITHUB_WORKSPACE}/binutils" CT_NEWLIB_SRC_CUSTOM=y @@ -61,3 +62,9 @@ CT_LIBC_NEWLIB_NANO_ENABLE_TARGET_OPTSPACE=y # CT_LIBC_NEWLIB_NANO_LTO is not set CT_LIBC_NEWLIB_NANO_NANO_MALLOC=y CT_LIBC_NEWLIB_NANO_NANO_FORMATTED_IO=y +CT_COMP_LIBS_PICOLIBC=y +CT_PICOLIBC_SRC_CUSTOM=y +CT_PICOLIBC_CUSTOM_LOCATION="${GITHUB_WORKSPACE}/picolibc" +CT_LIBC_PICOLIBC_GLOBAL_ATEXIT=y +CT_LIBC_PICOLIBC_EXTRA_SECTIONS=y +CT_LIBC_PICOLIBC_EXTRA_CONFIG_ARRAY="-Dthread-local-storage=auto -Derrno-function=zephyr -Dsysroot-install=true -Dsysroot-install-skip-checks=true" diff --git a/configs/sparc-zephyr-elf.config b/configs/sparc-zephyr-elf.config index 1554b1cb..8760ed2c 100644 --- a/configs/sparc-zephyr-elf.config +++ b/configs/sparc-zephyr-elf.config @@ -5,6 +5,7 @@ CT_EXPERIMENTAL=y CT_ARCH_SPARC=y CT_MULTILIB=y CT_TARGET_VENDOR="zephyr" +CT_TARGET_CFLAGS="-ftls-model=local-exec" CT_BINUTILS_SRC_CUSTOM=y CT_BINUTILS_CUSTOM_LOCATION="${GITHUB_WORKSPACE}/binutils" CT_NEWLIB_SRC_CUSTOM=y @@ -58,3 +59,9 @@ CT_LIBC_NEWLIB_NANO_ENABLE_TARGET_OPTSPACE=y # CT_LIBC_NEWLIB_NANO_LTO is not set CT_LIBC_NEWLIB_NANO_NANO_MALLOC=y CT_LIBC_NEWLIB_NANO_NANO_FORMATTED_IO=y +CT_COMP_LIBS_PICOLIBC=y +CT_PICOLIBC_SRC_CUSTOM=y +CT_PICOLIBC_CUSTOM_LOCATION="${GITHUB_WORKSPACE}/picolibc" +CT_LIBC_PICOLIBC_GLOBAL_ATEXIT=y +CT_LIBC_PICOLIBC_EXTRA_SECTIONS=y +CT_LIBC_PICOLIBC_EXTRA_CONFIG_ARRAY="-Dthread-local-storage=auto -Derrno-function=zephyr -Dsysroot-install=true -Dsysroot-install-skip-checks=true" diff --git a/configs/x86_64-zephyr-elf.config b/configs/x86_64-zephyr-elf.config index 8dd1d527..6780957c 100644 --- a/configs/x86_64-zephyr-elf.config +++ b/configs/x86_64-zephyr-elf.config @@ -6,6 +6,7 @@ CT_ARCH_X86=y CT_MULTILIB=y CT_ARCH_64=y CT_TARGET_VENDOR="zephyr" +CT_TARGET_CFLAGS="-ftls-model=local-exec" CT_BINUTILS_SRC_CUSTOM=y CT_BINUTILS_CUSTOM_LOCATION="${GITHUB_WORKSPACE}/binutils" CT_BINUTILS_EXTRA_CONFIG_ARRAY="--enable-targets=x86_64-pep" @@ -61,3 +62,9 @@ CT_LIBC_NEWLIB_NANO_ENABLE_TARGET_OPTSPACE=y # CT_LIBC_NEWLIB_NANO_LTO is not set CT_LIBC_NEWLIB_NANO_NANO_MALLOC=y CT_LIBC_NEWLIB_NANO_NANO_FORMATTED_IO=y +CT_COMP_LIBS_PICOLIBC=y +CT_PICOLIBC_SRC_CUSTOM=y +CT_PICOLIBC_CUSTOM_LOCATION="${GITHUB_WORKSPACE}/picolibc" +CT_LIBC_PICOLIBC_GLOBAL_ATEXIT=y +CT_LIBC_PICOLIBC_EXTRA_SECTIONS=y +CT_LIBC_PICOLIBC_EXTRA_CONFIG_ARRAY="-Dthread-local-storage=auto -Derrno-function=zephyr -Dsysroot-install=true -Dsysroot-install-skip-checks=true" diff --git a/configs/xtensa-espressif_esp32_zephyr-elf.config b/configs/xtensa-espressif_esp32_zephyr-elf.config index 448cd32e..b4e3681e 100644 --- a/configs/xtensa-espressif_esp32_zephyr-elf.config +++ b/configs/xtensa-espressif_esp32_zephyr-elf.config @@ -2,7 +2,7 @@ CT_CONFIG_VERSION="3" CT_EXPERIMENTAL=y # CT_PREFIX_DIR_RO is not set # CT_LOG_PROGRESS_BAR is not set -CT_TARGET_CFLAGS="-mlongcalls" +CT_TARGET_CFLAGS="-mlongcalls -ftls-model=local-exec" CT_ARCH_XTENSA=y CT_XTENSA_CUSTOM=y CT_OVERLAY_NAME="espressif_esp32" @@ -62,3 +62,9 @@ CT_LIBC_NEWLIB_NANO_ENABLE_TARGET_OPTSPACE=y # CT_LIBC_NEWLIB_NANO_LTO is not set CT_LIBC_NEWLIB_NANO_NANO_MALLOC=y CT_LIBC_NEWLIB_NANO_NANO_FORMATTED_IO=y +CT_COMP_LIBS_PICOLIBC=y +CT_PICOLIBC_SRC_CUSTOM=y +CT_PICOLIBC_CUSTOM_LOCATION="${GITHUB_WORKSPACE}/picolibc" +CT_LIBC_PICOLIBC_GLOBAL_ATEXIT=y +CT_LIBC_PICOLIBC_EXTRA_SECTIONS=y +CT_LIBC_PICOLIBC_EXTRA_CONFIG_ARRAY="-Dthread-local-storage=auto -Derrno-function=zephyr -Dsysroot-install=true -Dsysroot-install-skip-checks=true" diff --git a/configs/xtensa-espressif_esp32s2_zephyr-elf.config b/configs/xtensa-espressif_esp32s2_zephyr-elf.config index efd9f783..579719e9 100644 --- a/configs/xtensa-espressif_esp32s2_zephyr-elf.config +++ b/configs/xtensa-espressif_esp32s2_zephyr-elf.config @@ -2,7 +2,7 @@ CT_CONFIG_VERSION="3" CT_EXPERIMENTAL=y # CT_PREFIX_DIR_RO is not set # CT_LOG_PROGRESS_BAR is not set -CT_TARGET_CFLAGS="-mlongcalls" +CT_TARGET_CFLAGS="-mlongcalls -ftls-model=local-exec" CT_ARCH_XTENSA=y CT_XTENSA_CUSTOM=y CT_OVERLAY_NAME="espressif_esp32s2" @@ -62,3 +62,9 @@ CT_LIBC_NEWLIB_NANO_ENABLE_TARGET_OPTSPACE=y # CT_LIBC_NEWLIB_NANO_LTO is not set CT_LIBC_NEWLIB_NANO_NANO_MALLOC=y CT_LIBC_NEWLIB_NANO_NANO_FORMATTED_IO=y +CT_COMP_LIBS_PICOLIBC=y +CT_PICOLIBC_SRC_CUSTOM=y +CT_PICOLIBC_CUSTOM_LOCATION="${GITHUB_WORKSPACE}/picolibc" +CT_LIBC_PICOLIBC_GLOBAL_ATEXIT=y +CT_LIBC_PICOLIBC_EXTRA_SECTIONS=y +CT_LIBC_PICOLIBC_EXTRA_CONFIG_ARRAY="-Dthread-local-storage=auto -Derrno-function=zephyr -Dsysroot-install=true -Dsysroot-install-skip-checks=true" diff --git a/configs/xtensa-intel_apl_adsp_zephyr-elf.config b/configs/xtensa-intel_apl_adsp_zephyr-elf.config index 550b6cd7..8a1620f6 100644 --- a/configs/xtensa-intel_apl_adsp_zephyr-elf.config +++ b/configs/xtensa-intel_apl_adsp_zephyr-elf.config @@ -8,6 +8,7 @@ CT_XTENSA_CUSTOM=y CT_OVERLAY_NAME="intel_apl_adsp" CT_OVERLAY_LOCATION="./overlays" CT_TARGET_VENDOR="intel_apl_adsp_zephyr" +CT_TARGET_CFLAGS="-ftls-model=local-exec" CT_BINUTILS_SRC_CUSTOM=y CT_BINUTILS_CUSTOM_LOCATION="${GITHUB_WORKSPACE}/binutils" CT_NEWLIB_SRC_CUSTOM=y @@ -62,3 +63,9 @@ CT_LIBC_NEWLIB_NANO_ENABLE_TARGET_OPTSPACE=y # CT_LIBC_NEWLIB_NANO_LTO is not set CT_LIBC_NEWLIB_NANO_NANO_MALLOC=y CT_LIBC_NEWLIB_NANO_NANO_FORMATTED_IO=y +CT_COMP_LIBS_PICOLIBC=y +CT_PICOLIBC_SRC_CUSTOM=y +CT_PICOLIBC_CUSTOM_LOCATION="${GITHUB_WORKSPACE}/picolibc" +CT_LIBC_PICOLIBC_GLOBAL_ATEXIT=y +CT_LIBC_PICOLIBC_EXTRA_SECTIONS=y +CT_LIBC_PICOLIBC_EXTRA_CONFIG_ARRAY="-Dthread-local-storage=auto -Derrno-function=zephyr -Dsysroot-install=true -Dsysroot-install-skip-checks=true" diff --git a/configs/xtensa-intel_bdw_adsp_zephyr-elf.config b/configs/xtensa-intel_bdw_adsp_zephyr-elf.config index 71957468..1cecbdd7 100644 --- a/configs/xtensa-intel_bdw_adsp_zephyr-elf.config +++ b/configs/xtensa-intel_bdw_adsp_zephyr-elf.config @@ -8,6 +8,7 @@ CT_XTENSA_CUSTOM=y CT_OVERLAY_NAME="intel_bdw_adsp" CT_OVERLAY_LOCATION="./overlays" CT_TARGET_VENDOR="intel_bdw_adsp_zephyr" +CT_TARGET_CFLAGS="-ftls-model=local-exec" CT_BINUTILS_SRC_CUSTOM=y CT_BINUTILS_CUSTOM_LOCATION="${GITHUB_WORKSPACE}/binutils" CT_NEWLIB_SRC_CUSTOM=y @@ -62,3 +63,9 @@ CT_LIBC_NEWLIB_NANO_ENABLE_TARGET_OPTSPACE=y # CT_LIBC_NEWLIB_NANO_LTO is not set CT_LIBC_NEWLIB_NANO_NANO_MALLOC=y CT_LIBC_NEWLIB_NANO_NANO_FORMATTED_IO=y +CT_COMP_LIBS_PICOLIBC=y +CT_PICOLIBC_SRC_CUSTOM=y +CT_PICOLIBC_CUSTOM_LOCATION="${GITHUB_WORKSPACE}/picolibc" +CT_LIBC_PICOLIBC_GLOBAL_ATEXIT=y +CT_LIBC_PICOLIBC_EXTRA_SECTIONS=y +CT_LIBC_PICOLIBC_EXTRA_CONFIG_ARRAY="-Dthread-local-storage=auto -Derrno-function=zephyr -Dsysroot-install=true -Dsysroot-install-skip-checks=true" diff --git a/configs/xtensa-intel_byt_adsp_zephyr-elf.config b/configs/xtensa-intel_byt_adsp_zephyr-elf.config index 8fb27d59..d5a111bb 100644 --- a/configs/xtensa-intel_byt_adsp_zephyr-elf.config +++ b/configs/xtensa-intel_byt_adsp_zephyr-elf.config @@ -8,6 +8,7 @@ CT_XTENSA_CUSTOM=y CT_OVERLAY_NAME="intel_byt_adsp" CT_OVERLAY_LOCATION="./overlays" CT_TARGET_VENDOR="intel_byt_adsp_zephyr" +CT_TARGET_CFLAGS="-ftls-model=local-exec" CT_BINUTILS_SRC_CUSTOM=y CT_BINUTILS_CUSTOM_LOCATION="${GITHUB_WORKSPACE}/binutils" CT_NEWLIB_SRC_CUSTOM=y @@ -62,3 +63,9 @@ CT_LIBC_NEWLIB_NANO_ENABLE_TARGET_OPTSPACE=y # CT_LIBC_NEWLIB_NANO_LTO is not set CT_LIBC_NEWLIB_NANO_NANO_MALLOC=y CT_LIBC_NEWLIB_NANO_NANO_FORMATTED_IO=y +CT_COMP_LIBS_PICOLIBC=y +CT_PICOLIBC_SRC_CUSTOM=y +CT_PICOLIBC_CUSTOM_LOCATION="${GITHUB_WORKSPACE}/picolibc" +CT_LIBC_PICOLIBC_GLOBAL_ATEXIT=y +CT_LIBC_PICOLIBC_EXTRA_SECTIONS=y +CT_LIBC_PICOLIBC_EXTRA_CONFIG_ARRAY="-Dthread-local-storage=auto -Derrno-function=zephyr -Dsysroot-install=true -Dsysroot-install-skip-checks=true" diff --git a/configs/xtensa-intel_s1000_zephyr-elf.config b/configs/xtensa-intel_s1000_zephyr-elf.config index d48b367c..add88e78 100644 --- a/configs/xtensa-intel_s1000_zephyr-elf.config +++ b/configs/xtensa-intel_s1000_zephyr-elf.config @@ -7,6 +7,7 @@ CT_XTENSA_CUSTOM=y CT_OVERLAY_NAME="intel_s1000" CT_OVERLAY_LOCATION="./overlays" CT_TARGET_VENDOR="intel_s1000_zephyr" +CT_TARGET_CFLAGS="-ftls-model=local-exec" CT_BINUTILS_SRC_CUSTOM=y CT_BINUTILS_CUSTOM_LOCATION="${GITHUB_WORKSPACE}/binutils" CT_NEWLIB_SRC_CUSTOM=y @@ -62,3 +63,9 @@ CT_LIBC_NEWLIB_NANO_ENABLE_TARGET_OPTSPACE=y # CT_LIBC_NEWLIB_NANO_LTO is not set CT_LIBC_NEWLIB_NANO_NANO_MALLOC=y CT_LIBC_NEWLIB_NANO_NANO_FORMATTED_IO=y +CT_COMP_LIBS_PICOLIBC=y +CT_PICOLIBC_SRC_CUSTOM=y +CT_PICOLIBC_CUSTOM_LOCATION="${GITHUB_WORKSPACE}/picolibc" +CT_LIBC_PICOLIBC_GLOBAL_ATEXIT=y +CT_LIBC_PICOLIBC_EXTRA_SECTIONS=y +CT_LIBC_PICOLIBC_EXTRA_CONFIG_ARRAY="-Dthread-local-storage=auto -Derrno-function=zephyr -Dsysroot-install=true -Dsysroot-install-skip-checks=true" diff --git a/configs/xtensa-nxp_imx8m_adsp_zephyr-elf.config b/configs/xtensa-nxp_imx8m_adsp_zephyr-elf.config index 7763154f..0f61cb44 100644 --- a/configs/xtensa-nxp_imx8m_adsp_zephyr-elf.config +++ b/configs/xtensa-nxp_imx8m_adsp_zephyr-elf.config @@ -8,6 +8,7 @@ CT_XTENSA_CUSTOM=y CT_OVERLAY_NAME="nxp_imx8m_adsp" CT_OVERLAY_LOCATION="./overlays" CT_TARGET_VENDOR="nxp_imx8m_adsp_zephyr" +CT_TARGET_CFLAGS="-ftls-model=local-exec" CT_BINUTILS_SRC_CUSTOM=y CT_BINUTILS_CUSTOM_LOCATION="${GITHUB_WORKSPACE}/binutils" CT_NEWLIB_SRC_CUSTOM=y @@ -62,3 +63,9 @@ CT_LIBC_NEWLIB_NANO_ENABLE_TARGET_OPTSPACE=y # CT_LIBC_NEWLIB_NANO_LTO is not set CT_LIBC_NEWLIB_NANO_NANO_MALLOC=y CT_LIBC_NEWLIB_NANO_NANO_FORMATTED_IO=y +CT_COMP_LIBS_PICOLIBC=y +CT_PICOLIBC_SRC_CUSTOM=y +CT_PICOLIBC_CUSTOM_LOCATION="${GITHUB_WORKSPACE}/picolibc" +CT_LIBC_PICOLIBC_GLOBAL_ATEXIT=y +CT_LIBC_PICOLIBC_EXTRA_SECTIONS=y +CT_LIBC_PICOLIBC_EXTRA_CONFIG_ARRAY="-Dthread-local-storage=auto -Derrno-function=zephyr -Dsysroot-install=true -Dsysroot-install-skip-checks=true" diff --git a/configs/xtensa-nxp_imx_adsp_zephyr-elf.config b/configs/xtensa-nxp_imx_adsp_zephyr-elf.config index af3019fa..f1413d75 100644 --- a/configs/xtensa-nxp_imx_adsp_zephyr-elf.config +++ b/configs/xtensa-nxp_imx_adsp_zephyr-elf.config @@ -8,6 +8,7 @@ CT_XTENSA_CUSTOM=y CT_OVERLAY_NAME="nxp_imx_adsp" CT_OVERLAY_LOCATION="./overlays" CT_TARGET_VENDOR="nxp_imx_adsp_zephyr" +CT_TARGET_CFLAGS="-ftls-model=local-exec" CT_BINUTILS_SRC_CUSTOM=y CT_BINUTILS_CUSTOM_LOCATION="${GITHUB_WORKSPACE}/binutils" CT_NEWLIB_SRC_CUSTOM=y @@ -62,3 +63,9 @@ CT_LIBC_NEWLIB_NANO_ENABLE_TARGET_OPTSPACE=y # CT_LIBC_NEWLIB_NANO_LTO is not set CT_LIBC_NEWLIB_NANO_NANO_MALLOC=y CT_LIBC_NEWLIB_NANO_NANO_FORMATTED_IO=y +CT_COMP_LIBS_PICOLIBC=y +CT_PICOLIBC_SRC_CUSTOM=y +CT_PICOLIBC_CUSTOM_LOCATION="${GITHUB_WORKSPACE}/picolibc" +CT_LIBC_PICOLIBC_GLOBAL_ATEXIT=y +CT_LIBC_PICOLIBC_EXTRA_SECTIONS=y +CT_LIBC_PICOLIBC_EXTRA_CONFIG_ARRAY="-Dthread-local-storage=auto -Derrno-function=zephyr -Dsysroot-install=true -Dsysroot-install-skip-checks=true" diff --git a/configs/xtensa-sample_controller_zephyr-elf.config b/configs/xtensa-sample_controller_zephyr-elf.config index 206c9ff7..65283cfb 100644 --- a/configs/xtensa-sample_controller_zephyr-elf.config +++ b/configs/xtensa-sample_controller_zephyr-elf.config @@ -7,6 +7,7 @@ CT_XTENSA_CUSTOM=y CT_OVERLAY_NAME="sample_controller" CT_OVERLAY_LOCATION="./overlays" CT_TARGET_VENDOR="sample_controller_zephyr" +CT_TARGET_CFLAGS="-ftls-model=local-exec" CT_BINUTILS_SRC_CUSTOM=y CT_BINUTILS_CUSTOM_LOCATION="${GITHUB_WORKSPACE}/binutils" CT_NEWLIB_SRC_CUSTOM=y @@ -61,3 +62,9 @@ CT_LIBC_NEWLIB_NANO_ENABLE_TARGET_OPTSPACE=y # CT_LIBC_NEWLIB_NANO_LTO is not set CT_LIBC_NEWLIB_NANO_NANO_MALLOC=y CT_LIBC_NEWLIB_NANO_NANO_FORMATTED_IO=y +CT_COMP_LIBS_PICOLIBC=y +CT_PICOLIBC_SRC_CUSTOM=y +CT_PICOLIBC_CUSTOM_LOCATION="${GITHUB_WORKSPACE}/picolibc" +CT_LIBC_PICOLIBC_GLOBAL_ATEXIT=y +CT_LIBC_PICOLIBC_EXTRA_SECTIONS=y +CT_LIBC_PICOLIBC_EXTRA_CONFIG_ARRAY="-Dthread-local-storage=auto -Derrno-function=zephyr -Dsysroot-install=true -Dsysroot-install-skip-checks=true"