Skip to content

Commit 1b94ec2

Browse files
committed
merge with master
2 parents 144c410 + 7384ff0 commit 1b94ec2

File tree

2 files changed

+16
-12
lines changed

2 files changed

+16
-12
lines changed

boost.sh

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -666,15 +666,15 @@ buildBoost_macOS()
666666
mkdir -p "$MACOS_OUTPUT_DIR"
667667

668668
echo building Boost for macOS
669-
./b2 $THREADS --build-dir=macos-build --stagedir=macos-build/stage toolset=clang \
670-
--prefix="$MACOS_OUTPUT_DIR/prefix" \
669+
./b2 $THREADS --build-dir=macos-build --stagedir=macos-build/stage --prefix="$MACOS_OUTPUT_DIR/prefix" \
670+
toolset=darwin-${MACOS_SDK_VERSION} architecture=x86 \
671671
cxxflags="${CXX_FLAGS} ${MACOS_ARCH_FLAGS} ${EXTRA_MACOS_SDK_FLAGS}" \
672672
linkflags="-stdlib=libc++ ${EXTRA_MACOS_SDK_FLAGS}" link=static threading=multi \
673673
macosx-version=${MACOS_SDK_VERSION} stage >> "${MACOS_OUTPUT_DIR}/macos-build.log" 2>&1
674674
if [ $? != 0 ]; then echo "Error staging macOS. Check log."; exit 1; fi
675675

676-
./b2 $THREADS --build-dir=macos-build --stagedir=macos-build/stage \
677-
--prefix="$MACOS_OUTPUT_DIR/prefix" toolset=clang \
676+
./b2 $THREADS --build-dir=macos-build --stagedir=macos-build/stage --prefix="$MACOS_OUTPUT_DIR/prefix" \
677+
toolset=darwin-${MACOS_SDK_VERSION} architecture=x86 \
678678
cxxflags="${CXX_FLAGS} ${MACOS_ARCH_FLAGS} ${EXTRA_MACOS_SDK_FLAGS}" \
679679
linkflags="-stdlib=libc++ ${EXTRA_MACOS_SDK_FLAGS}" link=static threading=multi \
680680
macosx-version=${MACOS_SDK_VERSION} install >> "${MACOS_OUTPUT_DIR}/macos-build.log" 2>&1
@@ -1033,19 +1033,22 @@ if [[ -z $BUILD_IOS && -z $BUILD_TVOS && -z $BUILD_MACOS ]]; then
10331033
BUILD_MACOS=1
10341034
fi
10351035

1036-
# The EXTRA_FLAGS definition works around a thread race issue in
1036+
# Must set these after parseArgs to fill in overriden values
1037+
EXTRA_FLAGS="-fembed-bitcode -Wno-unused-local-typedef -Wno-nullability-completeness"
1038+
1039+
# The EXTRA_ARM_FLAGS definition works around a thread race issue in
10371040
# shared_ptr. I encountered this historically and have not verified that
10381041
# the fix is no longer required. Without using the posix thread primitives
10391042
# an invalid compare-and-swap ARM instruction (non-thread-safe) was used for the
10401043
# shared_ptr use count causing nasty and subtle bugs.
10411044
#
1042-
# Should perhaps also consider/use instead: -BOOST_SP_USE_PTHREADS
1045+
# Note these flags (BOOST_AC_USE_PTHREADS and BOOST_SP_USE_PTHREADS) should
1046+
# only be defined for arm targets. They will cause random (but repeatable)
1047+
# shared_ptr crashes on macOS in boost thread destructors.
1048+
EXTRA_ARM_FLAGS="-DBOOST_AC_USE_PTHREADS -DBOOST_SP_USE_PTHREADS -g -DNDEBUG"
10431049

1044-
# Must set these after parseArgs to fill in overriden values
1045-
EXTRA_FLAGS="-DBOOST_AC_USE_PTHREADS -DBOOST_SP_USE_PTHREADS -g -DNDEBUG"`
1046-
`" -Wno-unused-local-typedef -fembed-bitcode -Wno-nullability-completeness"
1047-
EXTRA_IOS_FLAGS="$EXTRA_FLAGS -mios-version-min=$MIN_IOS_VERSION"
1048-
EXTRA_TVOS_FLAGS="$EXTRA_FLAGS -mtvos-version-min=$MIN_TVOS_VERSION"
1050+
EXTRA_IOS_FLAGS="$EXTRA_FLAGS $EXTRA_ARM_FLAGS -mios-version-min=$MIN_IOS_VERSION"
1051+
EXTRA_TVOS_FLAGS="$EXTRA_FLAGS $EXTRA_ARM_FLAGS -mtvos-version-min=$MIN_TVOS_VERSION"
10491052
EXTRA_MACOS_FLAGS="$EXTRA_FLAGS -mmacosx-version-min=$MIN_MACOS_VERSION"
10501053
EXTRA_MACOS_SDK_FLAGS="-isysroot ${MACOS_SDK_PATH} -mmacosx-version-min=${MIN_MACOS_VERSION}"
10511054

changelog

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
21
-- 2018-09-20 --
32
* Added support for building 32/64-bit macOS universal
3+
* Fixed macOS target problem that caused user-config.jam to be ignored
4+
* Fixed macOS specific share_ptr crasher caused by using -DBOOST_AC_USE_PTHREADS -DBOOST_SP_USE_PTHREADS
45

56
-- 2018-08-24 --
67
* Fixed incorrect ordering of params for tar command

0 commit comments

Comments
 (0)