[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#833850: dpkg-dev: add per-architecture optimisation flags to dpkg-buildflags



Control: reassign -1 gcc-6

[ Leaving enough context for gcc maintainers. ]

On Tue, 2016-08-09 at 14:08:45 +0200, Ximin Luo wrote:
> Package: dpkg-dev
> Version: 1.18.10
> Severity: wishlist

> Many software packages (e.g. see #833846) like to set optimisation
> flags based on autodetecting CPU features of the build machine. Of
> course this is not suitable for binary distributors in general, and
> for Debian package maintainers should instead hard-code optimisation
> flags based on DEB_HOST_ARCH.
> 
> However as far as I can tell, there is no central documentation
> resource that describes the optimisation flags suitable for each
> Debian architecture. Because of this, in practise package maintainers
> will just disable all build-time CPU detection to avoid generating
> illegal instructions. I have done this myself in the past, and this
> is what I suggest in #833846. But it's a shame to disable *all*
> optimisations.
> 
> dpkg-buildflags would be a good place to put these flags. Maintainers
> can do what they were doing before (disable build-time CPU autodetection)
> but still get a somewhat-optimised build - in fact, the most optimised
> that it can validly be for a Debian binary package. It would also act
> as a good central location to document which instructions each Debian
> architecture actually supports, and including how this might change
> over time - e.g. how i386 was bumped up to requiring i686 this May.

I think the right place to enable any such default ISAs is the
compiler (gcc in this case), because that is the one defining the
ISAs baseline. For example, at least according to the gcc-6 docs,
-msse and -msse2 are already enabled by default on amd64. So if other
architectures are missing similar settings then I'd suggest you propose
to enable them on gcc on this bug report.

Thanks,
Guillem


Reply to: