[MacOSX] fixes a missing feature in boost and fixes static build with x86/i386 involved
(https://svn.boost.org/trac/boost/ticket/8266)
This commit is contained in:
parent
612e2ddb4a
commit
66e8017d74
|
@ -40,8 +40,9 @@ set( BOOST_ROOT "${PROJECT_SOURCE_DIR}/boost_root" )
|
||||||
# Space separated list which indicates the subset of boost libraries to compile.
|
# Space separated list which indicates the subset of boost libraries to compile.
|
||||||
# Chosen libraries are based on AVHTTP requirements, and possibly
|
# Chosen libraries are based on AVHTTP requirements, and possibly
|
||||||
# unit_test_framework for its own worth.
|
# unit_test_framework for its own worth.
|
||||||
|
# tool_manager.cpp -> coroutine -> context (_jump_fcontext)
|
||||||
set( BOOST_LIBS_BUILT
|
set( BOOST_LIBS_BUILT
|
||||||
#context
|
context
|
||||||
#coroutine
|
#coroutine
|
||||||
date_time
|
date_time
|
||||||
#exception
|
#exception
|
||||||
|
@ -55,7 +56,6 @@ set( BOOST_LIBS_BUILT
|
||||||
thread
|
thread
|
||||||
#unit_test_framework
|
#unit_test_framework
|
||||||
)
|
)
|
||||||
|
|
||||||
#-----</configure>---------------------------------------------------------------
|
#-----</configure>---------------------------------------------------------------
|
||||||
|
|
||||||
find_package( BZip2 REQUIRED )
|
find_package( BZip2 REQUIRED )
|
||||||
|
@ -104,14 +104,14 @@ if( MINGW )
|
||||||
foreach( lib ${boost_libs_list} )
|
foreach( lib ${boost_libs_list} )
|
||||||
set( b2_libs ${b2_libs} --with-${lib} )
|
set( b2_libs ${b2_libs} --with-${lib} )
|
||||||
endforeach()
|
endforeach()
|
||||||
unset( PIC_STUFF )
|
unset( BOOST_CFLAGS )
|
||||||
else()
|
else()
|
||||||
string( REGEX REPLACE "\\;" "," libs_csv "${boost_libs_list}" )
|
string( REGEX REPLACE "\\;" "," libs_csv "${boost_libs_list}" )
|
||||||
#message( STATUS "libs_csv:${libs_csv}" )
|
#message( STATUS "libs_csv:${libs_csv}" )
|
||||||
|
|
||||||
set( bootstrap ./bootstrap.sh --with-libraries=${libs_csv} )
|
set( bootstrap ./bootstrap.sh --with-libraries=${libs_csv} )
|
||||||
# pass to *both* C and C++ compilers
|
# pass to *both* C and C++ compilers
|
||||||
set( PIC_STUFF "cflags=${PIC_FLAG}" )
|
set( BOOST_CFLAGS "cflags=${PIC_FLAG}" )
|
||||||
set( BOOST_INCLUDE "${BOOST_ROOT}/include" )
|
set( BOOST_INCLUDE "${BOOST_ROOT}/include" )
|
||||||
unset( b2_libs )
|
unset( b2_libs )
|
||||||
endif()
|
endif()
|
||||||
|
@ -121,8 +121,8 @@ if( APPLE )
|
||||||
# I set this to being compatible with wxWidgets
|
# I set this to being compatible with wxWidgets
|
||||||
# wxWidgets still using libstdc++ (gcc), meanwhile OSX
|
# wxWidgets still using libstdc++ (gcc), meanwhile OSX
|
||||||
# has switched to libc++ (llvm) by default
|
# has switched to libc++ (llvm) by default
|
||||||
set(BOOST_CXXFLAGS "cxxflags=-mmacosx-version-min=10.5" )
|
set(BOOST_CXXFLAGS "cxxflags=-mmacosx-version-min=10.5 -fno-common -fno-lto" )
|
||||||
set(BOOST_LINKFLAGS "linkflags=-mmacosx-version-min=10.5" )
|
set(BOOST_LINKFLAGS "linkflags=-mmacosx-version-min=10.5 -fno-common -fno-lto" )
|
||||||
set(BOOST_TOOLSET "toolset=darwin" )
|
set(BOOST_TOOLSET "toolset=darwin" )
|
||||||
|
|
||||||
if( CMAKE_OSX_ARCHITECTURES )
|
if( CMAKE_OSX_ARCHITECTURES )
|
||||||
|
@ -141,6 +141,9 @@ if( APPLE )
|
||||||
set(BOOST_ARCHITECTURE "architecture=combined")
|
set(BOOST_ARCHITECTURE "architecture=combined")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
set(BOOST_CFLAGS "${BOOST_CFLAGS} -arch ${CMAKE_OSX_ARCHITECTURES}" )
|
||||||
|
set(BOOST_CXXFLAGS "${BOOST_CXXFLAGS} -arch ${CMAKE_OSX_ARCHITECTURES}" )
|
||||||
|
set(BOOST_LINKFLAGS "${BOOST_LINKFLAGS} -arch ${CMAKE_OSX_ARCHITECTURES}" )
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@ -159,6 +162,8 @@ ExternalProject_Add( boost
|
||||||
# PATCH_COMMAND continuation (any *_COMMAND here can be continued with COMMAND):
|
# PATCH_COMMAND continuation (any *_COMMAND here can be continued with COMMAND):
|
||||||
COMMAND bzr patch -p0 "${PROJECT_SOURCE_DIR}/patches/boost_minkowski.patch"
|
COMMAND bzr patch -p0 "${PROJECT_SOURCE_DIR}/patches/boost_minkowski.patch"
|
||||||
COMMAND bzr patch -p0 "${PROJECT_SOURCE_DIR}/patches/boost_cstdint.patch"
|
COMMAND bzr patch -p0 "${PROJECT_SOURCE_DIR}/patches/boost_cstdint.patch"
|
||||||
|
COMMAND bzr patch -p0 "${PROJECT_SOURCE_DIR}/patches/boost_macosx_x86.patch" #https://svn.boost.org/trac/boost/ticket/8266
|
||||||
|
COMMAND bzr patch -p0 "${PROJECT_SOURCE_DIR}/patches/boost_macosx_x86_build.patch" #https://svn.boost.org/trac/boost/ticket/8266
|
||||||
|
|
||||||
# [Mis-]use this step to erase all the boost headers and libraries before
|
# [Mis-]use this step to erase all the boost headers and libraries before
|
||||||
# replacing them below.
|
# replacing them below.
|
||||||
|
@ -170,7 +175,7 @@ ExternalProject_Add( boost
|
||||||
BUILD_COMMAND ./b2
|
BUILD_COMMAND ./b2
|
||||||
variant=release
|
variant=release
|
||||||
threading=multi
|
threading=multi
|
||||||
${PIC_STUFF}
|
${BOOST_CFLAGS}
|
||||||
${BOOST_TOOLSET}
|
${BOOST_TOOLSET}
|
||||||
${BOOST_CXXFLAGS}
|
${BOOST_CXXFLAGS}
|
||||||
${BOOST_LINKFLAGS}
|
${BOOST_LINKFLAGS}
|
||||||
|
@ -229,7 +234,7 @@ ExternalProject_Add_Step( boost bzr_commit_boost
|
||||||
|
|
||||||
ExternalProject_Add_Step( boost bzr_add_boost
|
ExternalProject_Add_Step( boost bzr_add_boost
|
||||||
# add only the headers to the scratch repo, repo = "../.bzr" from ${headers_src}
|
# add only the headers to the scratch repo, repo = "../.bzr" from ${headers_src}
|
||||||
COMMAND bzr add -q ${headers_src}
|
COMMAND bzr add -q ${PREFIX}/src/boost
|
||||||
COMMENT "adding pristine boost files to 'boost scratch repo'"
|
COMMENT "adding pristine boost files to 'boost scratch repo'"
|
||||||
DEPENDERS bzr_commit_boost
|
DEPENDERS bzr_commit_boost
|
||||||
)
|
)
|
||||||
|
|
|
@ -0,0 +1,72 @@
|
||||||
|
=== modified file 'libs/context/build/Jamfile.v2'
|
||||||
|
--- libs/context/build/Jamfile.v2 2013-12-29 11:28:14 +0000
|
||||||
|
+++ libs/context/build/Jamfile.v2 2013-12-29 11:31:05 +0000
|
||||||
|
@@ -414,6 +414,25 @@
|
||||||
|
;
|
||||||
|
|
||||||
|
alias asm_context_sources
|
||||||
|
+ : asm/make_i386_x86_64_sysv_macho_gas.S
|
||||||
|
+ asm/jump_i386_x86_64_sysv_macho_gas.S
|
||||||
|
+ : <address-model>32_64
|
||||||
|
+ <architecture>x86
|
||||||
|
+ <binary-format>mach-o
|
||||||
|
+ <target-os>darwin
|
||||||
|
+ <toolset>darwin
|
||||||
|
+ ;
|
||||||
|
+
|
||||||
|
+alias asm_context_sources
|
||||||
|
+ : [ make asm/make_i386_x86_64_sysv_macho_gas.o : asm/make_i386_x86_64_sysv_macho_gas.S : @gas ]
|
||||||
|
+ [ make asm/jump_i386_x86_64_sysv_macho_gas.o : asm/jump_i386_x86_64_sysv_macho_gas.S : @gas ]
|
||||||
|
+ : <address-model>32_64
|
||||||
|
+ <architecture>x86
|
||||||
|
+ <binary-format>mach-o
|
||||||
|
+ <target-os>darwin
|
||||||
|
+ ;
|
||||||
|
+
|
||||||
|
+alias asm_context_sources
|
||||||
|
: asm/make_x86_64_ms_pe_masm.asm
|
||||||
|
asm/jump_x86_64_ms_pe_masm.asm
|
||||||
|
dummy.cpp
|
||||||
|
|
||||||
|
=== added file 'libs/context/src/asm/jump_i386_x86_64_sysv_macho_gas.S'
|
||||||
|
--- libs/context/src/asm/jump_i386_x86_64_sysv_macho_gas.S 1970-01-01 00:00:00 +0000
|
||||||
|
+++ libs/context/src/asm/jump_i386_x86_64_sysv_macho_gas.S 2013-12-29 11:33:46 +0000
|
||||||
|
@@ -0,0 +1,16 @@
|
||||||
|
+/*
|
||||||
|
+ Copyright Sergue E. Leontiev 2013.
|
||||||
|
+ Distributed under the Boost Software License, Version 1.0.
|
||||||
|
+ (See accompanying file LICENSE_1_0.txt or copy at
|
||||||
|
+ http://www.boost.org/LICENSE_1_0.txt)
|
||||||
|
+*/
|
||||||
|
+
|
||||||
|
+// Stub file for universal binary
|
||||||
|
+
|
||||||
|
+#if defined(__i386__)
|
||||||
|
+ #include "jump_i386_sysv_macho_gas.S"
|
||||||
|
+#elif defined(__x86_64__)
|
||||||
|
+ #include "jump_x86_64_sysv_macho_gas.S"
|
||||||
|
+#else
|
||||||
|
+ #error "No arch's"
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
=== added file 'libs/context/src/asm/make_i386_x86_64_sysv_macho_gas.S'
|
||||||
|
--- libs/context/src/asm/make_i386_x86_64_sysv_macho_gas.S 1970-01-01 00:00:00 +0000
|
||||||
|
+++ libs/context/src/asm/make_i386_x86_64_sysv_macho_gas.S 2013-12-29 11:32:49 +0000
|
||||||
|
@@ -0,0 +1,16 @@
|
||||||
|
+/*
|
||||||
|
+ Copyright Sergue E. Leontiev 2013.
|
||||||
|
+ Distributed under the Boost Software License, Version 1.0.
|
||||||
|
+ (See accompanying file LICENSE_1_0.txt or copy at
|
||||||
|
+ http://www.boost.org/LICENSE_1_0.txt)
|
||||||
|
+*/
|
||||||
|
+
|
||||||
|
+// Stub file for universal binary
|
||||||
|
+
|
||||||
|
+#if defined(__i386__)
|
||||||
|
+ #include "make_i386_sysv_macho_gas.S"
|
||||||
|
+#elif defined(__x86_64__)
|
||||||
|
+ #include "make_x86_64_sysv_macho_gas.S"
|
||||||
|
+#else
|
||||||
|
+ #error "No arch's"
|
||||||
|
+#endif
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
=== modified file 'tools/build/v2/tools/gcc.jam'
|
||||||
|
--- tools/build/v2/tools/gcc.jam 2013-12-29 13:13:00 +0000
|
||||||
|
+++ tools/build/v2/tools/gcc.jam 2013-12-29 14:36:31 +0000
|
||||||
|
@@ -635,7 +635,7 @@
|
||||||
|
|
||||||
|
actions compile.asm
|
||||||
|
{
|
||||||
|
- "$(CONFIG_COMMAND)" $(LANG) $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)"
|
||||||
|
+ "$(CONFIG_COMMAND)" $(LANG) $(OPTIONS) -D$(DEFINES) $(USER_OPTIONS) -I"$(INCLUDES)" -c -o "$(<)" "$(>)"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Class checking that we do not try to use the <runtime-link>static property
|
||||||
|
|
Loading…
Reference in New Issue