Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
66e8017d
Commit
66e8017d
authored
Dec 29, 2013
by
Marco Serantoni
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[MacOSX] fixes a missing feature in boost and fixes static build with x86/i386 involved
(
https://svn.boost.org/trac/boost/ticket/8266
)
parent
612e2ddb
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
98 additions
and
8 deletions
+98
-8
download_boost.cmake
CMakeModules/download_boost.cmake
+13
-8
boost_macosx_x86.patch
patches/boost_macosx_x86.patch
+72
-0
boost_macosx_x86_build.patch
patches/boost_macosx_x86_build.patch
+13
-0
No files found.
CMakeModules/download_boost.cmake
View file @
66e8017d
...
...
@@ -40,8 +40,9 @@ set( BOOST_ROOT "${PROJECT_SOURCE_DIR}/boost_root" )
# Space separated list which indicates the subset of boost libraries to compile.
# Chosen libraries are based on AVHTTP requirements, and possibly
# unit_test_framework for its own worth.
# tool_manager.cpp -> coroutine -> context (_jump_fcontext)
set
(
BOOST_LIBS_BUILT
#
context
context
#coroutine
date_time
#exception
...
...
@@ -55,7 +56,6 @@ set( BOOST_LIBS_BUILT
thread
#unit_test_framework
)
#-----</configure>---------------------------------------------------------------
find_package
(
BZip2 REQUIRED
)
...
...
@@ -104,14 +104,14 @@ if( MINGW )
foreach
(
lib
${
boost_libs_list
}
)
set
(
b2_libs
${
b2_libs
}
--with-
${
lib
}
)
endforeach
()
unset
(
PIC_STUFF
)
unset
(
BOOST_CFLAGS
)
else
()
string
(
REGEX REPLACE
"
\\
;"
","
libs_csv
"
${
boost_libs_list
}
"
)
#message( STATUS "libs_csv:${libs_csv}" )
set
(
bootstrap ./bootstrap.sh --with-libraries=
${
libs_csv
}
)
# 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"
)
unset
(
b2_libs
)
endif
()
...
...
@@ -121,8 +121,8 @@ if( APPLE )
# I set this to being compatible with wxWidgets
# wxWidgets still using libstdc++ (gcc), meanwhile OSX
# has switched to libc++ (llvm) by default
set
(
BOOST_CXXFLAGS
"cxxflags=-mmacosx-version-min=10.5
"
)
set
(
BOOST_LINKFLAGS
"linkflags=-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
-fno-common -fno-lto
"
)
set
(
BOOST_TOOLSET
"toolset=darwin"
)
if
(
CMAKE_OSX_ARCHITECTURES
)
...
...
@@ -141,6 +141,9 @@ if( APPLE )
set
(
BOOST_ARCHITECTURE
"architecture=combined"
)
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
()
...
...
@@ -159,6 +162,8 @@ ExternalProject_Add( boost
# 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_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
# replacing them below.
...
...
@@ -170,7 +175,7 @@ ExternalProject_Add( boost
BUILD_COMMAND ./b2
variant=release
threading=multi
${
PIC_STUFF
}
${
BOOST_CFLAGS
}
${
BOOST_TOOLSET
}
${
BOOST_CXXFLAGS
}
${
BOOST_LINKFLAGS
}
...
...
@@ -229,7 +234,7 @@ ExternalProject_Add_Step( boost bzr_commit_boost
ExternalProject_Add_Step
(
boost bzr_add_boost
# 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'"
DEPENDERS bzr_commit_boost
)
...
...
patches/boost_macosx_x86.patch
0 → 100644
View file @
66e8017d
=== 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
patches/boost_macosx_x86_build.patch
0 → 100644
View file @
66e8017d
=== 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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment