From 93a93e9a3b53c1a73142a305ea1f8136846942ee Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 22 Dec 2021 14:08:05 +0000 Subject: gentoo resync : 22.12.2021 --- profiles/features/clang/eapi | 1 + profiles/features/clang/make.defaults | 67 ++++++++++++++++++++++++++++++++ profiles/features/clang/package.use | 17 ++++++++ profiles/features/clang/packages | 14 +++++++ profiles/features/clang/packages.build | 14 +++++++ profiles/features/clang/use.force | 1 + profiles/features/musl/package.mask | 8 ++-- profiles/features/musl/package.use.force | 2 +- profiles/features/musl/package.use.mask | 4 ++ 9 files changed, 123 insertions(+), 5 deletions(-) create mode 100644 profiles/features/clang/eapi create mode 100644 profiles/features/clang/make.defaults create mode 100644 profiles/features/clang/package.use create mode 100644 profiles/features/clang/packages create mode 100644 profiles/features/clang/packages.build create mode 100644 profiles/features/clang/use.force (limited to 'profiles/features') diff --git a/profiles/features/clang/eapi b/profiles/features/clang/eapi new file mode 100644 index 000000000000..7ed6ff82de6b --- /dev/null +++ b/profiles/features/clang/eapi @@ -0,0 +1 @@ +5 diff --git a/profiles/features/clang/make.defaults b/profiles/features/clang/make.defaults new file mode 100644 index 000000000000..7674593179f7 --- /dev/null +++ b/profiles/features/clang/make.defaults @@ -0,0 +1,67 @@ +# Copyright 2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +# this is for now highly experimental -dilfridge + +# use clang as the primary compiler +CC="clang" +CXX="clang++" + +# libtool needs this +LD="ld.lld" + +# linker flags +LDFLAGS="${LDFLAGS} -fuse-ld=lld -rtlib=compiler-rt -unwindlib=libunwind -Wl,--as-needed" + +## hardening flags +#SOME_HARDENING_CFLAGS="-fPIC -fstack-protector-strong -D_FORTIFY_SOURCE=2" +#SOME_HARDENING_LDFLAGS="-Wl,-z,relro,-z,now -pie" +# +# we need to eventually do this the same way as in gcc, for now let's +# keep it to a minimum +SOME_HARDENING_CFLAGS="-D_FORTIFY_SOURCE=2" +SOME_HARDENING_LDFLAGS="" + +# enable hardening by default, cf. gcc[pie,ssp] +CFLAGS="${CFLAGS} ${SOME_HARDENING_FLAGS}" +CXXFLAGS="${CXXFLAGS} ${SOME_HARDENING_FLAGS}" +LDFLAGS="${LDFLAGS} ${SOME_HARDENING_LDFLAGS}" + +# use LLVM-provided binutils +AR="llvm-ar" +AS="llvm-as" +NM="llvm-nm" +STRIP="llvm-strip" +RANLIB="llvm-ranlib" +OBJCOPY="llvm-objcopy" +STRINGS="llvm-strings" +OBJDUMP="llvm-objdump" +READELF="llvm-readelf" +ADDR2LINE="llvm-addr2line" + + +# bootstrap USE for stage1 + +# curl needed by cmake +BOOTSTRAP_USE="${BOOTSTRAP_USE} ssl curl_ssl_openssl" + +# Clang needs this +BOOTSTRAP_USE="${BOOTSTRAP_USE} python_single_target_python3_9" + +# sys-devel/llvm +BOOTSTRAP_USE="${BOOTSTRAP_USE} -gold" + +# sys-devel/clang, sys-devel/clang-runtime, sys-libs/llvm-libunwind, sys-libs/libcxx, sys-libs/libcxxabi +BOOTSTRAP_USE="${BOOTSTRAP_USE} compiler-rt clang libunwind" + +# sys-devel/clang +BOOTSTRAP_USE="${BOOTSTRAP_USE} default-compiler-rt default-lld default-libcxx llvm-libunwind" + +# sys-devel/clang-runtime +BOOTSTRAP_USE="${BOOTSTRAP_USE} libcxx -sanitize" + +# sys-libs/libcxxabi +BOOTSTRAP_USE="${BOOTSTRAP_USE} libcxxabi" + +# llvm & clang: explicitly disable all extra targets, otherwise linking stage2 fails +BOOTSTRAP_USE="${BOOTSTRAP_USE} -llvm_targets_BPF -llvm_targets_AMDGPU -llvm_targets_NVPTX -llvm_targets_BPF" diff --git a/profiles/features/clang/package.use b/profiles/features/clang/package.use new file mode 100644 index 000000000000..5d568cb8cb66 --- /dev/null +++ b/profiles/features/clang/package.use @@ -0,0 +1,17 @@ +# use lld by default +sys-devel/llvm -gold + +# use all defaults +sys-devel/clang compiler-rt default-compiler-rt default-lld default-libcxx llvm-libunwind +sys-libs/compiler-rt clang + +# disable sanitizers for now +sys-devel/clang-runtime compiler-rt libcxx -sanitize +# sys-libs/compiler-rt-sanitizers clang + +sys-libs/libcxx libunwind libcxxabi +sys-libs/libcxxabi libunwind +sys-libs/llvm-libunwind compiler-rt + +# libgcrypt doesn't like optimizations +dev-libs/libgcrypt o-flag-munging diff --git a/profiles/features/clang/packages b/profiles/features/clang/packages new file mode 100644 index 000000000000..9536b85862f3 --- /dev/null +++ b/profiles/features/clang/packages @@ -0,0 +1,14 @@ +# now part of @system set +*sys-devel/lld +*sys-devel/llvm +*sys-devel/clang +*sys-libs/libcxx +*sys-libs/libcxxabi +*sys-libs/compiler-rt +*sys-libs/llvm-libunwind + +# not needed with clang +-*sys-devel/gcc +-*sys-devel/gcc-config +-*sys-devel/binutils +-*sys-devel/binutils-config diff --git a/profiles/features/clang/packages.build b/profiles/features/clang/packages.build new file mode 100644 index 000000000000..fd1e69e329e3 --- /dev/null +++ b/profiles/features/clang/packages.build @@ -0,0 +1,14 @@ +# will be pulled by stage1 +sys-libs/compiler-rt +sys-libs/libcxxabi +sys-libs/libcxx +sys-devel/llvm +sys-devel/lld +sys-devel/clang +sys-libs/llvm-libunwind + +# remove gcc & friends +-sys-devel/gcc +-sys-devel/gcc-config +-sys-devel/binutils +-sys-devel/binutils-config diff --git a/profiles/features/clang/use.force b/profiles/features/clang/use.force new file mode 100644 index 000000000000..e671fa21003e --- /dev/null +++ b/profiles/features/clang/use.force @@ -0,0 +1 @@ +clang diff --git a/profiles/features/musl/package.mask b/profiles/features/musl/package.mask index 8bf8e5b3342e..95cd5b8d1c49 100644 --- a/profiles/features/musl/package.mask +++ b/profiles/features/musl/package.mask @@ -1,6 +1,10 @@ # Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 +# Conrad Kostecki (2021-12-15) +# Level Zero needs RTLD_DEEPBIND, which does not exist on musl. +dev-libs/level-zero + # Andreas K. Hüttel (2021-11-21) # No musl patches in ebuild (2020-03-20) -# No source builds for musl -app-emulation/firecracker - # Old undated blocks of masks # diff --git a/profiles/features/musl/package.use.force b/profiles/features/musl/package.use.force index da728fcc47ae..f11de170c840 100644 --- a/profiles/features/musl/package.use.force +++ b/profiles/features/musl/package.use.force @@ -1,4 +1,4 @@ -# Copyright 1999-2018 Gentoo Foundation. +# Copyright 1999-2021 Gentoo Authors. # Distributed under the terms of the GNU General Public License v2 # Andreas K. Hüttel (2021-07-14) diff --git a/profiles/features/musl/package.use.mask b/profiles/features/musl/package.use.mask index 72bf15947617..7d3bab631c12 100644 --- a/profiles/features/musl/package.use.mask +++ b/profiles/features/musl/package.use.mask @@ -1,6 +1,10 @@ # Copyright 1999-2021 Gentoo Authors. # Distributed under the terms of the GNU General Public License v2 +# Conrad Kostecki (2021-12-15) +# Support for L0 needs RTLD_DEEPBIND, which does not exist on musl. +dev-libs/intel-compute-runtime l0 + # Stijn Tintel (2021-12-02) # rarpd relies on ether_ntohost which is a stub in musl net-misc/iputils rarpd -- cgit v1.2.3