aboutsummaryrefslogtreecommitdiff
path: root/deb_patches/build-with-libstdc++-7.patch
blob: 55d00367f1e06cdd37678f46fd97737af1098354 (plain)
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
diff --git a/build/moz.configure/toolchain.configure b/build/moz.configure/toolchain.configure
index ce42ab7..b07514f 100755
--- a/build/moz.configure/toolchain.configure
+++ b/build/moz.configure/toolchain.configure
@@ -1252,6 +1252,7 @@ try_compile(includes=['cstddef'],
                 '#  endif',
                 '#endif',
             ]),
+            flags=['--gcc-toolchain=/usr/lib/gcc-mozilla'],
             check_msg='for new enough STL headers from libstdc++',
             when=needs_libstdcxx_newness_check,
             onerror=die_on_old_libstdcxx)
@@ -1433,6 +1434,10 @@ set_config('_DEPEND_CFLAGS', depend_cflags(c_compiler))
 set_config('_HOST_DEPEND_CFLAGS', depend_cflags(host_c_compiler))
 
 
+add_old_configure_assignment('CFLAGS', ['--gcc-toolchain=/usr/lib/gcc-mozilla'])
+add_old_configure_assignment('CXXFLAGS', ['--gcc-toolchain=/usr/lib/gcc-mozilla'])
+
+
 @depends(c_compiler)
 def preprocess_option(compiler):
     # The uses of PREPROCESS_OPTION depend on the spacing for -o/-Fi.
@@ -2133,7 +2138,7 @@ def linker_ldflags(linker, macos_sdk):
             flags.append('-Wl,-syslibroot,%s' % macos_sdk)
         else:
             flags.append('-Wl,--sysroot=%s' % macos_sdk)
-
+    flags.append('-static-libstdc++')
     return flags
 
 
diff --git a/layout/style/test/moz.build b/layout/style/test/moz.build
index 5b77bd8..3b8f869 100644
--- a/layout/style/test/moz.build
+++ b/layout/style/test/moz.build
@@ -18,6 +18,7 @@ DIRS += ['gtest']
 HostSimplePrograms([
     'host_ListCSSProperties',
 ])
+HOST_CXXFLAGS += ['--gcc-toolchain=/usr/lib/gcc-mozilla']
 
 MOCHITEST_MANIFESTS += [
     'mochitest.ini',
diff --git a/servo/components/style/build_gecko.rs b/servo/components/style/build_gecko.rs
index dfd2a21..5696e2a 100644
--- a/servo/components/style/build_gecko.rs
+++ b/servo/components/style/build_gecko.rs
@@ -149,6 +149,8 @@ impl BuilderExt for Builder {
             builder = builder.with_rustfmt(path);
         }
 
+        builder = builder.clang_arg("--gcc-toolchain=/usr/lib/gcc-mozilla");
+
         for dir in SEARCH_PATHS.iter() {
             builder = builder.clang_arg("-I").clang_arg(dir.to_str().unwrap());
         }
bgstack15