Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Nov 2021 21:54:12 +0300
From:      Evgeniy Khramtsov via FreeBSD-X11 <FreeBSD-X11@FreeBSD.org>
To:        FreeBSD-X11@FreeBSD.org
Subject:   graphics/mesa-devel: LTO=on and ports LLVM note
Message-ID:  <20211118185412.ijqokqwkkf7t6iqz@vax.khramtsov.org>

next in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20211118185412.ijqokqwkkf7t6iqz>