From 25c505a6185c1045257ef8c746ea6de97805b45a Mon Sep 17 00:00:00 2001 From: alex Date: Sun, 8 Sep 2013 19:25:48 +0400 Subject: [PATCH] Add OpenMP linking flag --- novacoin-qt.pro | 6 ++++-- src/makefile.bsd | 2 +- src/makefile.linux-mingw | 2 +- src/makefile.mingw | 2 +- src/makefile.osx | 2 +- src/makefile.unix | 2 +- 6 files changed, 9 insertions(+), 7 deletions(-) diff --git a/novacoin-qt.pro b/novacoin-qt.pro index e4c1371..663f808 100644 --- a/novacoin-qt.pro +++ b/novacoin-qt.pro @@ -31,6 +31,8 @@ contains(RELEASE, 1) { } } +QMAKE_LFLAGS *= -fopenmp + !win32 { # for extra security against potential buffer overflows: enable GCCs Stack Smashing Protection QMAKE_CXXFLAGS *= -fstack-protector-all --param ssp-buffer-size=1 @@ -138,9 +140,9 @@ contains(USE_O3, 1) { QMAKE_CFLAGS += -O3 } -QMAKE_CXXFLAGS += -msse2 +QMAKE_CXXFLAGS += -msse2 -fopenmp QMAKE_CFLAGS += -msse2 -QMAKE_CXXFLAGS_WARN_ON = -fdiagnostics-show-option -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -Wstack-protector +QMAKE_CXXFLAGS_WARN_ON = -fdiagnostics-show-option -Wall -Wextra -Wno-ignored-qualifiers -Wformat -Wformat-security -Wno-unused-parameter -Wstack-protector # Input DEPENDPATH += src src/json src/qt diff --git a/src/makefile.bsd b/src/makefile.bsd index 31e74de..8ab520e 100644 --- a/src/makefile.bsd +++ b/src/makefile.bsd @@ -95,7 +95,7 @@ DEBUGFLAGS=-g # CXXFLAGS can be specified on the make command line, so we use xCXXFLAGS that only # adds some defaults in front. Unfortunately, CXXFLAGS=... $(CXXFLAGS) does not work. -xCXXFLAGS=-O0 -msse2 -pthread -Wall -Wextra -Wno-ignored-qualifiers -Wformat -Wformat-security -Wno-unused-parameter \ +xCXXFLAGS=-O0 -msse2 -pthread -fopenmp -Wall -Wextra -Wno-ignored-qualifiers -Wformat -Wformat-security -Wno-unused-parameter \ $(DEBUGFLAGS) $(DEFS) $(HARDENING) $(CXXFLAGS) # LDFLAGS can be specified on the make command line, so we use xLDFLAGS that only diff --git a/src/makefile.linux-mingw b/src/makefile.linux-mingw index 2a3f815..6ff42d6 100644 --- a/src/makefile.linux-mingw +++ b/src/makefile.linux-mingw @@ -40,7 +40,7 @@ LIBS= \ DEFS=-D_MT -DWIN32 -D_WINDOWS -DBOOST_THREAD_USE_LIB -DBOOST_SPIRIT_THREADSAFE DEBUGFLAGS=-g -CFLAGS=-O2 -msse2 -w -Wall -Wextra -Wno-ignored-qualifiers -Wformat -Wformat-security -Wno-unused-parameter $(DEBUGFLAGS) $(DEFS) $(INCLUDEPATHS) +CFLAGS=-O3 -msse2 -fopenmp -w -Wall -Wextra -Wno-ignored-qualifiers -Wformat -Wformat-security -Wno-unused-parameter $(DEBUGFLAGS) $(DEFS) $(INCLUDEPATHS) LDFLAGS=-Wl,--dynamicbase -Wl,--nxcompat -static-libgcc -static-libstdc++ TESTDEFS = -DTEST_DATA_DIR=$(abspath test/data) diff --git a/src/makefile.mingw b/src/makefile.mingw index 583ec7b..80a6801 100644 --- a/src/makefile.mingw +++ b/src/makefile.mingw @@ -28,7 +28,7 @@ LIBS= \ DEFS=-DWIN32 -D_WINDOWS -DBOOST_THREAD_USE_LIB -DBOOST_SPIRIT_THREADSAFE DEBUGFLAGS=-g -CFLAGS=-mthreads -O2 -msse2 -w -Wall -Wextra -Wno-ignored-qualifiers -Wformat -Wformat-security -Wno-unused-parameter $(DEBUGFLAGS) $(DEFS) $(INCLUDEPATHS) +CFLAGS=-mthreads -fopenmp -O3 -msse2 -w -Wall -Wextra -Wno-ignored-qualifiers -Wformat -Wformat-security -Wno-unused-parameter $(DEBUGFLAGS) $(DEFS) $(INCLUDEPATHS) LDFLAGS=-Wl,--dynamicbase -Wl,--nxcompat TESTDEFS = -DTEST_DATA_DIR=$(abspath test/data) diff --git a/src/makefile.osx b/src/makefile.osx index a821ab9..a5fb4ac 100644 --- a/src/makefile.osx +++ b/src/makefile.osx @@ -67,7 +67,7 @@ CFLAGS = -g -msse2 endif # ppc doesn't work because we don't support big-endian -CFLAGS += -Wall -Wextra -Wformat -Wno-ignored-qualifiers -Wformat-security -Wno-unused-parameter \ +CFLAGS += -fopenmp -Wall -Wextra -Wformat -Wno-ignored-qualifiers -Wformat-security -Wno-unused-parameter \ $(DEBUGFLAGS) $(DEFS) $(INCLUDEPATHS) OBJS= \ diff --git a/src/makefile.unix b/src/makefile.unix index fdcc698..8aca367 100644 --- a/src/makefile.unix +++ b/src/makefile.unix @@ -94,7 +94,7 @@ DEBUGFLAGS=-g # CXXFLAGS can be specified on the make command line, so we use xCXXFLAGS that only # adds some defaults in front. Unfortunately, CXXFLAGS=... $(CXXFLAGS) does not work. -xCXXFLAGS=-O2 -msse2 -pthread -Wall -Wextra -Wno-ignored-qualifiers -Wformat -Wformat-security -Wno-unused-parameter \ +xCXXFLAGS=-O2 -msse2 -fopenmp -pthread -Wall -Wextra -Wno-ignored-qualifiers -Wformat -Wformat-security -Wno-unused-parameter \ $(DEBUGFLAGS) $(DEFS) $(HARDENING) $(CXXFLAGS) # LDFLAGS can be specified on the make command line, so we use xLDFLAGS that only -- 1.7.1