Add fix-building-with-custom-libcxx.patch

This patch fixes building with Clang versions < 6, since they don't have
support for the argument -nostdlib++
This commit is contained in:
Eloston
2018-03-13 10:06:51 +00:00
parent 4435cd62e2
commit 75980382cb
4 changed files with 43 additions and 0 deletions
@@ -1 +1,2 @@
ungoogled-chromium/linux/manpage.patch
ungoogled-chromium/linux/fix-building-with-custom-libcxx.patch
@@ -1,3 +1,4 @@
ubuntu/no-new-ninja-flag.patch
ubuntu/relax-ninja-version-requirement.patch
ungoogled-chromium/linux/manpage.patch
ungoogled-chromium/linux/fix-building-with-custom-libcxx.patch
@@ -1 +1,2 @@
ungoogled-chromium/linux/manpage.patch
ungoogled-chromium/linux/fix-building-with-custom-libcxx.patch
@@ -0,0 +1,40 @@
# Fix building with use_custom_libcxx=true
# Currently, it removes the use of -nostdlib++, which isn't available in
# clang versions < 6
--- a/build/config/posix/BUILD.gn
+++ b/build/config/posix/BUILD.gn
@@ -58,22 +58,18 @@ config("runtime_library") {
}
# Make sure we don't link against libc++ or libstdc++.
- if (is_clang) {
- ldflags += [ "-nostdlib++" ]
- } else {
- ldflags += [ "-nodefaultlibs" ]
+ ldflags += [ "-nodefaultlibs" ]
- # Unfortunately, there's no way to disable linking against just libc++
- # (gcc doesn't have -notstdlib++:
- # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83931); -nodefaultlibs
- # removes all of the default libraries, so add back the ones that we need.
- libs += [
- "c",
- "gcc_s",
- "m",
- "rt",
- ]
- }
+ # Unfortunately, there's no way to disable linking against just libc++
+ # (gcc doesn't have -notstdlib++:
+ # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83931); -nodefaultlibs
+ # removes all of the default libraries, so add back the ones that we need.
+ libs += [
+ "c",
+ "gcc_s",
+ "m",
+ "rt",
+ ]
}
if (!is_mac && !is_ios && sysroot != "") {