This is an archive of the discontinued LLVM Phabricator instance.

[Driver] Filter out <libdir>/gcc and <libdir>/gcc-cross if they do not exists
ClosedPublic

Authored by dmantipov on Sep 18 2020, 6:12 AM.

Details

Summary

For the regular (system-wide) installation it's OK to assume that Clang is installed alongside with GCC, probably with the same prefix (usually /usr on most Linux systems). But this is not so for standalone installations with custom prefix, where the number of VFS lookups for the suitable GCC installation may be substantially reduced by filtering out <libdir>/gcc and (Debian-specific) <libdir>/gcc-cross early, before trying <libdir>/gcc/<cpu-vendor-os> and <libdir>/gcc-cross/<cpu-vendor-os>, respectively.

For my installation configured with -DCMAKE_INSTALL_PREFIX=/home/antipov/.local/llvm-12.0.0, it's possible to filter out 80 of 200 VFS lookups, from:

stat("/home/antipov/.local/llvm-12.0.0/bin/..", {st_mode=S_IFDIR|0755, st_size=73, ...}) = 0
stat("/home/antipov/.local/llvm-12.0.0/bin/../lib64", {st_mode=S_IFDIR|0755, st_size=8192, ...}) = 0
openat(AT_FDCWD, "/home/antipov/.local/llvm-12.0.0/bin/../lib64/gcc/x86_64-unknown-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/antipov/.local/llvm-12.0.0/bin/../lib64/gcc-cross/x86_64-unknown-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/antipov/.local/llvm-12.0.0/bin/../lib64/x86_64-unknown-linux-gnu/gcc/x86_64-unknown-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/antipov/.local/llvm-12.0.0/bin/../lib64/gcc/x86_64-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/antipov/.local/llvm-12.0.0/bin/../lib64/gcc-cross/x86_64-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/antipov/.local/llvm-12.0.0/bin/../lib64/x86_64-linux-gnu/gcc/x86_64-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/antipov/.local/llvm-12.0.0/bin/../lib64/gcc/x86_64-unknown-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/antipov/.local/llvm-12.0.0/bin/../lib64/gcc-cross/x86_64-unknown-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/antipov/.local/llvm-12.0.0/bin/../lib64/x86_64-unknown-linux-gnu/gcc/x86_64-unknown-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/antipov/.local/llvm-12.0.0/bin/../lib64/gcc/x86_64-pc-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/antipov/.local/llvm-12.0.0/bin/../lib64/gcc-cross/x86_64-pc-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/antipov/.local/llvm-12.0.0/bin/../lib64/x86_64-pc-linux-gnu/gcc/x86_64-pc-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/antipov/.local/llvm-12.0.0/bin/../lib64/gcc/x86_64-redhat-linux6E", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/antipov/.local/llvm-12.0.0/bin/../lib64/gcc-cross/x86_64-redhat-linux6E", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/antipov/.local/llvm-12.0.0/bin/../lib64/x86_64-redhat-linux6E/gcc/x86_64-redhat-linux6E", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/antipov/.local/llvm-12.0.0/bin/../lib64/gcc/x86_64-redhat-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/antipov/.local/llvm-12.0.0/bin/../lib64/gcc-cross/x86_64-redhat-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/antipov/.local/llvm-12.0.0/bin/../lib64/x86_64-redhat-linux/gcc/x86_64-redhat-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/antipov/.local/llvm-12.0.0/bin/../lib64/gcc/x86_64-suse-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/antipov/.local/llvm-12.0.0/bin/../lib64/gcc-cross/x86_64-suse-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/antipov/.local/llvm-12.0.0/bin/../lib64/x86_64-suse-linux/gcc/x86_64-suse-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/antipov/.local/llvm-12.0.0/bin/../lib64/gcc/x86_64-manbo-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/antipov/.local/llvm-12.0.0/bin/../lib64/gcc-cross/x86_64-manbo-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/antipov/.local/llvm-12.0.0/bin/../lib64/x86_64-manbo-linux-gnu/gcc/x86_64-manbo-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/antipov/.local/llvm-12.0.0/bin/../lib64/gcc/x86_64-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/antipov/.local/llvm-12.0.0/bin/../lib64/gcc-cross/x86_64-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/antipov/.local/llvm-12.0.0/bin/../lib64/x86_64-linux-gnu/gcc/x86_64-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/antipov/.local/llvm-12.0.0/bin/../lib64/gcc/x86_64-slackware-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/antipov/.local/llvm-12.0.0/bin/../lib64/gcc-cross/x86_64-slackware-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/antipov/.local/llvm-12.0.0/bin/../lib64/x86_64-slackware-linux/gcc/x86_64-slackware-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/antipov/.local/llvm-12.0.0/bin/../lib64/gcc/x86_64-unknown-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/antipov/.local/llvm-12.0.0/bin/../lib64/gcc-cross/x86_64-unknown-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/antipov/.local/llvm-12.0.0/bin/../lib64/x86_64-unknown-linux/gcc/x86_64-unknown-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/antipov/.local/llvm-12.0.0/bin/../lib64/gcc/x86_64-amazon-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/antipov/.local/llvm-12.0.0/bin/../lib64/gcc-cross/x86_64-amazon-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/antipov/.local/llvm-12.0.0/bin/../lib64/x86_64-amazon-linux/gcc/x86_64-amazon-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/antipov/.local/llvm-12.0.0/bin/../lib64/gcc/x86_64-linux-android", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/antipov/.local/llvm-12.0.0/bin/../lib64/gcc-cross/x86_64-linux-android", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/antipov/.local/llvm-12.0.0/bin/../lib64/x86_64-linux-android/gcc/x86_64-linux-android", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/antipov/.local/llvm-12.0.0/bin/../lib64/gcc/x86_64-unknown-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/antipov/.local/llvm-12.0.0/bin/../lib64/gcc-cross/x86_64-unknown-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/antipov/.local/llvm-12.0.0/bin/../lib64/x86_64-unknown-linux-gnu/gcc/x86_64-unknown-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
stat("/home/antipov/.local/llvm-12.0.0/bin/../lib", 0x7fff61cc4e00) = -1 ENOENT (No such file or directory)
stat("/home/antipov/.local/llvm-12.0.0/bin/../lib32", 0x7fff61cc4e00) = -1 ENOENT (No such file or directory)
stat("/home/antipov/.local/llvm-12.0.0/bin/../lib", 0x7fff61cc4e00) = -1 ENOENT (No such file or directory)
stat("/opt/rh/devtoolset-9/root/usr", 0x7fff61cc4e00) = -1 ENOENT (No such file or directory)
stat("/opt/rh/devtoolset-8/root/usr", 0x7fff61cc4e00) = -1 ENOENT (No such file or directory)
stat("/opt/rh/devtoolset-7/root/usr", 0x7fff61cc4e00) = -1 ENOENT (No such file or directory)
stat("/opt/rh/devtoolset-6/root/usr", 0x7fff61cc4e00) = -1 ENOENT (No such file or directory)
stat("/opt/rh/devtoolset-4/root/usr", 0x7fff61cc4e00) = -1 ENOENT (No such file or directory)
stat("/opt/rh/devtoolset-3/root/usr", 0x7fff61cc4e00) = -1 ENOENT (No such file or directory)
stat("/opt/rh/devtoolset-2/root/usr", 0x7fff61cc4e00) = -1 ENOENT (No such file or directory)
stat("/usr", {st_mode=S_IFDIR|0755, st_size=155, ...}) = 0
stat("/usr/lib64", {st_mode=S_IFDIR|0555, st_size=167936, ...}) = 0
openat(AT_FDCWD, "/usr/lib64/gcc/x86_64-unknown-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/gcc-cross/x86_64-unknown-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/x86_64-unknown-linux-gnu/gcc/x86_64-unknown-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/gcc/x86_64-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/gcc-cross/x86_64-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/x86_64-linux-gnu/gcc/x86_64-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/gcc/x86_64-unknown-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/gcc-cross/x86_64-unknown-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/x86_64-unknown-linux-gnu/gcc/x86_64-unknown-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/gcc/x86_64-pc-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/gcc-cross/x86_64-pc-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/x86_64-pc-linux-gnu/gcc/x86_64-pc-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/gcc/x86_64-redhat-linux6E", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/gcc-cross/x86_64-redhat-linux6E", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/x86_64-redhat-linux6E/gcc/x86_64-redhat-linux6E", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/gcc/x86_64-redhat-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/gcc-cross/x86_64-redhat-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/x86_64-redhat-linux/gcc/x86_64-redhat-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/gcc/x86_64-suse-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/gcc-cross/x86_64-suse-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/x86_64-suse-linux/gcc/x86_64-suse-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/gcc/x86_64-manbo-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/gcc-cross/x86_64-manbo-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/x86_64-manbo-linux-gnu/gcc/x86_64-manbo-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/gcc/x86_64-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/gcc-cross/x86_64-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/x86_64-linux-gnu/gcc/x86_64-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/gcc/x86_64-slackware-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/gcc-cross/x86_64-slackware-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/x86_64-slackware-linux/gcc/x86_64-slackware-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/gcc/x86_64-unknown-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/gcc-cross/x86_64-unknown-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/x86_64-unknown-linux/gcc/x86_64-unknown-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/gcc/x86_64-amazon-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/gcc-cross/x86_64-amazon-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/x86_64-amazon-linux/gcc/x86_64-amazon-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/gcc/x86_64-linux-android", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/gcc-cross/x86_64-linux-android", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/x86_64-linux-android/gcc/x86_64-linux-android", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/gcc/x86_64-unknown-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/gcc-cross/x86_64-unknown-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/x86_64-unknown-linux-gnu/gcc/x86_64-unknown-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
stat("/usr/lib", {st_mode=S_IFDIR|0555, st_size=4096, ...}) = 0
openat(AT_FDCWD, "/usr/lib/gcc/x86_64-unknown-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc-cross/x86_64-unknown-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/x86_64-unknown-linux-gnu/gcc/x86_64-unknown-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc/x86_64-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc-cross/x86_64-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc/x86_64-unknown-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc-cross/x86_64-unknown-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/x86_64-unknown-linux-gnu/gcc/x86_64-unknown-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc/x86_64-pc-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc-cross/x86_64-pc-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/x86_64-pc-linux-gnu/gcc/x86_64-pc-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc/x86_64-redhat-linux6E", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc-cross/x86_64-redhat-linux6E", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/x86_64-redhat-linux6E/gcc/x86_64-redhat-linux6E", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc/x86_64-redhat-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 3
stat("/usr/lib/gcc/x86_64-redhat-linux/10/64/crtbegin.o", 0x7fff61cc3e70) = -1 ENOENT (No such file or directory)
stat("/usr/lib/gcc/x86_64-redhat-linux/10/crtbegin.o", {st_mode=S_IFREG|0644, st_size=2960, ...}) = 0
stat("/usr/lib/gcc/x86_64-redhat-linux/10/64/crtbegin.o", 0x7fff61cc3c60) = -1 ENOENT (No such file or directory)
stat("/usr/lib/gcc/x86_64-redhat-linux/10/32/crtbegin.o", {st_mode=S_IFREG|0644, st_size=2056, ...}) = 0
stat("/usr/lib/gcc/x86_64-redhat-linux/10/x32/crtbegin.o", 0x7fff61cc3cd0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc-cross/x86_64-redhat-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/x86_64-redhat-linux/gcc/x86_64-redhat-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc/x86_64-suse-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc-cross/x86_64-suse-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/x86_64-suse-linux/gcc/x86_64-suse-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc/x86_64-manbo-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc-cross/x86_64-manbo-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/x86_64-manbo-linux-gnu/gcc/x86_64-manbo-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc/x86_64-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc-cross/x86_64-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc/x86_64-slackware-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc-cross/x86_64-slackware-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/x86_64-slackware-linux/gcc/x86_64-slackware-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc/x86_64-unknown-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc-cross/x86_64-unknown-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/x86_64-unknown-linux/gcc/x86_64-unknown-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc/x86_64-amazon-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc-cross/x86_64-amazon-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/x86_64-amazon-linux/gcc/x86_64-amazon-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc/x86_64-linux-android", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc-cross/x86_64-linux-android", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/x86_64-linux-android/gcc/x86_64-linux-android", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc/x86_64-unknown-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc-cross/x86_64-unknown-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/x86_64-unknown-linux-gnu/gcc/x86_64-unknown-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
stat("/usr/lib32", 0x7fff61cc4e00)      = -1 ENOENT (No such file or directory)
stat("/usr/lib", {st_mode=S_IFDIR|0555, st_size=4096, ...}) = 0
openat(AT_FDCWD, "/usr/lib/gcc/i686-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc-cross/i686-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/i686-linux-gnu/gcc/i686-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc/i686-pc-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc-cross/i686-pc-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/i686-pc-linux-gnu/gcc/i686-pc-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc/i486-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc-cross/i486-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/i486-linux-gnu/gcc/i486-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc/i386-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc-cross/i386-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/i386-linux-gnu/gcc/i386-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc/i386-redhat-linux6E", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc-cross/i386-redhat-linux6E", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/i386-redhat-linux6E/gcc/i386-redhat-linux6E", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc/i686-redhat-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc-cross/i686-redhat-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/i686-redhat-linux/gcc/i686-redhat-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc/i586-redhat-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc-cross/i586-redhat-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/i586-redhat-linux/gcc/i586-redhat-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc/i386-redhat-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc-cross/i386-redhat-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/i386-redhat-linux/gcc/i386-redhat-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc/i586-suse-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc-cross/i586-suse-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/i586-suse-linux/gcc/i586-suse-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc/i486-slackware-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc-cross/i486-slackware-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/i486-slackware-linux/gcc/i486-slackware-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc/i686-montavista-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc-cross/i686-montavista-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/i686-montavista-linux/gcc/i686-montavista-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc/i586-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc-cross/i586-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/i586-linux-gnu/gcc/i586-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc/i686-linux-android", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc-cross/i686-linux-android", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/i686-linux-android/gcc/i686-linux-android", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc/i386-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc-cross/i386-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/i386-gnu/gcc/i386-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc/i486-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc-cross/i486-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/i486-gnu/gcc/i486-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc/i586-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc-cross/i586-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/i586-gnu/gcc/i586-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc/i686-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc-cross/i686-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/i686-gnu/gcc/i686-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc/i386-unknown-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc-cross/i386-unknown-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/i386-unknown-linux-gnu/gcc/i386-unknown-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)

to:

stat("/home/antipov/.local/llvm-12.0.0/bin/..", {st_mode=S_IFDIR|0755, st_size=73, ...}) = 0
stat("/home/antipov/.local/llvm-12.0.0/bin/../lib64", {st_mode=S_IFDIR|0755, st_size=8192, ...}) = 0
stat("/home/antipov/.local/llvm-12.0.0/bin/../lib64/gcc", 0x7ffe4ed007d0) = -1 ENOENT (No such file or directory)
stat("/home/antipov/.local/llvm-12.0.0/bin/../lib64/gcc-cross", 0x7ffe4ed007d0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/antipov/.local/llvm-12.0.0/bin/../lib64/x86_64-unknown-linux-gnu/gcc/x86_64-unknown-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/antipov/.local/llvm-12.0.0/bin/../lib64/x86_64-linux-gnu/gcc/x86_64-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/antipov/.local/llvm-12.0.0/bin/../lib64/x86_64-unknown-linux-gnu/gcc/x86_64-unknown-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/antipov/.local/llvm-12.0.0/bin/../lib64/x86_64-pc-linux-gnu/gcc/x86_64-pc-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/antipov/.local/llvm-12.0.0/bin/../lib64/x86_64-redhat-linux6E/gcc/x86_64-redhat-linux6E", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/antipov/.local/llvm-12.0.0/bin/../lib64/x86_64-redhat-linux/gcc/x86_64-redhat-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/antipov/.local/llvm-12.0.0/bin/../lib64/x86_64-suse-linux/gcc/x86_64-suse-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/antipov/.local/llvm-12.0.0/bin/../lib64/x86_64-manbo-linux-gnu/gcc/x86_64-manbo-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/antipov/.local/llvm-12.0.0/bin/../lib64/x86_64-linux-gnu/gcc/x86_64-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/antipov/.local/llvm-12.0.0/bin/../lib64/x86_64-slackware-linux/gcc/x86_64-slackware-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/antipov/.local/llvm-12.0.0/bin/../lib64/x86_64-unknown-linux/gcc/x86_64-unknown-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/antipov/.local/llvm-12.0.0/bin/../lib64/x86_64-amazon-linux/gcc/x86_64-amazon-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/antipov/.local/llvm-12.0.0/bin/../lib64/x86_64-linux-android/gcc/x86_64-linux-android", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/antipov/.local/llvm-12.0.0/bin/../lib64/x86_64-unknown-linux-gnu/gcc/x86_64-unknown-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
stat("/home/antipov/.local/llvm-12.0.0/bin/../lib", 0x7ffe4ed007d0) = -1 ENOENT (No such file or directory)
stat("/home/antipov/.local/llvm-12.0.0/bin/../lib32", 0x7ffe4ed007d0) = -1 ENOENT (No such file or directory)
stat("/home/antipov/.local/llvm-12.0.0/bin/../lib", 0x7ffe4ed007d0) = -1 ENOENT (No such file or directory)
stat("/opt/rh/devtoolset-9/root/usr", 0x7ffe4ed007d0) = -1 ENOENT (No such file or directory)
stat("/opt/rh/devtoolset-8/root/usr", 0x7ffe4ed007d0) = -1 ENOENT (No such file or directory)
stat("/opt/rh/devtoolset-7/root/usr", 0x7ffe4ed007d0) = -1 ENOENT (No such file or directory)
stat("/opt/rh/devtoolset-6/root/usr", 0x7ffe4ed007d0) = -1 ENOENT (No such file or directory)
stat("/opt/rh/devtoolset-4/root/usr", 0x7ffe4ed007d0) = -1 ENOENT (No such file or directory)
stat("/opt/rh/devtoolset-3/root/usr", 0x7ffe4ed007d0) = -1 ENOENT (No such file or directory)
stat("/opt/rh/devtoolset-2/root/usr", 0x7ffe4ed007d0) = -1 ENOENT (No such file or directory)
stat("/usr", {st_mode=S_IFDIR|0755, st_size=155, ...}) = 0
stat("/usr/lib64", {st_mode=S_IFDIR|0555, st_size=167936, ...}) = 0
stat("/usr/lib64/gcc", 0x7ffe4ed007d0)  = -1 ENOENT (No such file or directory)
stat("/usr/lib64/gcc-cross", 0x7ffe4ed007d0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/x86_64-unknown-linux-gnu/gcc/x86_64-unknown-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/x86_64-linux-gnu/gcc/x86_64-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/x86_64-unknown-linux-gnu/gcc/x86_64-unknown-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/x86_64-pc-linux-gnu/gcc/x86_64-pc-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/x86_64-redhat-linux6E/gcc/x86_64-redhat-linux6E", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/x86_64-redhat-linux/gcc/x86_64-redhat-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/x86_64-suse-linux/gcc/x86_64-suse-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/x86_64-manbo-linux-gnu/gcc/x86_64-manbo-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/x86_64-linux-gnu/gcc/x86_64-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/x86_64-slackware-linux/gcc/x86_64-slackware-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/x86_64-unknown-linux/gcc/x86_64-unknown-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/x86_64-amazon-linux/gcc/x86_64-amazon-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/x86_64-linux-android/gcc/x86_64-linux-android", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/x86_64-unknown-linux-gnu/gcc/x86_64-unknown-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
stat("/usr/lib", {st_mode=S_IFDIR|0555, st_size=4096, ...}) = 0
stat("/usr/lib/gcc", {st_mode=S_IFDIR|0755, st_size=33, ...}) = 0
stat("/usr/lib/gcc-cross", 0x7ffe4ed007d0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc/x86_64-unknown-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/x86_64-unknown-linux-gnu/gcc/x86_64-unknown-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc/x86_64-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc/x86_64-unknown-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/x86_64-unknown-linux-gnu/gcc/x86_64-unknown-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc/x86_64-pc-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/x86_64-pc-linux-gnu/gcc/x86_64-pc-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc/x86_64-redhat-linux6E", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/x86_64-redhat-linux6E/gcc/x86_64-redhat-linux6E", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc/x86_64-redhat-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 3
stat("/usr/lib/gcc/x86_64-redhat-linux/10/64/crtbegin.o", 0x7ffe4ecff840) = -1 ENOENT (No such file or directory)
stat("/usr/lib/gcc/x86_64-redhat-linux/10/crtbegin.o", {st_mode=S_IFREG|0644, st_size=2960, ...}) = 0
stat("/usr/lib/gcc/x86_64-redhat-linux/10/64/crtbegin.o", 0x7ffe4ecff630) = -1 ENOENT (No such file or directory)
stat("/usr/lib/gcc/x86_64-redhat-linux/10/32/crtbegin.o", {st_mode=S_IFREG|0644, st_size=2056, ...}) = 0
stat("/usr/lib/gcc/x86_64-redhat-linux/10/x32/crtbegin.o", 0x7ffe4ecff6a0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/x86_64-redhat-linux/gcc/x86_64-redhat-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc/x86_64-suse-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/x86_64-suse-linux/gcc/x86_64-suse-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc/x86_64-manbo-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/x86_64-manbo-linux-gnu/gcc/x86_64-manbo-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc/x86_64-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc/x86_64-slackware-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/x86_64-slackware-linux/gcc/x86_64-slackware-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc/x86_64-unknown-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/x86_64-unknown-linux/gcc/x86_64-unknown-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc/x86_64-amazon-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/x86_64-amazon-linux/gcc/x86_64-amazon-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc/x86_64-linux-android", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/x86_64-linux-android/gcc/x86_64-linux-android", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc/x86_64-unknown-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/x86_64-unknown-linux-gnu/gcc/x86_64-unknown-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
stat("/usr/lib32", 0x7ffe4ed007d0)      = -1 ENOENT (No such file or directory)
stat("/usr/lib", {st_mode=S_IFDIR|0555, st_size=4096, ...}) = 0
openat(AT_FDCWD, "/usr/lib/gcc/i686-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/i686-linux-gnu/gcc/i686-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc/i686-pc-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/i686-pc-linux-gnu/gcc/i686-pc-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc/i486-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/i486-linux-gnu/gcc/i486-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc/i386-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/i386-linux-gnu/gcc/i386-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc/i386-redhat-linux6E", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/i386-redhat-linux6E/gcc/i386-redhat-linux6E", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc/i686-redhat-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/i686-redhat-linux/gcc/i686-redhat-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc/i586-redhat-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/i586-redhat-linux/gcc/i586-redhat-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc/i386-redhat-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/i386-redhat-linux/gcc/i386-redhat-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc/i586-suse-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/i586-suse-linux/gcc/i586-suse-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc/i486-slackware-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/i486-slackware-linux/gcc/i486-slackware-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc/i686-montavista-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/i686-montavista-linux/gcc/i686-montavista-linux", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc/i586-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/i586-linux-gnu/gcc/i586-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc/i686-linux-android", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/i686-linux-android/gcc/i686-linux-android", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc/i386-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/i386-gnu/gcc/i386-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc/i486-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/i486-gnu/gcc/i486-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc/i586-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/i586-gnu/gcc/i586-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc/i686-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/i686-gnu/gcc/i686-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/gcc/i386-unknown-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/i386-unknown-linux-gnu/gcc/i386-unknown-linux-gnu", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)

Diff Detail

Event Timeline

dmantipov created this revision.Sep 18 2020, 6:12 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 18 2020, 6:12 AM
dmantipov requested review of this revision.Sep 18 2020, 6:12 AM

Prefer a bit more meaningful variable names.

dmantipov added a reviewer: MaskRay.

Thanks for the patch! I'll let others review it, but I was just being curious: what tool do you use for intercepting & printing stat( and openat(? How can I repro locally?

manojgupta added inline comments.Sep 26 2020, 10:57 AM
clang/lib/Driver/ToolChains/Gnu.cpp
1950

Since these are class fields, please initialize these to false in beginning of the function. Otherwise, it might be tempting to use them elsewhere where they may not be initialized.

Without the patch

% strace -fc -e file /tmp/RelA/bin/clang '-###' a.cc
...
% time     seconds  usecs/call     calls    errors syscall
------ ----------- ----------- --------- --------- ----------------
 74.57    0.002809           8       331       312 openat
 13.83    0.000521           5        91        46 stat
 10.01    0.000377           6        58        47 access
  0.96    0.000036           7         5           readlink
  0.50    0.000019          19         1           unlink
  0.13    0.000005           1         5           lstat
  0.00    0.000000           0         1           execve
------ ----------- ----------- --------- --------- ----------------
100.00    0.003767                   492       405 total

With the patch

% strace -fc -e file /tmp/RelA/bin/clang '-###' a.cc
...
% time     seconds  usecs/call     calls    errors syscall
------ ----------- ----------- --------- --------- ----------------
 59.13    0.002345           9       239       220 openat
 21.66    0.000859           8        97        50 stat
 15.08    0.000598          10        58        47 access
  1.82    0.000072          14         5           readlink
  1.08    0.000043          43         1           execve
  0.73    0.000029          29         1           unlink
  0.50    0.000020           4         5           lstat
------ ----------- ----------- --------- --------- ----------------
100.00    0.003966                   406       317 total

A cross compile gets improved, too (strace -fc -e file /tmp/RelA/bin/clang++ -target powerpc64le-linux-gnu -isystem /usr/powerpc64le-linux-gnu/include/c++/9/powerpc64le-linux-gnu/ a.cc): 438 openat calls -> 414.

MaskRay added inline comments.Sep 26 2020, 5:05 PM
clang/lib/Driver/ToolChains/Gnu.cpp
1969–1970

Its use of GCCDirExists is uninitialized. I suggest that you set GCCDirExists and GCCCrossDirExists to be conservative.

2476

Clang is installed alongside with GCC

This is not correct. (1) clang does not need to be installed (it can be used in the build directory) (2) You can set --prefix (-B) and --sysroot to affect detected prefixes. Clang does not need to be beside GCC.

Thanks for the patch! I'll let others review it, but I was just being curious: what tool do you use for intercepting & printing stat( and openat(? How can I repro locally?

man strace :-) If you're on Windows, the closest match is https://docs.microsoft.com/en-us/sysinternals/downloads/procmon.

@MaskRay Sure clang does not need to be installed and does not need to be beside GCC. But usually it is, and IMO this is the convenient setup for the most users who are not involved in development of clang itself and probably rely on tools installed as OS vendor's defaults. On my Fedora 32 system, I have /usr/bin/g++ and /usr/bin/clang++ (commonly configured with prefix /usr), clang will look for GCC installation in /usr/lib/gcc/x86_64-redhat-linux, and so.

dmantipov updated this revision to Diff 294625.Sep 28 2020, 1:42 AM

Initialize GCCDirExists and GCCCrossDirExists before calling ScanLibDirForGCCTriple().

MaskRay added inline comments.Sep 28 2020, 10:25 AM
clang/lib/Driver/ToolChains/Gnu.cpp
2476

My point is about the accuracy of the comment. The choice "gcc/" + CandidateTriple.str() is unrelated to where Clang is installed.

MaskRay added inline comments.Sep 28 2020, 10:28 AM
clang/lib/Driver/ToolChains/Gnu.cpp
1969–1970

You may still GCCDirExists = GCCCrossDirExists = true here

If they are set to false by CandidateLibDirs, you don't want them to suppress the detection for CandidateBiarchLibDirs.

This probably suggests that the variables should not be member variables.

dmantipov updated this revision to Diff 294873.Sep 28 2020, 8:16 PM

Prefer locals and function parameters to class members.

Thanks @MaskRay for the method, some of my numbers are shown below.

Before:

# strace -fc -e file /home/antipov/.local/llvm-12.0.0/bin/clang++ test.cc 
% time     seconds  usecs/call     calls    errors syscall
------ ----------- ----------- --------- --------- ----------------
100.00    0.004000          12       333       254 openat
  0.00    0.000000           0        60           open
  0.00    0.000000           0       120        78 stat
  0.00    0.000000           0         8           lstat
  0.00    0.000000           0        68        53 access
  0.00    0.000000           0         3           execve
  0.00    0.000000           0         1           rename
  0.00    0.000000           0         4           unlink
  0.00    0.000000           0         7           readlink
  0.00    0.000000           0         1           chmod
------ ----------- ----------- --------- --------- ----------------
100.00    0.004000           6       605       385 total

# strace -fc -e file /home/antipov/.local/llvm-12.0.0/bin/clang++ -target mips-img-linux-gnu --gcc-toolchain=/home/antipov/.local/mips-img-linux-gnu/2017.10-05 --sysroot=/home/antipov/.local/mips-img-linux-gnu/2017.10-05/sysroot/mips-r6-hard test.cc 
% time     seconds  usecs/call     calls    errors syscall
------ ----------- ----------- --------- --------- ----------------
  0.00    0.000000           0        60           open
  0.00    0.000000           0       125        76 stat
  0.00    0.000000           0        93           lstat
  0.00    0.000000           0        72        56 access
  0.00    0.000000           0         3           execve
  0.00    0.000000           0         1           rename
  0.00    0.000000           0         4           unlink
  0.00    0.000000           0         7           readlink
  0.00    0.000000           0         1           chmod
  0.00    0.000000           0       234       157 openat
------ ----------- ----------- --------- --------- ----------------
100.00    0.000000           0       600       289 total

After:

# strace -fc -e file /home/antipov/.local/llvm-12.0.0/bin/clang++ test.cc 
% time     seconds  usecs/call     calls    errors syscall
------ ----------- ----------- --------- --------- ----------------
  0.00    0.000000           0        60           open
  0.00    0.000000           0       128        84 stat
  0.00    0.000000           0         8           lstat
  0.00    0.000000           0        68        53 access
  0.00    0.000000           0         3           execve
  0.00    0.000000           0         1           rename
  0.00    0.000000           0         4           unlink
  0.00    0.000000           0         7           readlink
  0.00    0.000000           0         1           chmod
  0.00    0.000000           0       245       166 openat
------ ----------- ----------- --------- --------- ----------------
100.00    0.000000           0       525       303 total

# strace -fc -e file /home/antipov/.local/llvm-12.0.0/bin/clang++ -target mips-img-linux-gnu --gcc-toolchain=/home/antipov/.local/mips-img-linux-gnu/2017.10-05 --sysroot=/home/antipov/.local/mips-img-linux-gnu/2017.10-05/sysroot/mips-r6-hard test.cc 
% time     seconds  usecs/call     calls    errors syscall
------ ----------- ----------- --------- --------- ----------------
  0.00    0.000000           0        60           open
  0.00    0.000000           0       131        80 stat
  0.00    0.000000           0        93           lstat
  0.00    0.000000           0        72        56 access
  0.00    0.000000           0         3           execve
  0.00    0.000000           0         1           rename
  0.00    0.000000           0         4           unlink
  0.00    0.000000           0         7           readlink
  0.00    0.000000           0         1           chmod
  0.00    0.000000           0       200       123 openat
------ ----------- ----------- --------- --------- ----------------
100.00    0.000000           0       572       259 total
MaskRay accepted this revision.Sep 28 2020, 8:37 PM

For my installation configured with -DCMAKE_INSTALL_PREFIX=/home/antipov/.local/llvm-12.0.0, it's possible to filter out 80 of 200 VFS lookups, from:

The strace dump is too long. Please don't include it in the message

This revision is now accepted and ready to land.Sep 28 2020, 8:37 PM
This revision was landed with ongoing or failed builds.Sep 28 2020, 11:19 PM
This revision was automatically updated to reflect the committed changes.