summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBoris Nagaev <bnagaev@gmail.com>2017-02-11 00:41:46 (GMT)
committerGitHub <noreply@github.com>2017-02-11 00:41:46 (GMT)
commite6a1dcf4f532f41ba99b276b276d213781f83000 (patch)
tree5edeb68945c8fe330a2835579712d69774c2de84 /src
parent27facf1c6fcb7973781568dde9b0c1072e28f669 (diff)
parentbf6a78224b8d6a4958e2221d3ccc97056d87feeb (diff)
downloadmxe-e6a1dcf4f532f41ba99b276b276d213781f83000.zip
mxe-e6a1dcf4f532f41ba99b276b276d213781f83000.tar.gz
mxe-e6a1dcf4f532f41ba99b276b276d213781f83000.tar.bz2
Merge pull request #1664 from tonytheodore/gcc-eh
allow non-default exception handling targets
Diffstat (limited to 'src')
-rw-r--r--src/apr.mk17
-rw-r--r--src/gcc.mk4
-rw-r--r--src/libmysqlclient-1-fixes.patch20
3 files changed, 34 insertions, 7 deletions
diff --git a/src/apr.mk b/src/apr.mk
index d2d845b..08b9bf2 100644
--- a/src/apr.mk
+++ b/src/apr.mk
@@ -19,18 +19,23 @@ define $(PKG)_UPDATE
endef
define $(PKG)_BUILD
- cp -Rp '$(1)' '$(1).native'
- cd '$(1).native' && ./configure
- cd '$(1).native' && $(MAKE) tools/gen_test_char \
- CFLAGS='-DNEED_ENHANCED_ESCAPES'
- cd '$(1)' && ./configure \
+ # native build for gen_test_char
+ mkdir '$(BUILD_DIR).native'
+ cd '$(BUILD_DIR).native' && '$(SOURCE_DIR)/configure'
+ $(MAKE) -C '$(BUILD_DIR).native' tools/gen_test_char \
+ CFLAGS='-DNEED_ENHANCED_ESCAPES' -j '$(JOBS)'
+
+ # cross build
+ cd '$(BUILD_DIR)' && '$(SOURCE_DIR)/configure' \
$(MXE_CONFIGURE_OPTS) \
ac_cv_sizeof_off_t=4 \
ac_cv_sizeof_pid_t=4 \
ac_cv_sizeof_size_t=4 \
ac_cv_sizeof_ssize_t=4 \
+ $(if $(POSIX_THREADS),apr_cv_mutex_robust_shared=yes) \
CFLAGS=-D_WIN32_WINNT=0x0500
- $(MAKE) -C '$(1)' -j 1 install GEN_TEST_CHAR='$(1).native/tools/gen_test_char'
+ $(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' GEN_TEST_CHAR='$(BUILD_DIR).native/tools/gen_test_char'
+ $(MAKE) -C '$(BUILD_DIR)' -j 1 install
ln -sf '$(PREFIX)/$(TARGET)/bin/apr-1-config' '$(PREFIX)/bin/$(TARGET)-apr-1-config'
endef
diff --git a/src/gcc.mk b/src/gcc.mk
index 31e8d28..5186555 100644
--- a/src/gcc.mk
+++ b/src/gcc.mk
@@ -37,6 +37,7 @@ define $(PKG)_CONFIGURE
--without-x \
--disable-win32-registry \
--enable-threads=$(MXE_GCC_THREADS) \
+ $(MXE_GCC_EXCEPTION_OPTS) \
--enable-libgomp \
--with-gmp='$(PREFIX)/$(BUILD)' \
--with-isl='$(PREFIX)/$(BUILD)' \
@@ -45,7 +46,8 @@ define $(PKG)_CONFIGURE
--with-as='$(PREFIX)/bin/$(TARGET)-as' \
--with-ld='$(PREFIX)/bin/$(TARGET)-ld' \
--with-nm='$(PREFIX)/bin/$(TARGET)-nm' \
- $(shell [ `uname -s` == Darwin ] && echo "LDFLAGS='-Wl,-no_pie'")
+ $(shell [ `uname -s` == Darwin ] && echo "LDFLAGS='-Wl,-no_pie'") \
+ $($(PKG)_CONFIGURE_OPTS)
endef
define $(PKG)_BUILD_mingw-w64
diff --git a/src/libmysqlclient-1-fixes.patch b/src/libmysqlclient-1-fixes.patch
index 6b83ceb..121de67 100644
--- a/src/libmysqlclient-1-fixes.patch
+++ b/src/libmysqlclient-1-fixes.patch
@@ -450,3 +450,23 @@ index 1111111..2222222 100644
#include "mysys_priv.h"
#include <process.h>
#include <signal.h>
+
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Tony Theodore <tonyt@logyst.com>
+Date: Wed, 8 Feb 2017 11:51:42 +1100
+Subject: [PATCH] only define localtime_r and gmtime_r when pthreads isn't used
+
+
+diff --git a/include/my_global.h b/include/my_global.h
+index 1111111..2222222 100644
+--- a/include/my_global.h
++++ b/include/my_global.h
+@@ -629,7 +629,7 @@ enum loglevel {
+ };
+
+
+-#ifdef _WIN32
++#if defined(_WIN32) && !defined(_POSIX_THREAD_SAFE_FUNCTIONS)
+ /****************************************************************************
+ ** Replacements for localtime_r and gmtime_r
+ ****************************************************************************/