From 3f48f8ec54e7da6246501945095ee619be808e1c Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Tue, 12 Sep 2017 13:21:18 -0400 Subject: [PATCH] Linux: Fix 32-bit build fails with ld.gold: internal error in get_section_contents, at icf.cc:467 (issue #2256) --- patch/patch.cfg | 4 ++++ patch/patches/linux_build.patch | 15 ++++++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/patch/patch.cfg b/patch/patch.cfg index 3fd40e60b..e431036c2 100644 --- a/patch/patch.cfg +++ b/patch/patch.cfg @@ -324,6 +324,10 @@ patches = [ }, { # Linux: Fix build errors related to dependency versions. + # + # Linux: Fix 32-bit build fails with ld.gold: internal error in + # get_section_contents, at icf.cc:467 + # https://bitbucket.org/chromiumembedded/cef/issues/2256 'name': 'linux_build', }, { diff --git a/patch/patches/linux_build.patch b/patch/patches/linux_build.patch index fc1140377..0ae7af2ae 100644 --- a/patch/patches/linux_build.patch +++ b/patch/patches/linux_build.patch @@ -1,5 +1,18 @@ +diff --git build/config/compiler/BUILD.gn build/config/compiler/BUILD.gn +index 0acb460fe62d..5b0183fb7540 100644 +--- build/config/compiler/BUILD.gn ++++ build/config/compiler/BUILD.gn +@@ -415,7 +415,7 @@ config("compiler") { + # chromeos binutils has been patched with the fix, so always use icf there. + # The bug only affects x86 and x64, so we can still use ICF when targeting + # other architectures. +- if ((!is_android && linux_use_bundled_binutils) || is_chromeos || ++ if ((!is_android && linux_use_bundled_binutils && current_cpu != "x86") || is_chromeos || + !(current_cpu == "x86" || current_cpu == "x64")) { + ldflags += [ "-Wl,--icf=all" ] + } diff --git chrome/browser/ui/libgtkui/gtk_ui.cc chrome/browser/ui/libgtkui/gtk_ui.cc -index f45f2b1..dbabf1b 100644 +index f45f2b10a842..dbabf1bb7f3b 100644 --- chrome/browser/ui/libgtkui/gtk_ui.cc +++ chrome/browser/ui/libgtkui/gtk_ui.cc @@ -92,6 +92,7 @@ namespace libgtkui {