Skip to content

Build -Os and -O2 versions of every target library #821

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

Merged
merged 13 commits into from
May 1, 2025
Merged
Show file tree
Hide file tree
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
7 changes: 7 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ on:
- mips-zephyr-elf
- nios2-zephyr-elf
- riscv64-zephyr-elf
- rx-zephyr-elf
- sparc-zephyr-elf
- x86_64-zephyr-elf
- xtensa-amd_acp_6_0_adsp_zephyr-elf
Expand Down Expand Up @@ -171,6 +172,7 @@ jobs:
mips-zephyr-elf) build_target_mips_zephyr_elf="y";;
nios2-zephyr-elf) build_target_nios2_zephyr_elf="y";;
riscv64-zephyr-elf) build_target_riscv64_zephyr_elf="y";;
rx-zephyr-elf) build_target_rx_zephyr_elf="y";;
sparc-zephyr-elf) build_target_sparc_zephyr_elf="y";;
x86_64-zephyr-elf) build_target_x86_64_zephyr_elf="y";;
xtensa-amd_acp_6_0_adsp_zephyr-elf) build_target_xtensa_amd_acp_6_0_adsp_zephyr_elf="y";;
Expand Down Expand Up @@ -220,6 +222,7 @@ jobs:
build_target_mips_zephyr_elf="y"
build_target_nios2_zephyr_elf="y"
build_target_riscv64_zephyr_elf="y"
build_target_rx_zephyr_elf="y"
build_target_sparc_zephyr_elf="y"
build_target_x86_64_zephyr_elf="y"
build_target_xtensa_amd_acp_6_0_adsp_zephyr_elf="y"
Expand Down Expand Up @@ -309,6 +312,7 @@ jobs:
[ "${build_target_mips_zephyr_elf}" == "y" ] && MATRIX_TARGETS+='"mips-zephyr-elf",'
[ "${build_target_nios2_zephyr_elf}" == "y" ] && MATRIX_TARGETS+='"nios2-zephyr-elf",'
[ "${build_target_riscv64_zephyr_elf}" == "y" ] && MATRIX_TARGETS+='"riscv64-zephyr-elf",'
[ "${build_target_rx_zephyr_elf}" == "y" ] && MATRIX_TARGETS+='"rx-zephyr-elf",'
[ "${build_target_sparc_zephyr_elf}" == "y" ] && MATRIX_TARGETS+='"sparc-zephyr-elf",'
[ "${build_target_x86_64_zephyr_elf}" == "y" ] && MATRIX_TARGETS+='"x86_64-zephyr-elf",'
[ "${build_target_xtensa_amd_acp_6_0_adsp_zephyr_elf}" == "y" ] && MATRIX_TARGETS+='"xtensa-amd_acp_6_0_adsp_zephyr-elf",'
Expand Down Expand Up @@ -1564,6 +1568,9 @@ jobs:
PLATFORM_ARGS+="-p qemu_riscv32e "
PLATFORM_ARGS+="-p qemu_riscv64 "
;;
rx-zephyr-elf)
PLATFORM_ARGS+="-p qemu_rx "
;;
sparc-zephyr-elf)
PLATFORM_ARGS+="-p qemu_leon3 "
;;
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ The toolchains for the following target architectures are supported:
- MIPS (32-bit and 64-bit)
- Nios II
- RISC-V (32-bit and 64-bit; RV32I, RV32E, RV64I)
- RX
- SPARC (32-bit and 64-bit; SPARC V8, SPARC V9)
- x86 (32-bit and 64-bit)
- Xtensa (sample_controller and other vendor-specific variants)
Expand Down
1 change: 1 addition & 0 deletions cmake/zephyr/target.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ set(CROSS_COMPILE_TARGET_arm64 aarch64-zephyr-elf)
set(CROSS_COMPILE_TARGET_nios2 nios2-zephyr-elf)
set(CROSS_COMPILE_TARGET_riscv riscv64-zephyr-elf)
set(CROSS_COMPILE_TARGET_mips mips-zephyr-elf)
set(CROSS_COMPILE_TARGET_rx rx-zephyr-elf)
set(CROSS_COMPILE_TARGET_microblaze microblazeel-zephyr-elf)
set(CROSS_COMPILE_TARGET_xtensa xtensa-${SOC_TOOLCHAIN_NAME}_zephyr-elf)

Expand Down
1 change: 1 addition & 0 deletions configs/arc-zephyr-elf.config
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ CT_ARCH_ARC=y
CT_TARGET_VENDOR="zephyr"
CT_TARGET_CFLAGS="-mno-sdata -mtp-regno=26 -ftls-model=local-exec"
CT_MULTILIB=y
CT_MULTILIB_SPACE=y
1 change: 1 addition & 0 deletions configs/arm-zephyr-eabi.config
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ CT_ARCH_ARM_INTERWORKING=y
CT_TARGET_VENDOR="zephyr"
CT_TARGET_CFLAGS="-ftls-model=local-exec"
CT_MULTILIB=y
CT_MULTILIB_SPACE=y
CT_CC_GCC_MULTILIB_LIST="rmprofile"
CT_LIBC_NEWLIB_NANO_TARGET_CFLAGS="-mthumb-interwork"
1 change: 1 addition & 0 deletions configs/common.config
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,5 @@ 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_ENABLE_TARGET_OPTSPACE=n
CT_LIBC_PICOLIBC_EXTRA_CONFIG_ARRAY="-Dthread-local-storage=auto -Derrno-function=zephyr -Dsysroot-install=true -Dsysroot-install-skip-checks=true -Dassert-verbose=false"
3 changes: 0 additions & 3 deletions configs/microblazeel-zephyr-elf.config
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,3 @@ CT_ARCH_LE=y
CT_TARGET_CFLAGS="-G0 -fno-pic"
CT_TARGET_VENDOR="zephyr"
CT_MULTILIB=y
# FIXME: Picolibc is disabled for microblazeel due to build failure
# (see GitHub issue #639).
CT_COMP_LIBS_PICOLIBC=n
6 changes: 6 additions & 0 deletions configs/rx-zephyr-elf.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
CT_CONFIG_VERSION="3"
CT_EXPERIMENTAL=y
CT_ARCH_RX=y
CT_TARGET_CFLAGS="-ftls-model=local-exec"
CT_TARGET_VENDOR="zephyr"
CT_MULTILIB=y
4 changes: 2 additions & 2 deletions contrib/linux_build_toolchain.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function usage()
echo " Default is ${SDK_DIR}"
echo ""
echo " -o Build directory, for building artifacts and final output. Optional."
echo " Default is ${WORKSPACE}"
echo " Default is ${BUILD_DIR}"
echo ""
echo " -h This help."
echo ""
Expand Down Expand Up @@ -129,7 +129,7 @@ EOF
"${CT_NG}" distclean
"${CT_NG}" defconfig DEFCONFIG=build.config

"${CT_NG}" build
"${CT_NG}" build || exit 1

chmod -R u+w "${TOOLCHAIN_OUTPUT_DIR}"

Expand Down
2 changes: 1 addition & 1 deletion picolibc
Submodule picolibc updated 1292 files
Loading