From 188df2b12e0cce5d0fd1b9dd3167ab9a7409301c Mon Sep 17 00:00:00 2001 From: Mathieu Lamarre Date: Wed, 21 Feb 2018 11:33:47 -0500 Subject: [PATCH 1/3] Build fix for gcc 5.4.0 Fix an unused variable warning --- build/config-linux-gcc-debug.py | 2 +- build/config-linux-gcc.py | 2 +- src/libcore/timer.cpp | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/build/config-linux-gcc-debug.py b/build/config-linux-gcc-debug.py index a21fa87f4..3958f7eab 100644 --- a/build/config-linux-gcc-debug.py +++ b/build/config-linux-gcc-debug.py @@ -4,7 +4,7 @@ DISTDIR = '#dist' CXX = 'g++' CC = 'gcc' -CXXFLAGS = ['-O0', '-Wall', '-g', '-pipe', '-march=nocona', '-msse2', '-ftree-vectorize', '-mfpmath=sse', '-funsafe-math-optimizations', '-fno-rounding-math', '-fno-signaling-nans', '-fno-math-errno', '-fno-omit-frame-pointer', '-DMTS_DEBUG', '-DSINGLE_PRECISION', '-DSPECTRUM_SAMPLES=3', '-DMTS_SSE', '-DMTS_HAS_COHERENT_RT', '-fopenmp', '-fvisibility=hidden', '-mtls-dialect=gnu2', '-std=c++11', '-fPIC'] +CXXFLAGS = ['-O0', '-Wall', '-std=c++11', '-g', '-pipe', '-march=nocona', '-msse2', '-ftree-vectorize', '-mfpmath=sse', '-funsafe-math-optimizations', '-fno-rounding-math', '-fno-signaling-nans', '-fno-math-errno', '-fno-omit-frame-pointer', '-DMTS_DEBUG', '-DSINGLE_PRECISION', '-DSPECTRUM_SAMPLES=3', '-DMTS_SSE', '-DMTS_HAS_COHERENT_RT', '-fopenmp', '-fvisibility=hidden', '-mtls-dialect=gnu2', '-std=c++11', '-fPIC'] LINKFLAGS = [] SHLINKFLAGS = ['-rdynamic', '-shared', '-fPIC', '-lstdc++'] BASEINCLUDE = ['#include'] diff --git a/build/config-linux-gcc.py b/build/config-linux-gcc.py index 8443a4a79..c33b33c32 100644 --- a/build/config-linux-gcc.py +++ b/build/config-linux-gcc.py @@ -4,7 +4,7 @@ DISTDIR = '#dist' CXX = 'g++' CC = 'gcc' -CXXFLAGS = ['-O3', '-Wall', '-g', '-pipe', '-march=nocona', '-msse2', '-ftree-vectorize', '-mfpmath=sse', '-funsafe-math-optimizations', '-fno-rounding-math', '-fno-signaling-nans', '-fno-math-errno', '-fomit-frame-pointer', '-DMTS_DEBUG', '-DSINGLE_PRECISION', '-DSPECTRUM_SAMPLES=3', '-DMTS_SSE', '-DMTS_HAS_COHERENT_RT', '-fopenmp', '-fvisibility=hidden', '-mtls-dialect=gnu2'] +CXXFLAGS = ['-O3', '-Wall', '-std=c++11', '-g', '-pipe', '-march=nocona', '-msse2', '-ftree-vectorize', '-mfpmath=sse', '-funsafe-math-optimizations', '-fno-rounding-math', '-fno-signaling-nans', '-fno-math-errno', '-fomit-frame-pointer', '-DMTS_DEBUG', '-DSINGLE_PRECISION', '-DSPECTRUM_SAMPLES=3', '-DMTS_SSE', '-DMTS_HAS_COHERENT_RT', '-fopenmp', '-fvisibility=hidden', '-mtls-dialect=gnu2'] LINKFLAGS = [] SHLINKFLAGS = ['-rdynamic', '-shared', '-fPIC', '-lstdc++'] BASEINCLUDE = ['#include'] diff --git a/src/libcore/timer.cpp b/src/libcore/timer.cpp index 4e5e2b40f..480a9e978 100644 --- a/src/libcore/timer.cpp +++ b/src/libcore/timer.cpp @@ -89,6 +89,7 @@ namespace { #elif defined(__OSX__) return mach_absolute_time() * __resolution; #else + (void) __resolution; // avoid unused warning timespec tspec; clock_gettime(TIMER_CLOCK, &tspec); return timespecToNano(tspec); From 0652c4abc66f21c914e2285509d3574d36f2ccb2 Mon Sep 17 00:00:00 2001 From: Mathieu Lamarre Date: Wed, 21 Feb 2018 11:46:38 -0500 Subject: [PATCH 2/3] Remove extra c+11 switch Didn't notice the debug config already had it --- build/config-linux-gcc-debug.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/config-linux-gcc-debug.py b/build/config-linux-gcc-debug.py index 3958f7eab..5613b07c6 100644 --- a/build/config-linux-gcc-debug.py +++ b/build/config-linux-gcc-debug.py @@ -4,7 +4,7 @@ DISTDIR = '#dist' CXX = 'g++' CC = 'gcc' -CXXFLAGS = ['-O0', '-Wall', '-std=c++11', '-g', '-pipe', '-march=nocona', '-msse2', '-ftree-vectorize', '-mfpmath=sse', '-funsafe-math-optimizations', '-fno-rounding-math', '-fno-signaling-nans', '-fno-math-errno', '-fno-omit-frame-pointer', '-DMTS_DEBUG', '-DSINGLE_PRECISION', '-DSPECTRUM_SAMPLES=3', '-DMTS_SSE', '-DMTS_HAS_COHERENT_RT', '-fopenmp', '-fvisibility=hidden', '-mtls-dialect=gnu2', '-std=c++11', '-fPIC'] +CXXFLAGS = ['-O0', '-Wall', '-std=c++11', '-g', '-pipe', '-march=nocona', '-msse2', '-ftree-vectorize', '-mfpmath=sse', '-funsafe-math-optimizations', '-fno-rounding-math', '-fno-signaling-nans', '-fno-math-errno', '-fno-omit-frame-pointer', '-DMTS_DEBUG', '-DSINGLE_PRECISION', '-DSPECTRUM_SAMPLES=3', '-DMTS_SSE', '-DMTS_HAS_COHERENT_RT', '-fopenmp', '-fvisibility=hidden', '-mtls-dialect=gnu2'] LINKFLAGS = [] SHLINKFLAGS = ['-rdynamic', '-shared', '-fPIC', '-lstdc++'] BASEINCLUDE = ['#include'] From 6e02e6223515048963b7a9763833d451a72eb887 Mon Sep 17 00:00:00 2001 From: Mathieu Lamarre Date: Thu, 22 Feb 2018 16:03:10 -0500 Subject: [PATCH 3/3] Pos. independent code always --- build/config-linux-gcc-debug.py | 2 +- build/config-linux-gcc.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build/config-linux-gcc-debug.py b/build/config-linux-gcc-debug.py index 5613b07c6..8e962ee71 100644 --- a/build/config-linux-gcc-debug.py +++ b/build/config-linux-gcc-debug.py @@ -4,7 +4,7 @@ DISTDIR = '#dist' CXX = 'g++' CC = 'gcc' -CXXFLAGS = ['-O0', '-Wall', '-std=c++11', '-g', '-pipe', '-march=nocona', '-msse2', '-ftree-vectorize', '-mfpmath=sse', '-funsafe-math-optimizations', '-fno-rounding-math', '-fno-signaling-nans', '-fno-math-errno', '-fno-omit-frame-pointer', '-DMTS_DEBUG', '-DSINGLE_PRECISION', '-DSPECTRUM_SAMPLES=3', '-DMTS_SSE', '-DMTS_HAS_COHERENT_RT', '-fopenmp', '-fvisibility=hidden', '-mtls-dialect=gnu2'] +CXXFLAGS = ['-O0', '-Wall', '-std=c++11', '-g', '-pipe', '-march=nocona', '-msse2', '-ftree-vectorize', '-mfpmath=sse', '-funsafe-math-optimizations', '-fno-rounding-math', '-fno-signaling-nans', '-fno-math-errno', '-fno-omit-frame-pointer', '-DMTS_DEBUG', '-DSINGLE_PRECISION', '-DSPECTRUM_SAMPLES=3', '-DMTS_SSE', '-DMTS_HAS_COHERENT_RT', '-fopenmp', '-fvisibility=hidden', '-mtls-dialect=gnu2','-fPIC'] LINKFLAGS = [] SHLINKFLAGS = ['-rdynamic', '-shared', '-fPIC', '-lstdc++'] BASEINCLUDE = ['#include'] diff --git a/build/config-linux-gcc.py b/build/config-linux-gcc.py index c33b33c32..c4b8fdbf5 100644 --- a/build/config-linux-gcc.py +++ b/build/config-linux-gcc.py @@ -4,7 +4,7 @@ DISTDIR = '#dist' CXX = 'g++' CC = 'gcc' -CXXFLAGS = ['-O3', '-Wall', '-std=c++11', '-g', '-pipe', '-march=nocona', '-msse2', '-ftree-vectorize', '-mfpmath=sse', '-funsafe-math-optimizations', '-fno-rounding-math', '-fno-signaling-nans', '-fno-math-errno', '-fomit-frame-pointer', '-DMTS_DEBUG', '-DSINGLE_PRECISION', '-DSPECTRUM_SAMPLES=3', '-DMTS_SSE', '-DMTS_HAS_COHERENT_RT', '-fopenmp', '-fvisibility=hidden', '-mtls-dialect=gnu2'] +CXXFLAGS = ['-O3', '-Wall', '-std=c++11', '-g', '-pipe', '-march=nocona', '-msse2', '-ftree-vectorize', '-mfpmath=sse', '-funsafe-math-optimizations', '-fno-rounding-math', '-fno-signaling-nans', '-fno-math-errno', '-fomit-frame-pointer', '-DMTS_DEBUG', '-DSINGLE_PRECISION', '-DSPECTRUM_SAMPLES=3', '-DMTS_SSE', '-DMTS_HAS_COHERENT_RT', '-fopenmp', '-fvisibility=hidden', '-mtls-dialect=gnu2','-fPIC'] LINKFLAGS = [] SHLINKFLAGS = ['-rdynamic', '-shared', '-fPIC', '-lstdc++'] BASEINCLUDE = ['#include']