-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdisable_libstdcc_check.patch
More file actions
40 lines (38 loc) · 1.79 KB
/
Copy pathdisable_libstdcc_check.patch
File metadata and controls
40 lines (38 loc) · 1.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
diff -ru --text mongodb-master/SConstruct mongodb-master-new/SConstruct
--- mongodb-master/SConstruct 2019-11-28 01:55:55.000000000 +0000
+++ mongodb-master-new/SConstruct 2021-02-28 02:05:11.028993938 +0000
@@ -1958,36 +1958,6 @@
conf.Finish()
- # If we are using libstdc++, check to see if we are using a libstdc++ that is older than
- # our GCC minimum of 4.8.2. This is primarly to help people using clang on OS X but
- # forgetting to use --libc++ (or set the target OS X version high enough to get it as the
- # default). We would, ideally, check the __GLIBCXX__ version, but for various reasons this
- # is not workable. Instead, we switch on the fact that _GLIBCXX_PROFILE_UNORDERED wasn't
- # introduced until libstdc++ 4.8.2. Yes, this is a terrible hack.
- if usingLibStdCxx:
- def CheckModernLibStdCxx(context):
- test_body = """
- #define _GLIBCXX_PROFILE
- #include <unordered_map>
- #if !defined(_GLIBCXX_PROFILE_UNORDERED)
- #error libstdc++ older than 4.8.2
- #endif
- """
-
- context.Message('Checking for libstdc++ 4.8.2 or better... ')
- ret = context.TryCompile(textwrap.dedent(test_body), ".cpp")
- context.Result(ret)
- return ret
-
- conf = Configure(myenv, help=False, custom_tests = {
- 'CheckModernLibStdCxx' : CheckModernLibStdCxx,
- })
-
- if not conf.CheckModernLibStdCxx():
- myenv.ConfError("When using libstdc++, MongoDB requires libstdc++ 4.8.2 or newer")
-
- conf.Finish()
-
if has_option("use-glibcxx-debug"):
# If we are using a modern libstdc++ and this is a debug build and we control all C++
# dependencies, then turn on the debugging features in libstdc++.