Hello, I want to do some performance measures and have problems compiling postgres with LTO activated. I tried it with postgresql 12.0 and 12.2, yielding both the same result. The errors seem to relate to languages and encoding-functions. The linker simply seems unable to find them. Also it does not matter, wether I use the thin LTO or the full LLVM LTO. Normal compilation (without any additional CFLAGS) works. -------- System data Mac OS X Catalina llvm 8 Apple clang version 11.0.0 (clang-1100.0.33.17) Target: x86_64-apple-darwin19.3.0 -------- Configuration ./configure --prefix=../dist CFLAGS="-flto=thin -O3" -------- Error message (created by linker) undef: _pg_mic2ascii undef: _check_encoding_conversion_args undef: _pg_ascii2mic Undefined symbols for architecture x86_64: "_pg_mic2ascii", referenced from: _mic_to_ascii in lto.o "_check_encoding_conversion_args", referenced from: _ascii_to_mic in lto.o _mic_to_ascii in lto.o "_pg_ascii2mic", referenced from: _ascii_to_mic in lto.o ---- undef: _LocalToUtf undef: _check_encoding_conversion_args undef: _UtfToLocal Undefined symbols for architecture x86_64: "_LocalToUtf", referenced from: _koi8r_to_utf8 in lto.o _koi8u_to_utf8 in lto.o "_check_encoding_conversion_args", referenced from: _utf8_to_koi8r in lto.o _koi8r_to_utf8 in lto.o _utf8_to_koi8u in lto.o _koi8u_to_utf8 in lto.o "_UtfToLocal", referenced from: _utf8_to_koi8r in lto.o _utf8_to_koi8u in lto.o -- Sent from: https://www.postgresql-archive.org/PostgreSQL-general-f1843780.html