summaryrefslogtreecommitdiff
path: root/src/third_party/unwind
diff options
context:
space:
mode:
authorBilly Donahue <billy.donahue@mongodb.com>2019-07-24 13:57:34 -0400
committerBilly Donahue <billy.donahue@mongodb.com>2019-07-24 16:22:21 -0400
commit59790d4626c193613db34c34338c424a636b8cad (patch)
tree0ab1829e47a7d873eaadf3944afb4cc9ffab66da /src/third_party/unwind
parentf50faf0265a66ee7811d01701ce1c9fb91bdce90 (diff)
downloadmongo-59790d4626c193613db34c34338c424a636b8cad.tar.gz
SERVER-42361 libunwind: --disable-cxx-exceptions
Diffstat (limited to 'src/third_party/unwind')
-rw-r--r--src/third_party/unwind/SConscript28
-rwxr-xr-xsrc/third_party/unwind/scripts/host_config.sh5
2 files changed, 10 insertions, 23 deletions
diff --git a/src/third_party/unwind/SConscript b/src/third_party/unwind/SConscript
index 60e608958c4..6d4ffdf9e57 100644
--- a/src/third_party/unwind/SConscript
+++ b/src/third_party/unwind/SConscript
@@ -17,6 +17,14 @@ unwind_root = env.Dir(".").srcnode()
unwind_platform = unwind_root.Dir("platform/${TARGET_OS}_${TARGET_ARCH}")
unwind_src_dir = env.Dir("dist/src")
+# Generated by a manual process:
+# - Run "scripts/host_config.sh |tee host_config.out".
+# - Gather .o dependencies of the libunwind.a target.
+# - Some .o are from prereq libraries, they have .lax paths.
+# Replace the `*.lax/$PREREQ/*.o` dependencies with the
+# corresponding .o from that $PREREQ library.
+# - Replace each .o with the source file (.c or .S) that generated it.
+# - Ensure the the ${CC} arguments are preserved by SCons.
unwind_sources = [
'mi/backtrace.c',
'mi/dyn-cancel.c',
@@ -38,28 +46,8 @@ unwind_sources = [
'mi/Lset_fpreg.c',
'mi/Lset_reg.c',
'mi/mempool.c',
- 'mi/_ReadSLEB.c',
- 'mi/_ReadULEB.c',
'mi/strerror.c',
'os-linux.c',
- 'unwind/Backtrace.c',
- 'unwind/DeleteException.c',
- 'unwind/FindEnclosingFunction.c',
- 'unwind/ForcedUnwind.c',
- 'unwind/GetBSP.c',
- 'unwind/GetCFA.c',
- 'unwind/GetDataRelBase.c',
- 'unwind/GetGR.c',
- 'unwind/GetIP.c',
- 'unwind/GetIPInfo.c',
- 'unwind/GetLanguageSpecificData.c',
- 'unwind/GetRegionStart.c',
- 'unwind/GetTextRelBase.c',
- 'unwind/RaiseException.c',
- 'unwind/Resume.c',
- 'unwind/Resume_or_Rethrow.c',
- 'unwind/SetGR.c',
- 'unwind/SetIP.c',
#
# x86_64
'x86_64/is_fpreg.c',
diff --git a/src/third_party/unwind/scripts/host_config.sh b/src/third_party/unwind/scripts/host_config.sh
index 215c77892f7..086952f1573 100755
--- a/src/third_party/unwind/scripts/host_config.sh
+++ b/src/third_party/unwind/scripts/host_config.sh
@@ -27,8 +27,7 @@ pushd $HOST_DIR/build
# documentation : won't need them
# tests : won't need them
# dependency-tracking : (from automake) disabled because we only do one build
-# force enable:
-# cxx-exceptions : configure.ac: "C++ exception handling doesn't work too well on x86"
+# cxx-exceptions : intrusive exception handling runtime
$SRC_DIR/configure \
--disable-coredump \
--disable-dependency-tracking \
@@ -38,7 +37,7 @@ $SRC_DIR/configure \
--disable-setjmp \
--disable-shared \
--disable-tests \
- --enable-cxx-exceptions \
+ --disable-cxx-exceptions \
--prefix=$HOST_DIR/install \
CC=$TOOLCHAIN_ROOT/bin/gcc \
CXX=$TOOLCHAIN_ROOT/bin/g++