[Mesa-dev] [PATCH v2] configure+mesa/st: check -std=c++11 support and enable tests accordingly

Gert Wollny gw.fossdev at gmail.com
Mon Sep 18 18:28:37 UTC 2017


Am Montag, den 18.09.2017, 16:07 +0100 schrieb Emil Velikov:
> Hi Gert,
> 
> On 17 September 2017 at 08:32, Gert Wollny <gw.fossdev at gmail.com>
> wrote:
> > The tests in mesa/st/tests require C++11. Check whether the
> > compiler
> > supports the -std=c++11 flag and if so, enable the tests. Otherwise
> > skip compiling and running the tests altogether.
> > 
> > Fixes: 7be6d8fe12  ("mesa/st: glsl_to_tgsi: add tests for the
> > new temporary lifetime tracker")
> > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102665
> > ---
> > - Submitter has no mesa-git write access
> > - Changes w.r.t v1:
> >   * correct white space errors
> >   * Add "Fixes" to commit message
> > 
> 
> Adding an extra configure check for a single test is a bit annoying.
> Can I ask you to give my earlier suggestion a try?

Well, considering that clover also requires c++11 I'd rather go with
unifying the two tests. 

For clover it is checked whether gcc >= 4.7. This is not save, since
different versions for CC and CXX could be specified, and for that
reason I thought that adding the check for the flag is better, but I
didn't want to touch too much of the configure script.

IMHO, also just checking the version number is not such a good idea,
because any compiler with another versioning scheme will not be
properly supported (e.g. clang).
 
> Namely:
> Replace the c++11 initialises with something along the lines of
>  "s/const vector<LocalClass>/const LocalClass[]/"

There are more c++11 constructs, so it's not that simple. 

Best, 
Gert 





More information about the mesa-dev mailing list