graphics/mesa-devel: LTO=on and ports LLVM note

From: Evgeniy Khramtsov via FreeBSD-X11 <FreeBSD-X11_at_FreeBSD.org>
Date: Thu, 18 Nov 2021 18:54:12 UTC
I remember some posts in FreeBSDDesktop Gitter about mesa-devel failing
to link with LTO=on when using ports LLVM as system compiler and toolchain.

Recently, I started to spend more time on using ports LLVM as system
toolchain, e.g. try to have this viable outside of my $(hostname),
and I realized that ports don't source variables from sys.mk (e.g. AR, NM,
RANLIB, STRIPBIN, ...) sometimes. I realized this after removing elftoolchain.

Once I fixed (just env passing tbh) fallout from removing elftoolchain up
to graphics/mesa-devel, I tried LTO=on build, and then it passed. So, the
issue is likely due to mixing base elftoolchain utils with ports LLVM.

Now I have ~40 patches locally to honor variables in sys.mk, and work
is likely not complete yet, e.g. I want to see if patching can be
reduced by passing variables via Mk/ or something else, see how to
properly pass utils not in sys.mk like addr2line, and I also didn't
fix all the fallout locally yet.

Before upstreaming I would like to avoid rush, e.g. have proper reproducer,
try to provide detailed logs with diffs, start from the root of ports tree,
etc. Also, I don't spend much time on tinkering now, so I think I will
start sending related /usr/ports patches by December.