From 1ec346dc4b77e90bd7db8104b7c1faf39c9db2da Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Tue, 12 Sep 2017 13:18:00 -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 | 13 +++++++++++++ 2 files changed, 17 insertions(+) diff --git a/patch/patch.cfg b/patch/patch.cfg index 32eee8c06..d3e076227 100644 --- a/patch/patch.cfg +++ b/patch/patch.cfg @@ -317,6 +317,10 @@ patches = [ { # Linux: Fix build errors related to dependency versions. # https://chromium-review.googlesource.com/c/590271/ + # + # 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 910b8e109..e7fb09dc0 100644 --- a/patch/patches/linux_build.patch +++ b/patch/patches/linux_build.patch @@ -1,3 +1,16 @@ +diff --git build/config/compiler/BUILD.gn build/config/compiler/BUILD.gn +index b5d6d8fdb443..3cb6a0a719c2 100644 +--- build/config/compiler/BUILD.gn ++++ build/config/compiler/BUILD.gn +@@ -406,7 +406,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 a38c6b806be7..bb4fa59d7612 100644 --- chrome/browser/ui/libgtkui/gtk_ui.cc