blob: b33c38e333b9462269985b958ac68a2b16360a74 [file] [log] [blame] [edit]
# Copyright 2020 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Fix binutils headers and library conflicts when installing binutils-libs.
# Remove symlinks to headers that are now provided by binutils-libs.
# Note re-building binutils does not remove these symlinks so
# a manual removal is needed to avoid merge conflicts.
files_to_remove=(
/usr/include/symcat.h
/usr/include/plugin-api.h
/usr/include/bfdlink.h
/usr/include/bfd.h
/usr/include/dis-asm.h
/usr/include/ansidecl.h
/usr/include/libiberty/sort.h
/usr/include/libiberty/fibheap.h
/usr/include/libiberty/safe-ctype.h
/usr/include/libiberty/demangle.h
/usr/include/libiberty/objalloc.h
/usr/include/libiberty/hashtab.h
/usr/include/libiberty/timeval-utils.h
/usr/include/libiberty/splay-tree.h
/usr/include/libiberty/partition.h
/usr/include/libiberty/dyn-string.h
/usr/include/libiberty/libiberty.h
/usr/include/libiberty/floatformat.h
/usr/include/libiberty/ansidecl.h
/usr/include/libiberty.h
)
echo "Fixing up binutils installation"
sudo rm -f "${files_to_remove[@]}"
sudo emerge -ugq sys-devel/binutils-config
sudo emerge -ugq sys-libs/binutils-libs