# --- T2-COPYRIGHT-NOTE-BEGIN --- # T2 SDE: package/*/clang/parse-config-5 # Copyright (C) 2010 - 2023 The T2 SDE Project # # This Copyright note is generated by scripts/Create-CopyPatch, # more information can be found in the files COPYING and README. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2. # --- T2-COPYRIGHT-NOTE-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-format-security' var_append GCC_WRAPPER_APPEND ' ' '-Wno-enum-constexpr-conversion' 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