[Mesa-dev] [PATCH v3 0/2] build system: Unify c++11 detection and used [was: configure+mesa/st:check -std=c++11 support and enable tests accordingly]

Gert Wollny gw.fossdev at gmail.com
Tue Oct 3 07:31:03 UTC 2017


Following Emils comments I've updated the patches. 

Compiling was tested on travis on top of 677edff5cf (wayland-egl: rework ...) 
plus the patch  "wayland-egl: redistribute wayland.egl.h include" proposed by 
Tobias Klausmann: https://travis-ci.org/gerddie/mesa/builds/282591233 to fix 
some build configurations.  

Changes: 

patch 1: 
- use AX_CHECK_COMPILE_FLAG to test for support of -std=c++11, this 
  avoids adding a new custom m4 file
- use if-then tests instead of calling the macro various times 
- remove undocumented changes to .travis.yml 

patch 2: 
- use llvm-3.3 when building with g++-4.4 since llvm-3.6 actually sets 
  the -std=c++11 flag resulting in build failure with g++4.4 that doesn't 
  support this flag. 

Regarding adding yet anouther build configuration to travis: 
I propose to add this test, because mesa is supposed to support compilers 
gcc/g++ 4.2, and -std=c++11 was not supported before g++-4.7. 
Given that g++ >= 6 is now the standard in Debian stable and derivatives, 
and defaults to c++14, developers using these distros might not be aware 
when they add c++11 (or c++14) code.

best regards, 
Gert 

Gert Wollny (2):
  configure+mesa/st: unify check for -std=c++11 support and enable
    accordingly
  travis: Add test for gcc-4.4 compiler tool chain

 .travis.yml                                   | 31 +++++++++++++++++++++++++++
 configure.ac                                  | 18 ++++++++++------
 src/gallium/drivers/swr/Makefile.am           |  4 ++--
 src/gallium/state_trackers/clover/Makefile.am |  6 +++---
 src/mesa/state_tracker/tests/Makefile.am      |  7 +++++-
 5 files changed, 54 insertions(+), 12 deletions(-)

-- 
2.13.5



More information about the mesa-dev mailing list