很长时间没有升级Gentoo Linux了, 手痒执行了一次全系统更新, 发现比以前的升级编译的时间长了非常多.

看了下log, 花时间最多的地方在gcc/mesa/llvm这三个包, 顺带研究了下gcc/llvm的关系,又使用equery 检查了下llvm包的依赖关系, 整个系统只有mesa一个包直接依赖llvm,对于个人用户, 建议还是果断将 -llvm use 标记添加到/etc/portage/make.conf, 减少升级编译的时间.除非你的工作确实需要llvm.以下是我优化后的mesa包的use标记列表:

下面是我的/etc/portage/make.conf中的USE变量配置的内容,我比较喜欢mate的简单,所以qt/kde等等都被移除了.

USE="${USE} systemd -samba ipv6 -cups -qt4 -ldap -gnome -kde jpeg jpeg2k tk -llvm"
equery u media-libs/mesa-18.2.8
 U I
 + + abi_x86_32           : 32-bit (x86) libraries
 - - bindist              : Disable patent-encumbered ARB_texture_float, EXT_texture_shared_exponent, and EXT_packed_float extensions.
 + + classic              : Build drivers based on the classic architecture.
 - - d3d9                 : Enable Direct 3D9 API through Nine state tracker. Can be used together with patched wine.
 - - debug                : Enable extra debug codepaths, like asserts and extra output. If you want to get meaningful backtraces see https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Backtraces
 + + dri3                 : Enable DRI3 support.
 + + egl                  : Enable EGL support.
 + + gallium              : Build drivers based on Gallium3D, the new architecture for 3D graphics drivers.
 + + gbm                  : Enable the Graphics Buffer Manager for EGL on KMS.
 - - gles1                : Enable GLESv1 support.
 - - gles2                : Enable GLESv2 support.
 - - llvm                 : Enable LLVM backend for Gallium3D.
 + + nptl                 : Enable support for Native POSIX Threads Library, the new threading module (requires linux-2.6 or better usually)
 - - opencl               : Enable the Clover Gallium OpenCL state tracker.
 - - openmax              : Enable OpenMAX video decode/encode acceleration for Gallium3D.
 - - osmesa               : Build the Mesa library for off-screen rendering.
 - - pax_kernel           : Enable if the user plans to run the package under a pax enabled hardened kernel
 - - pic                  : disable optimized assembly code that is not PIC friendly
 - - vaapi                : Enable Video Acceleration API for hardware decoding
 - - valgrind             : Compile in valgrind memory hints
 - - vdpau                : Enable the VDPAU acceleration interface for the Gallium3D Video Layer.
 + + video_cards_i915     : VIDEO_CARDS setting to build driver for Intel i915 video cards
 + + video_cards_i965     : VIDEO_CARDS setting to build driver for Intel i965 video cards
 - - video_cards_imx      : VIDEO_CARDS setting to build driver for Freescale i.MX video cards
 + + video_cards_intel    : VIDEO_CARDS setting to build driver for Intel video cards
 - - video_cards_nouveau  : VIDEO_CARDS setting to build reverse-engineered driver for nvidia cards
 - - video_cards_r100     : VIDEO_CARDS setting to build only r100 based chips code for radeon
 - - video_cards_r200     : VIDEO_CARDS setting to build only r200 based chips code for radeon
 - - video_cards_r300     : VIDEO_CARDS setting to build only r300, r400 and r500 based chips code for radeon
 - - video_cards_r600     : VIDEO_CARDS setting to build only r600, r700, Evergreen and Northern Islands based chips code for radeon
 - - video_cards_radeon   : VIDEO_CARDS setting to build driver for ATI radeon video cards
 - - video_cards_radeonsi : VIDEO_CARDS setting to build only Southern Islands based chips code for radeon
 - - video_cards_vmware   : VIDEO_CARDS setting to build driver for vmware video cards
 - - vulkan               : Enable Vulkan drivers
 - - wayland              : Enable support for dev-libs/wayland
 - - xa                   : Enable the XA (X Acceleration) API for Gallium3D.
 + + xvmc                 : Enable the XvMC acceleration interface for the Gallium3D Video Layer.

参考链接

【腾讯云】境外1核2G服务器低至2折,半价续费券限量免费领取!
https://cloud.tencent.com/act/cps/redirect?redirect=1068&cps_key=e4b50f6c64a4480367f8a8d16fd07c5a&from=console

标签: llvm, mesa, gentoo, equery

添加新评论