From 16cf18056b8b79f9b3e86b09bc91f55f714a9ff1 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Sat, 10 Jun 2017 19:52:48 +0200 Subject: Switch travis to gcc 6 --- .travis.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to '.travis.yml') diff --git a/.travis.yml b/.travis.yml index ede7851..2eeb47c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,8 @@ dist: trusty addons: &addons apt: + sources: &sources + - ubuntu-toolchain-r-test packages: &packages - libzmq3-dev - libzmq3 @@ -13,17 +15,18 @@ addons: &addons - libcurl4-openssl-dev - libfftw3-dev # libuhd-dev is not allowed + - g++-6 compiler: - - clang + - gcc script: - | ./bootstrap.sh - CC=clang CXX=clang++ ./configure --disable-zeromq --disable-output-uhd + CC=gcc-6 CXX=g++-6 ./configure --disable-zeromq --disable-output-uhd make - | ./bootstrap.sh - CC=clang CXX=clang++ ./configure --disable-output-uhd + CC=gcc-6 CXX=g++-6 ./configure --disable-output-uhd make -- cgit v1.2.3 From fcc6b39a136349870357ace9e431ff0e437f46d4 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Fri, 23 Jun 2017 16:21:39 +0200 Subject: Add configure option to disable march=native Packagers must be able to override these options themselves --- .travis.yml | 4 ++++ configure.ac | 33 +++++++++++++++++++-------------- 2 files changed, 23 insertions(+), 14 deletions(-) (limited to '.travis.yml') diff --git a/.travis.yml b/.travis.yml index 2eeb47c..2bd4ad6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,4 +29,8 @@ script: ./bootstrap.sh CC=gcc-6 CXX=g++-6 ./configure --disable-output-uhd make + - | + ./bootstrap.sh + CC=gcc-6 CXX=g++-6 ./configure --disable-output-uhd --disable-native + make diff --git a/configure.ac b/configure.ac index d39e318..4d94592 100644 --- a/configure.ac +++ b/configure.ac @@ -70,6 +70,10 @@ AC_ARG_ENABLE([zeromq], [AS_HELP_STRING([--disable-zeromq], [Disable ZeroMQ input, output and remote control])], [], [enable_zeromq=yes]) +AC_ARG_ENABLE([native], + [AS_HELP_STRING([--disable-native], [Do not compile with -march=native])], + [], [enable_native=yes]) + # UHD support control AC_ARG_ENABLE([output_uhd], [AS_HELP_STRING([--disable-output-uhd], [Disable UHD output])], @@ -162,20 +166,21 @@ AC_LANG_POP([C++]) # Check for march -AC_MSG_CHECKING(if we can add -march=native to CFLAGS) - -save_CXXFLAGS="$CXXFLAGS" -CXXFLAGS="$CXXFLAGS -march=native" -AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[ -void testfunc(void) {} -]])], -[supports_march_native=yes], -[supports_march_native=no] -) -AC_MSG_RESULT($supports_march_native) -if test x"$supports_march_native" = xno; then - CXXFLAGS="$save_CXXFLAGS" -fi +AS_IF([test "x$enable_native" = "xyes"], + [AC_MSG_CHECKING(if we can add -march=native to CFLAGS) + save_CXXFLAGS="$CXXFLAGS" + CXXFLAGS="$CXXFLAGS -march=native" + AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[ + void testfunc(void) {} + ]])], + [supports_march_native=yes], + [supports_march_native=no] + ) + AC_MSG_RESULT($supports_march_native) + if test x"$supports_march_native" = xno; then + CXXFLAGS="$save_CXXFLAGS" + fi + ]) AC_TYPE_SIGNAL AC_CHECK_FUNCS([bzero floor ftime gettimeofday memset sqrt strchr strerror strtol]) -- cgit v1.2.3