Re: Tom Lane > I fear that #2 is actually a pretty serious concern. I think there > are a lot of places where we've assumed semi-implicitly that > compilation file boundaries are optimization barriers, particularly > around stuff like LWLocks and semaphores. I don't really want to > spend time chasing obscure, irreproducible bugs that may appear when > that assumption gets broken. I especially don't want to do it just > because some packager has randomly decided to inject random build > switches.
Ubuntu enabled -ftlo=auto by default in 22.04, so it has been around for some time already. $ dpkg-buildflags CFLAGS=-g -O2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -ffile-prefix-map=... -flto=auto -ffat-lto-objects -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -fdebug-prefix-map=... Christoph