electron/patches/mips64el/chromium/Fix-error-about-relocation-truncated-to-fit-R_MIPS_C.patch
Jeremy Apthorp 76c5f5cc8a
build: move libcc patches to electron repo (#14104)
In the GN build, libchromiumcontent is no longer a distinct library, but
merely a container for a set of scripts and patches. Maintaining those
patches in a separate repository is tedious and error-prone, so merge
them into the main repo.

Once this is merged and GN is the default way to build Electron, the
libchromiumcontent repository can be archived.
2018-09-13 22:02:16 -07:00

46 lines
1.3 KiB
Diff

From 0c64df90e4ca25644ac5aa3f35ab4884f697165e Mon Sep 17 00:00:00 2001
From: Wang Qing <wangqing-hf@loongson.cn>
Date: Mon, 9 Oct 2017 16:53:22 +0800
Subject: [PATCH] Fix error about "relocation truncated to fit: R_MIPS_CALL16"
when cross-compiling shared_library with is_debug on x64.
---
content/common/BUILD.gn | 5 +++++
ppapi/proxy/BUILD.gn | 5 +++++
2 files changed, 10 insertions(+)
diff --git a/content/common/BUILD.gn b/content/common/BUILD.gn
index fd5c0dc..e91e8348 100644
--- a/content/common/BUILD.gn
+++ b/content/common/BUILD.gn
@@ -15,6 +15,11 @@ if (is_mac) {
import("//build/config/mac/mac_sdk.gni")
}
+if (is_debug && current_cpu == "mips64el") {
+ cflags_cc = [ "-mxgot" ]
+ cflags_cc += [ "-mlong-calls" ]
+}
+
# For feature flags internal to content. See content/public/common:features
# for feature flags that clients of contents need to know about.
buildflag_header("features") {
diff --git a/ppapi/proxy/BUILD.gn b/ppapi/proxy/BUILD.gn
index b572778..a2630f20 100644
--- a/ppapi/proxy/BUILD.gn
+++ b/ppapi/proxy/BUILD.gn
@@ -8,6 +8,11 @@ config("proxy_implementation") {
defines = [ "PPAPI_PROXY_IMPLEMENTATION" ]
}
+if (is_debug && current_cpu == "mips64el") {
+ cflags_cc = [ "-mxgot" ]
+ cflags_cc += [ "-mlong-calls" ]
+}
+
component("proxy") {
output_name = "ppapi_proxy"
--
2.7.4