From 8e16361249ffdc575261148966be5b9b5a97f657 Mon Sep 17 00:00:00 2001 From: John Gress Date: Fri, 29 Dec 2017 14:22:31 -0700 Subject: [PATCH 1/2] Build with /usr/local/gcc --- packaging/DeathKnell.spec | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/packaging/DeathKnell.spec b/packaging/DeathKnell.spec index e37c666..095a511 100644 --- a/packaging/DeathKnell.spec +++ b/packaging/DeathKnell.spec @@ -23,7 +23,7 @@ fi %build # SKIP_BUILD_RPATH, CMAKE_SKIP_BUILD_RPATH, cd %{name}/ -PATH=/usr/local/probe/bin:$PATH +PATH=/usr/local/gcc/bin:/usr/local/probe/bin:$PATH rm -f CMakeCache.txt cd 3rdparty unzip -u gtest-1.7.0.zip @@ -31,9 +31,13 @@ cd .. if [ "%{buildtype}" == "-DUSE_LR_DEBUG=OFF" ]; then - /usr/local/probe/bin/cmake -DVERSION:STRING=%{version}.%{buildnumber} -DCMAKE_CXX_COMPILER_ARG1:STRING=' -std=c++14 -Wall -fPIC -Ofast -m64 -Wl,-rpath -Wl,. -Wl,-rpath -Wl,/usr/local/probe/lib -Wl,-rpath -Wl,/usr/local/probe/lib64 ' -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_SHARED_LIBS:BOOL=ON -DCMAKE_CXX_COMPILER=/usr/local/probe/bin/g++ + /usr/local/probe/bin/cmake -DVERSION:STRING=%{version}.%{buildnumber} \ + -DCMAKE_CXX_COMPILER_ARG1:STRING=' -std=c++14 -Wall -fPIC -Ofast -m64 -I/usr/local/gcc/include -I/usr/local/probe/include -Wl,-rpath -Wl,. -Wl,-rpath -Wl,/usr/local/probe/lib -Wl,-rpath -Wl,/usr/local/gcc/lib64 ' \ + -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_SHARED_LIBS:BOOL=ON -DCMAKE_CXX_COMPILER=/usr/local/gcc/bin/g++ elif [ "%{buildtype}" == "-DUSE_LR_DEBUG=ON" ]; then - /usr/local/probe/bin/cmake -DUSE_LR_DEBUG=ON -DVERSION:STRING=%{version}.%{buildnumber} -DCMAKE_CXX_COMPILER_ARG1:STRING=' -std=c++14 -Wall -Werror -g -gdwarf-2 -O0 -fPIC -m64 -Wl,-rpath -Wl,. -Wl,-rpath -Wl,/usr/local/probe/lib -Wl,-rpath -Wl,/usr/local/probe/lib64 ' -DCMAKE_CXX_COMPILER=/usr/local/probe/bin/g++ + /usr/local/probe/bin/cmake -DUSE_LR_DEBUG=ON -DVERSION:STRING=%{version}.%{buildnumber} \ + -DCMAKE_CXX_COMPILER_ARG1:STRING=' -std=c++14 -Wall -Werror -g -gdwarf-2 -O0 -fPIC -m64 -I/usr/local/gcc/include -I/usr/local/probe/include -Wl,-rpath -Wl,. -Wl,-rpath -Wl,/usr/local/probe/lib -Wl,-rpath -Wl,/usr/local/gcc/lib64 ' \ + -DCMAKE_CXX_COMPILER=/usr/local/gcc/bin/g++ else echo "Unknown buildtype:" "%{buildtype}" exit 1 From eb522cdb43c7a7f71b537de756e2691d8e2821ad Mon Sep 17 00:00:00 2001 From: John Gress Date: Wed, 10 Jan 2018 16:32:22 -0700 Subject: [PATCH 2/2] Use isystem include directive. --- packaging/DeathKnell.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packaging/DeathKnell.spec b/packaging/DeathKnell.spec index 095a511..96df0fb 100644 --- a/packaging/DeathKnell.spec +++ b/packaging/DeathKnell.spec @@ -32,11 +32,11 @@ cd .. if [ "%{buildtype}" == "-DUSE_LR_DEBUG=OFF" ]; then /usr/local/probe/bin/cmake -DVERSION:STRING=%{version}.%{buildnumber} \ - -DCMAKE_CXX_COMPILER_ARG1:STRING=' -std=c++14 -Wall -fPIC -Ofast -m64 -I/usr/local/gcc/include -I/usr/local/probe/include -Wl,-rpath -Wl,. -Wl,-rpath -Wl,/usr/local/probe/lib -Wl,-rpath -Wl,/usr/local/gcc/lib64 ' \ + -DCMAKE_CXX_COMPILER_ARG1:STRING=' -std=c++14 -Wall -fPIC -Ofast -m64 -isystem/usr/local/gcc/include -isystem/usr/local/probe/include -Wl,-rpath -Wl,. -Wl,-rpath -Wl,/usr/local/probe/lib -Wl,-rpath -Wl,/usr/local/gcc/lib64 ' \ -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_SHARED_LIBS:BOOL=ON -DCMAKE_CXX_COMPILER=/usr/local/gcc/bin/g++ elif [ "%{buildtype}" == "-DUSE_LR_DEBUG=ON" ]; then /usr/local/probe/bin/cmake -DUSE_LR_DEBUG=ON -DVERSION:STRING=%{version}.%{buildnumber} \ - -DCMAKE_CXX_COMPILER_ARG1:STRING=' -std=c++14 -Wall -Werror -g -gdwarf-2 -O0 -fPIC -m64 -I/usr/local/gcc/include -I/usr/local/probe/include -Wl,-rpath -Wl,. -Wl,-rpath -Wl,/usr/local/probe/lib -Wl,-rpath -Wl,/usr/local/gcc/lib64 ' \ + -DCMAKE_CXX_COMPILER_ARG1:STRING=' -std=c++14 -Wall -Werror -g -gdwarf-2 -O0 -fPIC -m64 -isystem/usr/local/gcc/include -isystem/usr/local/probe/include -Wl,-rpath -Wl,. -Wl,-rpath -Wl,/usr/local/probe/lib -Wl,-rpath -Wl,/usr/local/gcc/lib64 ' \ -DCMAKE_CXX_COMPILER=/usr/local/gcc/bin/g++ else echo "Unknown buildtype:" "%{buildtype}"