tce-load -i compiletc bzip2-dev liblzma-dev zstd-dev

wget https://sourceware.org/ftp/elfutils/0.194/elfutils-0.194.tar.bz2

cd elfutils-0.194

CC="gcc -flto -mtune=generic -Os -pipe" CXX="g++ -flto -mtune=generic -Os -pipe -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local --localstatedir=/var --program-prefix="eu-"

[lto fails]

find . -name Makefile -type f -exec sed -i 's/-g -O2//g' {} \;

make [2m 12.63s]
make install

=====================================================================
        elfutils: 0.194 (eu_version: 194)
=====================================================================

    Prefix                             : /usr/local
    Program prefix ("eu-" recommended) : eu-
    Source code location               : .
    Maintainer mode                    : 
    build arch                         : x86_64-pc-linux-gnu

    CFLAGS=-D_FORTIFY_SOURCE=3 -g -O2
    CXXFLAGS=-D_FORTIFY_SOURCE=3 -g -O2

  RECOMMENDED FEATURES (should all be yes)
    gzip support                       : yes
    bzip2 support                      : yes
    lzma/xz support                    : yes
    zstd support                       : yes
    zstd compression support           : yes
    libstdc++ demangle support         : yes
    File textrel check                 : yes
    Symbol versioning                  : yes

  NOT RECOMMENDED FEATURES (should all be no)
    Experimental thread safety         : no
    install elf.h                      : no

  OTHER FEATURES
    Deterministic archives by default  : false
    Native language support            : yes
    Extra Valgrind annotations         : no
    libdebuginfod client support       : no
    Debuginfod server support          : no
    Default DEBUGINFOD_URLS            : 
    Debuginfod RPM sig checking        : no
    Default DEBUGINFOD_IMA_CERT_PATH   : 
    eu-stacktrace support              : no

  EXTRA TEST FEATURES (used with make check)
    have bunzip2 installed (required)  : yes
    have zstd installed                : yes
    C++11                              : yes
    debug branch prediction            : no
    gprof support                      : no
    gcov support                       : no
    run all tests under valgrind       : no
    gcc undefined behaviour sanitizer  : no
    gcc address sanitizer              : no
    clang memory sanitizer             : no
    use rpath in tests                 : no
    test biarch                        : no
