Hi all! I'm seeing a problem when building Samba with LTO. Linking fails reproducibly at this stage: [4086/4247] Linking default/source4/torture/smbtorture 13:31:06 runner /usr/bin/gcc default/source4/lib/registry/tests/generic_20.o ... ... many many object files and libraries ... /tmp/cc9skRWL.ltrans3.ltrans.o: In function `smbsrv_accept.lto_priv.11': <artificial>:(.text+0x4cd6): undefined reference to `timeval_current.lto_priv.641' /tmp/cc9skRWL.ltrans4.ltrans.o: In function `smbsrv_recv_smb2_request': <artificial>:(.text+0xf661): undefined reference to `timeval_current.lto_priv.641' ... many more undefined references to timeval_* ... Full build log: <https://www.samba.org/~slow/files/log.gz> $ gcc --version gcc (GCC) 5.3.1 20151207 (Red Hat 5.3.1-2) The buildsystem correctly passes -flto when compiling .c files and the link steps has it as well. The missing symbols are in libsamba-util which is among the linked libraries: $ nm bin/shared/libsamba-util.so.0 | egrep 'timeval_current$|timeval_elapsed$' 000000000001cd6b T timeval_current 000000000001a206 T timeval_elapsed The build works just fine without -flto. I'd appreciate any pointers on how to get -flto going. Thanks! -slow