# --- T2-COPYRIGHT-NOTE-BEGIN --- # T2 SDE: package/*/compiler-rt/compiler-rt.conf # Copyright (C) 2009 - 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 --- atstage native || export DESTDIR="$root" cmake_mod() { tar $taropt `match_source_file -p cmake` -C .. mv -vf ../cmake-*src ../../cmake } hook_add preconf 5 cmake_mod build_minimal_cross() { ${arch_target}-clang -c ../lib/builtins/{muldc3,muldi3,mulsc3,mulxc3,mulsi3}.c ${arch_target}-ar r builtins.a *.o ${arch_target}-clang -fPIC -c ../lib/crt/crt{begin,end}.c mkdir -p $sysroot/usr/lib/linux/ install builtins.a $sysroot/usr/lib/linux/libclang_rt.builtins-$arch.a install crt*.o $sysroot/usr/libx32/ } if atstage toolchain; then runmake=0 runcmake=0 hook_add inmake 5 "build_minimal_cross" # -DCOMPILER_RT_BAREMETAL_BUILD=ON ? fi if [ $SDECFG_LIBC == "musl" ]; then var_append cmakeopt " " "-DCOMPILER_RT_BUILD_SANITIZERS=OFF -DCOMPILER_RT_BUILD_XRAY=OFF" var_append cmakeopt " " "-DCOMPILER_RT_BUILD_LIBFUZZER=OFF -DCOMPILER_RT_BUILD_PROFILER=OFF" fi #var_append cmakeopt " " "-DCOMPILER_RT_STANDALONE_BUILD=ON" if [ $stagelevel = 1 ]; then # during initial bootstarp we don't have libcxx* yet var_append GCC_WRAPPER_APPEND ' ' '-nostdlib -lc' #var_append cmakeopt " " "-DCMAKE_C_COMPILER_WORKS=ON -DCMAKE_CXX_COMPILER_WORKS=ON" var_append cmakeopt " " "-DCOMPILER_RT_BUILD_SANITIZERS=OFF -DCOMPILER_RT_BUILD_XRAY=OFF" var_append cmakeopt " " "-DCOMPILER_RT_BUILD_MEMPROF=OFF -DCOMPILER_RT_BUILD_ORC=OFF" fi # currently fails even with gcc/glibc var_append cmakeopt " " "-DCOMPILER_RT_BUILD_SANITIZERS=OFF" [ "${libdir##*/lib}" ] && var_append cmakeopt " " "-DLLVM_LIBDIR_SUFFIX=${libdir##*/lib}" var_append cmakeopt " " "-DBUILD_SHARED_LIBS=ON .."