I have scripted the kernel build process, and that part is straight forward.
I checked that the LLVM/Rust tool chain is OK from the kernel point of view:
Code: Select all
~ # cd /usr/src/linux
/usr/src/linux # export LLVM=1
/usr/src/linux # make rustavailable
Rust is available!
Code: Select all
~ # cd /usr/src/linux
/usr/src/linux # export LLVM=1
/usr/src/linux # make distclean
/usr/src/linux # zcat /proc/config.gz >.config
/usr/src/linux # make olddefconfig
/usr/src/linux # make menuconfig
/usr/src/linux # make -j64
/usr/src/linux # make modules_install
Since modules are involved - I know I can't mix two instances of the same kernel version this way - a single version has to be one or the other.
My question then relates to the next part of the kernel build, where this command is run:
Code: Select all
emerge --oneshot --jobs @module-rebuildCode: Select all
~ # cat /etc/portage/env/compiler-clang
# Normal settings here
COMMON_FLAGS="-O2 -march=native"
CFLAGS="${COMMON_FLAGS}"
CXXFLAGS="${COMMON_FLAGS}"
CC="clang"
CPP="clang-cpp" # necessary for xorg-server and possibly other packages
CXX="clang++"
AR="llvm-ar"
NM="llvm-nm"
RANLIB="llvm-ranlib"
There are two problems with this from my point of view:
- I have to know what packages are in @module-rebuild and manually change the settings for each build
- I have to manually change the entries depending on whether I am using LLVM=1 or not.
So, the question is - can I temporarily override /etc/portage/env/package.env settings for an emerge invocation - so that all packages in that invocation use the same settings, without having to know which packages are being emerged?


