Created
February 26, 2017 00:46
-
-
Save tonytheodore/3c1783b7adf390e8cf970a692f7ddc80 to your computer and use it in GitHub Desktop.
boost-1.63
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/boost-1-fixes.patch b/src/boost-1-fixes.patch | |
deleted file mode 100644 | |
index 8d72234..0000000 | |
--- a/src/boost-1-fixes.patch | |
+++ /dev/null | |
@@ -1,54 +0,0 @@ | |
-This file is part of MXE. See LICENSE.md for licensing information. | |
- | |
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | |
-From: xantares <xantares09@hotmail.com> | |
-Date: Mon, 28 Sep 2015 08:21:42 +0000 | |
-Subject: [PATCH] Fix {make,jump}_fcontext visibility with mingw | |
- | |
-taken from: https://github.com/boostorg/context/pull/22 | |
- | |
-diff --git a/libs/context/src/asm/jump_i386_ms_pe_gas.asm b/src/asm/jump_i386_ms_pe_gas.asm | |
-index 1111111..2222222 100644 | |
---- a/libs/context/src/asm/jump_i386_ms_pe_gas.asm | |
-+++ b/libs/context/src/asm/jump_i386_ms_pe_gas.asm | |
-@@ -138,3 +138,6 @@ _jump_fcontext: | |
- | |
- /* indirect jump to context */ | |
- jmp *%edx | |
-+ | |
-+.section .drectve | |
-+.ascii " -export:\"jump_fcontext\"" | |
-diff --git a/libs/context/src/asm/jump_x86_64_ms_pe_gas.asm b/src/asm/jump_x86_64_ms_pe_gas.asm | |
-index 1111111..2222222 100644 | |
---- a/libs/context/src/asm/jump_x86_64_ms_pe_gas.asm | |
-+++ b/libs/context/src/asm/jump_x86_64_ms_pe_gas.asm | |
-@@ -223,3 +223,6 @@ jump_fcontext: | |
- /* indirect jump to context */ | |
- jmp *%r10 | |
- .seh_endproc | |
-+ | |
-+.section .drectve | |
-+.ascii " -export:\"jump_fcontext\"" | |
-diff --git a/libs/context/src/asm/make_i386_ms_pe_gas.asm b/src/asm/make_i386_ms_pe_gas.asm | |
-index 1111111..2222222 100644 | |
---- a/libs/context/src/asm/make_i386_ms_pe_gas.asm | |
-+++ b/libs/context/src/asm/make_i386_ms_pe_gas.asm | |
-@@ -122,3 +122,6 @@ finish: | |
- hlt | |
- | |
- .def __exit; .scl 2; .type 32; .endef /* standard C library function */ | |
-+ | |
-+.section .drectve | |
-+.ascii " -export:\"make_fcontext\"" | |
-diff --git a/libs/context/src/asm/make_x86_64_ms_pe_gas.asm b/src/asm/make_x86_64_ms_pe_gas.asm | |
-index 1111111..2222222 100644 | |
---- a/libs/context/src/asm/make_x86_64_ms_pe_gas.asm | |
-+++ b/libs/context/src/asm/make_x86_64_ms_pe_gas.asm | |
-@@ -149,3 +149,6 @@ finish: | |
- .seh_endproc | |
- | |
- .def _exit; .scl 2; .type 32; .endef /* standard C library function */ | |
-+ | |
-+.section .drectve | |
-+.ascii " -export:\"make_fcontext\"" | |
- | |
diff --git a/src/boost-test.cmake b/src/boost-test.cmake | |
index 12ec9cf..c9e9726 100644 | |
--- a/src/boost-test.cmake | |
+++ b/src/boost-test.cmake | |
@@ -5,6 +5,8 @@ | |
set(TGT test-${PKG}-cmake) | |
enable_language(CXX) | |
+set(CMAKE_CXX_STANDARD 11) | |
+set(CMAKE_CXX_STANDARD_REQUIRED ON) | |
add_executable(${TGT} ${CMAKE_CURRENT_LIST_DIR}/${PKG}-test.cpp) | |
find_package(Boost ${PKG_VERSION} EXACT COMPONENTS chrono context serialization system thread REQUIRED) | |
diff --git a/src/boost-test.cpp b/src/boost-test.cpp | |
index 4dac283..ebf5554 100644 | |
--- a/src/boost-test.cpp | |
+++ b/src/boost-test.cpp | |
@@ -9,9 +9,8 @@ | |
boost::thread_specific_ptr<int> ptr; | |
-// http://www.boost.org/doc/libs/1_60_0/libs/context/doc/html/context/context.html | |
+// http://www.boost.org/doc/libs/1_63_0/libs/context/doc/html/context/ecv2.html | |
#include <boost/context/all.hpp> | |
-boost::context::fcontext_t fcm,fc1,fc2; | |
void test_thread() | |
{ | |
@@ -21,23 +20,6 @@ void test_thread() | |
std::cout << "Hello, World! from thread" << std::endl; | |
} | |
-void f1(intptr_t) | |
-{ | |
- std::cout<<"f1: entered"<<std::endl; | |
- std::cout<<"f1: call jump_fcontext( & fc1, fc2, 0)"<< std::endl; | |
- boost::context::jump_fcontext(&fc1,fc2,0); | |
- std::cout<<"f1: return"<<std::endl; | |
- boost::context::jump_fcontext(&fc1,fcm,0); | |
-} | |
- | |
-void f2(intptr_t) | |
-{ | |
- std::cout<<"f2: entered"<<std::endl; | |
- std::cout<<"f2: call jump_fcontext( & fc2, fc1, 0)"<<std::endl; | |
- boost::context::jump_fcontext(&fc2,fc1,0); | |
- BOOST_ASSERT(false&&!"f2: never returns"); | |
-} | |
- | |
int main(int argc, char *argv[]) | |
{ | |
(void)argc; | |
@@ -50,15 +32,16 @@ int main(int argc, char *argv[]) | |
boost::thread thrd(test_thread); | |
thrd.join(); | |
- std::size_t size(8192); | |
- void* sp1(std::malloc(size)); | |
- void* sp2(std::malloc(size)); | |
- | |
- fc1=boost::context::make_fcontext(sp1,size,f1); | |
- fc2=boost::context::make_fcontext(sp2,size,f2); | |
- | |
- std::cout<<"main: call jump_fcontext( & fcm, fc1, 0)"<<std::endl; | |
- boost::context::jump_fcontext(&fcm,fc1,0); | |
+#ifdef __GCC_HAVE_DWARF2_CFI_ASM | |
+ boost::context::execution_context<int,int> ctx1([](boost::context::execution_context<int,int> && ctx2,int i,int j){ | |
+ std::printf("inside ctx1,i==%d,j==%d\n",i,j); | |
+ std::tie(ctx2,i,j)=ctx2(i+j,i-j); | |
+ return std::move(ctx2); | |
+ }); | |
+ int i=2,j=1; | |
+ std::tie(ctx1,i,j)=ctx1(i,j); | |
+ std::printf("i==%d,j==%d\n",i,j); | |
+#endif | |
return 0; | |
} | |
diff --git a/src/boost.mk b/src/boost.mk | |
index cc9fdbc..a883e65 100644 | |
--- a/src/boost.mk | |
+++ b/src/boost.mk | |
@@ -4,8 +4,8 @@ PKG := boost | |
$(PKG)_WEBSITE := http://www.boost.org/ | |
$(PKG)_DESCR := Boost C++ Library | |
$(PKG)_IGNORE := | |
-$(PKG)_VERSION := 1.60.0 | |
-$(PKG)_CHECKSUM := 686affff989ac2488f79a97b9479efb9f2abae035b5ed4d8226de6857933fd3b | |
+$(PKG)_VERSION := 1.63.0 | |
+$(PKG)_CHECKSUM := beae2529f759f6b3bf3f4969a19c2e9d6f0c503edcb2de4a61d1428519fcb3b0 | |
$(PKG)_SUBDIR := boost_$(subst .,_,$($(PKG)_VERSION)) | |
$(PKG)_FILE := boost_$(subst .,_,$($(PKG)_VERSION)).tar.bz2 | |
$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/boost/boost/$($(PKG)_VERSION)/$($(PKG)_FILE) | |
@@ -67,7 +67,7 @@ define $(PKG)_BUILD | |
echo 'set(Boost_THREADAPI "win32")' > '$(CMAKE_TOOLCHAIN_DIR)/$(PKG).cmake' | |
'$(TARGET)-g++' \ | |
- -W -Wall -Werror -ansi -U__STRICT_ANSI__ -pedantic \ | |
+ -W -Wall -Werror -std=c++11 \ | |
'$(PWD)/src/$(PKG)-test.cpp' -o '$(PREFIX)/$(TARGET)/bin/test-boost.exe' \ | |
-DBOOST_THREAD_USE_LIB \ | |
-lboost_serialization-mt \ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment