I don't think disabling LTO is the correct solution here. At least, view3dscene 4.2.0-2 still FTBFS in Ubuntu with:
/usr/bin/ld.bfd: -f may not be used without -shared Please consider the patch that was applied in Ubuntu [1], which filters out -ffat-lto-objects from LDFLAGS. --- a/debian/rules +++ b/debian/rules @@ -22,7 +22,7 @@ # Set default compilation options LDFLAGS=$(strip $(shell DEB_BUILD_MAINT_OPTIONS=$(DEB_BUILD_MAINT_OPTIONS) \ dpkg-buildflags --get LDFLAGS | \ - sed -e 's/-Wl,//g' -e 's/,/ /g' -e 's1-specs=/usr/share/dpkg/.*\.specs11')) + sed -e 's/-Wl,//g' -e 's/,/ /g' -e 's1-specs=/usr/share/dpkg/.*\.specs11' -e 's/-ffat-lto-objects//')) BUILDOPTS=-k"${LDFLAGS}"\ -dRELEASE \ -Mobjfpc \ [1] https://launchpad.net/ubuntu/+source/view3dscene/4.0.0-3ubuntu1