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

Re: How to build-depend on a C++11-capable compiler?



On Mon, Jul 21, 2014, at 12:48, Thibaut Paumard wrote:
> Hi,
> 
> The new release of my package Gyoto should be built preferably with a
> C++11-capable compiler. It can be built with a reduced feature-set
> without, though.
> 
> Is there a clever way to ensure that the default compiler is
> C++11-capable, if available in the archive, or should I simply
> Build-Depend on g++ (>=4:4.7)? (The goal behind this question is to make
> life easier for backporters and persons trying alternate toolchains).

Stable has g++-4.7 as default on amd64, i386, kfreebsd-amd64,
kfreebsd-i386,
so I would say - make a note to README.source and leave that
up-to-backporters.

clang and default gcc in jessie+ is C++11, so I would suggest to not
complicate it.

If you really insist you would have to:

- depend on g++-4.7 | g++ (>= 4:4.7)
- detect default CC in d/rules and pass correct CXX=g++-4.7

And that would only lead to non-deterministic builds confusing people
who
mangle CC/CXX (for good reasons).

I would suggest modifying configure check that would fail to compile if
the compiler is not C++11 instead of compiling with reduced feature set.

Ondrej
-- 
Ondřej Surý <ondrej@sury.org>
Knot DNS (https://www.knot-dns.cz/) – a high-performance DNS server


Reply to: