# --- T2-COPYRIGHT-BEGIN --- # t2/package/*/clang/parse-config-5 # Copyright (C) 2010 - 2025 The T2 SDE Project # SPDX-License-Identifier: GPL-2.0 # --- T2-COPYRIGHT-END --- if ! atstage toolchain && [[ $pkg != glibc* && $pkg != gcc && $pkg != memtest86 ]]; then for x in CC CXX KCC; do if eval '[ "$SDECFG_DEFAULT_'$x'" = "clang" ]'; then case "$x" in CC) var_append GCC_WRAPPER_REMOVE ' ' -ftree-loop-vectorize #var_append GCC_WRAPPER_APPEND ' ' -Wno-implicit-function-declaration var_append GCC_WRAPPER_APPEND ' ' -Wno-format-nonliteral var_append GCC_WRAPPER_APPEND ' ' -Wno-implicit-int var_append GCC_WRAPPER_APPEND ' ' -Wno-register var_append GCC_WRAPPER_APPEND ' ' -Wno-strict-prototypes var_append GCC_WRAPPER_APPEND ' ' -Wno-incompatible-function-pointer-types var_append GCC_WRAPPER_APPEND ' ' -Wno-int-conversion var_append CXX_WRAPPER_APPEND ' ' -Wno-c++11-narrowing #[[ "$SDECFG_OPT" = size* ]] && var_append GCC_WRAPPER_APPEND ' ' -Oz [ "$SDECFG_LTO" != 0 ] && ! hasflag NO-LTO && var_append GCC_WRAPPER_APPEND ' ' "-c?:-fuse-ld=lld -c?:-O2" z="${archprefix}clang" ;; CXX) z="${archprefix}clang++" ;; KCC) z="${archprefix}clang" if [ "$SDECFG_OPT" = "size" ]; then var_insert KCC_WRAPPER_REMOVE ' ' "-O -O[0-9]" var_insert KCC_WRAPPER_INSERT ' ' -Os fi ;; *) z="clang_$X_NOT_YET_IMPLEMENTED" ;; esac for y in $z; do [ "`type -p $y`" ] && export $x=$y done fi done fi