From 5e8d03e90dc66e5ecc4ea9240b82c32eea64ee42 Mon Sep 17 00:00:00 2001 From: Arthur O'Dwyer Date: Sat, 9 Feb 2019 10:30:07 -0500 Subject: [PATCH] Add GCC 4.6 to the TravisCI build. With `-march=native`, we see assembler error messages like those described in https://github.com/uzh-rpg/rpg_svo/issues/7 . --- .travis.yml | 16 +++++++++++++++- Makefile.simple | 13 ++++++++++++- 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index c3159872..d0d44a57 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,6 +3,20 @@ services: - docker matrix: include: + - os: linux + addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - gcc-4.6 + - g++-4.6 + env: >- + TRAVIS_OS_NAME=linux + TRAVIS_BUILD_SYSTEM=Makefile + HYPERROGUE_CXX=g++-4.6 + HYPERROGUE_USE_GLEW=1 + HYPERROGUE_USE_PNG=1 - os: linux compiler: gcc env: >- @@ -126,7 +140,7 @@ script: ./configure CXXFLAGS="-Wall -Werror" make elif [[ "$TRAVIS_BUILD_SYSTEM" == "Makefile" ]]; then - make -f Makefile.simple + make -f Makefile.simple CXX="${HYPERROGUE_CXX-g++}" elif [[ "$TRAVIS_BUILD_SYSTEM" == "emscripten" ]]; then docker run --rm -v $(pwd):/src trzeci/emscripten make -f Makefile.simple emscripten else diff --git a/Makefile.simple b/Makefile.simple index 64627d6d..8a78314a 100644 --- a/Makefile.simple +++ b/Makefile.simple @@ -33,7 +33,11 @@ else ifneq (,$(findstring clang,$(TOOLCHAIN_VERSION_S))) TOOLCHAIN := clang else - TOOLCHAIN := gcc + ifneq (,$(findstring 4.6.,$(TOOLCHAIN_VERSION_S))) + TOOLCHAIN := gcc46 + else + TOOLCHAIN := gcc + endif endif endif @@ -91,6 +95,13 @@ ifeq (${TOOLCHAIN},gcc) CXXFLAGS_EARLY += -Wno-maybe-uninitialized -Wno-missing-field-initializers -Wno-unused-parameter endif +ifeq (${TOOLCHAIN},gcc46) + CXXFLAGS_EARLY += -std=c++0x + CXXFLAGS_EARLY += -W -Wall -Wextra -Werror + CXXFLAGS_EARLY += -Wno-missing-field-initializers -Wno-unused-parameter + CXXFLAGS_EARLY += -DUSE_STDFUNCTION=1 +endif + ifeq (${TOOLCHAIN},mingw) CXXFLAGS_EARLY += -std=c++11 -march=native CXXFLAGS_EARLY += -W -Wall -Wextra -Werror