/gentoo/

Gentoo masterrace thread. Talk about the bestest and most precious distro there is. Show what you're working on

Attached: 쭈우우욱.gif (580x518, 1.61M)

Other urls found in this thread:

github.com/InBetweenNames/gentooLTO
wiki.gentoo.org/wiki/Main_Page#Getting_started
twitter.com/AnonBabble

Shit guys i fucked up badly. I meant to say Windows 10 LTSC™

Cute Myaano

that's not how you spell OpenSUSE

That whole article feels like it's way past its use by date.
wiki article:
CFLAGS="${CFLAGS} -flto=thin"
CXXFLAGS="${CXXFLAGS} -flto=thin"
LDFLAGS="-Wl,-O2 -Wl,--as-needed"
wiki discussion:
CFLAGS="${CFLAGS} -flto=thin"
CXXFLAGS="${CXXFLAGS} -flto=thin"
LDFLAGS="${LDFLAGS} -flto=thin"
or
LDFLAGS="-Wl,-O2 -Wl,--as-needed -Wl,--gc-sections -march=native -O3 -fuse-ld=lld -rtlib=compiler-rt -stdlib=libc++ -Wl,-lto-O3 -Wl,--build-id -Wl,--error-limit=0 -Wl,--icf=all -Wl,--thinlto-jobs=8 -Wl,--threads"

github.com/InBetweenNames/gentooLTO
This sets -flto=thin in C{,XX}FLAGS only and nothing special in LDFLAGS

clover doesn't even touch LDFLAGS
CFLAGS="... -flto=8 ..."
CXXFLAGS="${CFLAGS}"

llvm documentation suggests that you need to tell -flto=thin to both compiler and linker, but as there are multiple layers of portage and build scripts above the tools themselves passing or not passing the flags around this all becomes rather confusing.

Install Gentoo.

Attached: gendooooooooo.png (400x420, 21K)

cont.
My own testing of this is rather limited in comparison but this setup worked on few packages and didn't on some
cat /etc/portage/env/fomgfast.conf
CC="clang"
CXX="clang++"
AR="llvm-ar"
NM="llvm-nm"
RANLIB="llvm-ranlib"
CFLAGS="-O3 -march=native -pipe -flto=thin"
CXXFLAGS="${CFLAGS}"
LDFLAGS="-Wl,-O2 -Wl,--as-needed -fuse-ld=lld -Wl,--thinlto-jobs=16"

You can update the wiki if you want, it would surely be helpful.

wiki.gentoo.org/wiki/Main_Page#Getting_started

Why actually are you using -fuse-ld=lld rather than just using LD="ld.lld"?

Is this the Myaano thread?

Just following documentation and it worked:
>Using LLD
LLD is installed as ld.lld. On Unix, linkers are invoked by compiler drivers, so you are not expected to use that command directly. There are a few ways to tell compiler drivers to use ld.lld instead of the default linker.
>The easiest way to do that is to overwrite the default linker. After installing LLD to somewhere on your disk, you can create a symbolic link by doing ln -s /path/to/ld.lld /usr/bin/ld so that /usr/bin/ld is resolved to LLD.
If you don’t want to change the system setting, you can use clang’s -fuse-ld option. In this way, you want to set -fuse-ld=lld to LDFLAGS when building your programs.
>LLD leaves its name and version number to a .comment section in an output. If you are in doubt whether you are successfully using LLD or not, run readelf --string-dump .comment and examine the output. If the string “Linker: LLD” is included in the output, you are using LLD.

Is LD variable even a thing and does all build scripts and portage respect that?

>Is LD variable even a thing and does all build scripts and portage respect that?
You might be right; maybe I'm an idiot and used a variable that doesn't exist.

You could also use binutils-config

Install Gentoo.

Doesn't seem possible with 2.31.1:
* binutils-config: sorry, but x86_64-pc-linux-gnu-2.31.1 doesn't support the ld.lld linker

Do you need the masked 2.32 or 9999 for that?

binutils-config can only change between ld.gold and ld.bfd. If you want to swap systemwide default linker to ld.lld then the best way to do it for now is to change where the /usr/bin/ld link points to manually (this is essentially what binutils-config does). As for my setup I was only interested in testing this on a per package basis that's why passing it with -fuse-ld= made most sense

Is there an easy way to change the default libc?

Eselect profile set 44 during install.

>try to update whole system
>can't update openssl because python-3.4 doesn't support it
>bunch of stuff requires python_targets3_4
>remove all use stuff related to python and the targets
>removed python-3.4 and trying to rebuild everything depending on it
>for some reason pulls rust, it doesn't compile
fuck this fucking system

Well, Portage runs on Python, IIRC. gj m8!

Python versions can be set per package like:
## /etc/portage/package.use

app-text/asciidoc highlight PYTHON_SINGLE_TARGET: -* python2_7 PYTHON_TARGETS: -* python2_7


> bunch of stuff requires python_targets3_4
Nothing does, as far as I can tell. You likely could just have changed that to python3_6 or something and resolved against it. Feel free to explicitly rebuild things that depend on python3_4 if really really necessary.

cute myaano

Attached: 1460840671743.webm (610x616, 629K)

better way would be to remove any python targets from his make.conf and just let the profile defaults take over

Maybe that's even closer to what he wants, sure.