summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTony Theodore <tonyt@logyst.com>2016-05-07 04:43:18 (GMT)
committerTony Theodore <tonyt@logyst.com>2016-05-07 04:43:18 (GMT)
commita742eed04ae494419c9509d41ec0af0675b81229 (patch)
tree6d8dbcc8ec03b9c44ea00f99614ba5c12c43b444 /src
parentecc6e3fb44badee908985a8063d08fd0087bcb08 (diff)
parent78312ba6080d76119bc6f242b7a8fbafcb4ee6bb (diff)
downloadmxe-a742eed04ae494419c9509d41ec0af0675b81229.zip
mxe-a742eed04ae494419c9509d41ec0af0675b81229.tar.gz
mxe-a742eed04ae494419c9509d41ec0af0675b81229.tar.bz2
Merge pull request #1327 from tehnick/gcc6-related-fixes
Gcc6 related fixes
Diffstat (limited to 'src')
-rw-r--r--src/dcmtk-4-c++11-related-fixes.patch16
-rw-r--r--src/fdk-aac.mk3
-rw-r--r--src/flann-4-c++11-related-fixes.patch31
-rw-r--r--src/freeimage-1-fixes.patch20
-rw-r--r--src/qt3d-1.patch19
-rw-r--r--src/wxwidgets-1-c++11-related-fixes.patch27
6 files changed, 113 insertions, 3 deletions
diff --git a/src/dcmtk-4-c++11-related-fixes.patch b/src/dcmtk-4-c++11-related-fixes.patch
new file mode 100644
index 0000000..2e47dc4
--- /dev/null
+++ b/src/dcmtk-4-c++11-related-fixes.patch
@@ -0,0 +1,16 @@
+From: Boris Pek
+Date: Thu, 05 May 2016 15:38:47 +0300
+Subject: [PATCH] fix build with GCC >= 6.x
+
+diff --git a/ofstd/libsrc/ofstd.cc b/ofstd/libsrc/ofstd.cc
+--- a/ofstd/libsrc/ofstd.cc
++++ b/ofstd/libsrc/ofstd.cc
+@@ -175,7 +175,7 @@
+
+
+ // some systems don't properly define isnan()
+-#ifdef HAVE_ISNAN
++#if defined(HAVE_ISNAN) && (__cplusplus < 201103L)
+ #ifndef HAVE_PROTOTYPE_ISNAN
+ extern "C"
+ {
diff --git a/src/fdk-aac.mk b/src/fdk-aac.mk
index d9bf852..110f233 100644
--- a/src/fdk-aac.mk
+++ b/src/fdk-aac.mk
@@ -22,7 +22,8 @@ endef
define $(PKG)_BUILD
cd '$(1)' && ./configure \
- $(MXE_CONFIGURE_OPTS)
+ $(MXE_CONFIGURE_OPTS) \
+ CXXFLAGS='-Wno-narrowing'
$(MAKE) -C '$(1)' -j '$(JOBS)'
$(MAKE) -C '$(1)' -j 1 install
endef
diff --git a/src/flann-4-c++11-related-fixes.patch b/src/flann-4-c++11-related-fixes.patch
new file mode 100644
index 0000000..90be357
--- /dev/null
+++ b/src/flann-4-c++11-related-fixes.patch
@@ -0,0 +1,31 @@
+This file is part of MXE.
+See index.html for further information.
+
+Taken from: https://github.com/mariusmuja/flann/commit/3645f0c30a47267e56e5acdecfc7bac2b76bc3d5
+
+From 3645f0c30a47267e56e5acdecfc7bac2b76bc3d5 Mon Sep 17 00:00:00 2001
+From: Alastair Quadros <alastair.j.quadros@gmail.com>
+Date: Sun, 15 Mar 2015 10:58:57 +1100
+Subject: [PATCH] abs -> std::abs
+
+diff --git a/src/cpp/flann/algorithms/kdtree_index.h b/src/cpp/flann/algorithms/kdtree_index.h
+index 42659ca..fc12d8f 100644
+--- a/src/cpp/flann/algorithms/kdtree_index.h
++++ b/src/cpp/flann/algorithms/kdtree_index.h
+@@ -36,6 +36,7 @@
+ #include <cassert>
+ #include <cstring>
+ #include <stdarg.h>
++#include <cmath>
+
+ #include "flann/general.h"
+ #include "flann/algorithms/nn_index.h"
+@@ -663,7 +664,7 @@
+ ElementType max_span = 0;
+ size_t div_feat = 0;
+ for (size_t i=0;i<veclen_;++i) {
+- ElementType span = abs(point[i]-leaf_point[i]);
++ ElementType span = std::abs(point[i]-leaf_point[i]);
+ if (span > max_span) {
+ max_span = span;
+ div_feat = i;
diff --git a/src/freeimage-1-fixes.patch b/src/freeimage-1-fixes.patch
index ba6bdbc..39dcc61 100644
--- a/src/freeimage-1-fixes.patch
+++ b/src/freeimage-1-fixes.patch
@@ -76,3 +76,23 @@ index 1111111..2222222 100644
CXXFLAGS += $(INCLUDE)
ifeq ($(shell sh -c 'uname -m 2>/dev/null || echo not'),x86_64)
+
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Boris Pek <tehnick-8@mail.ru>
+Date: Wed, 04 May 2016 18:43:16 +0300
+Subject: [PATCH] fix build with GCC >= 6.x
+
+diff --git a/Makefile.mingw b/Makefile.mingw
+index 1111111..2222222 100644
+--- a/Makefile.mingw
++++ b/Makefile.mingw
+@@ -67,7 +67,7 @@ MODULES := $(MODULES:.cpp=.o)
+ RESOURCE = $(RCFILE:.rc=.coff)
+ CFLAGS ?= -O3 -fexceptions -DNDEBUG $(WIN32_CFLAGS)
+ CFLAGS += $(INCLUDE)
+-CXXFLAGS ?= -O3 -fexceptions -Wno-ctor-dtor-privacy -DNDEBUG $(WIN32_CXXFLAGS)
++CXXFLAGS ?= -O3 -fexceptions -Wno-ctor-dtor-privacy -Wno-narrowing -DNDEBUG $(WIN32_CXXFLAGS)
+ CXXFLAGS += $(INCLUDE)
+ RCFLAGS ?= -DNDEBUG
+ LDFLAGS ?= -s -shared -static -Wl,-soname,$(SOLIBNAME) $(WIN32_LDFLAGS)
+
diff --git a/src/qt3d-1.patch b/src/qt3d-1.patch
index bc704d5..3193f32 100644
--- a/src/qt3d-1.patch
+++ b/src/qt3d-1.patch
@@ -33,6 +33,21 @@ index cb5f1d1..8d2be9b 100644
CONFIG += dll
}
---
-1.8.4.5
+From: Boris Pek <tehnick-8@mail.ru>
+Date: Wed, 04 May 2016 11:41:04 +0300
+Subject: [PATCH] fix build with GCC >= 6.x
+
+diff --git a/3rdparty/assimp/code/DXFLoader.cpp b/3rdparty/assimp/code/DXFLoader.cpp
+index e372d60..2c1a13d 100644
+--- a/3rdparty/assimp/code/DXFLoader.cpp
++++ b/3rdparty/assimp/code/DXFLoader.cpp
+@@ -84,7 +84,7 @@
+
+ // ------------------------------------------------------------------------------------------------
+ // Constructor to be privately used by Importer
+-DXFImporter::DXFImporter() : buffer(0), groupCode(0), bRepeat(false), mDefaultLayer(false)
++DXFImporter::DXFImporter() : buffer(0), groupCode(0), bRepeat(false)
+ {
+ memset(cursor,0,sizeof(cursor));
+ }
diff --git a/src/wxwidgets-1-c++11-related-fixes.patch b/src/wxwidgets-1-c++11-related-fixes.patch
new file mode 100644
index 0000000..3205001
--- /dev/null
+++ b/src/wxwidgets-1-c++11-related-fixes.patch
@@ -0,0 +1,27 @@
+From: Boris Pek <tehnick-8@mail.ru>
+Date: Thu, 05 May 2016 19:11:19 +0300
+Subject: [PATCH] fix build with GCC >= 6.x
+
+diff --git a/src/stc/scintilla/src/Editor.cxx b/src/stc/scintilla/src/Editor.cxx
+--- a/src/stc/scintilla/src/Editor.cxx
++++ b/src/stc/scintilla/src/Editor.cxx
+@@ -10,6 +10,7 @@
+ #include <stdio.h>
+ #include <ctype.h>
+ #include <assert.h>
++#include <math.h>
+
+ #include <string>
+ #include <vector>
+@@ -5841,9 +5842,9 @@
+ }
+
+ static bool Close(Point pt1, Point pt2) {
+- if (abs(pt1.x - pt2.x) > 3)
++ if (fabs(pt1.x - pt2.x) > 3)
+ return false;
+- if (abs(pt1.y - pt2.y) > 3)
++ if (fabs(pt1.y - pt2.y) > 3)
+ return false;
+ return true;
+ }