Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 663194 - =sys-devel/binutils-2.31.1 does not compile with clang
Summary: =sys-devel/binutils-2.31.1 does not compile with clang
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2018-08-08 21:36 UTC by David Carlos Manuelda
Modified: 2018-08-27 13:17 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
fix types for clang compilation (0001-Fix-type-checking-errors.patch,2.31 KB, patch)
2018-08-08 21:36 UTC, David Carlos Manuelda
Details | Diff
buildlog (build.log,471.19 KB, text/x-log)
2018-08-09 00:50 UTC, David Carlos Manuelda
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Carlos Manuelda 2018-08-08 21:36:58 UTC
Created attachment 542816 [details, diff]
fix types for clang compilation

binutils 2.31.1 does not compile with clang due to integer narrowing error, a patch is available from upstream git, which I attach here.
Comment 1 Sergei Trofimovich (RETIRED) gentoo-dev 2018-08-08 21:55:42 UTC
Thanks for the report!

Can you also attach build.log with failure for completeness?
Comment 2 David Carlos Manuelda 2018-08-09 00:50:27 UTC
Created attachment 542824 [details]
buildlog
Comment 3 Sergei Trofimovich (RETIRED) gentoo-dev 2018-08-27 13:16:52 UTC
Posting error snippet here for posterity and simpler search:

/tmp/portage/sys-devel/binutils-2.31.1/work/binutils-2.31.1/gold/x86_64.cc:1592:10: error: case value evaluates to 3221225474, which cannot be narrowed to type 'int' [-Wc++11-narrowing]
    case elfcpp::GNU_PROPERTY_X86_FEATURE_1_AND:
         ^
/tmp/portage/sys-devel/binutils-2.31.1/work/binutils-2.31.1/gold/x86_64.cc:1591:10: error: case value evaluates to 3221225473, which cannot be narrowed to type 'int' [-Wc++11-narrowing]
    case elfcpp::GNU_PROPERTY_X86_ISA_1_NEEDED:
         ^
/tmp/portage/sys-devel/binutils-2.31.1/work/binutils-2.31.1/gold/x86_64.cc:1590:10: error: case value evaluates to 3221225472, which cannot be narrowed to type 'int' [-Wc++11-narrowing]
    case elfcpp::GNU_PROPERTY_X86_ISA_1_USED:
         ^
/tmp/portage/sys-devel/binutils-2.31.1/work/binutils-2.31.1/gold/x86_64.cc:1617:10: error: case value evaluates to 3221225474, which cannot be narrowed to type 'int' [-Wc++11-narrowing]
    case elfcpp::GNU_PROPERTY_X86_FEATURE_1_AND:
         ^
/tmp/portage/sys-devel/binutils-2.31.1/work/binutils-2.31.1/gold/x86_64.cc:1614:10: error: case value evaluates to 3221225473, which cannot be narrowed to type 'int' [-Wc++11-narrowing]
    case elfcpp::GNU_PROPERTY_X86_ISA_1_NEEDED:
         ^
/tmp/portage/sys-devel/binutils-2.31.1/work/binutils-2.31.1/gold/x86_64.cc:1611:10: error: case value evaluates to 3221225472, which cannot be narrowed to type 'int' [-Wc++11-narrowing]
    case elfcpp::GNU_PROPERTY_X86_ISA_1_USED:
         ^
Comment 4 Larry the Git Cow gentoo-dev 2018-08-27 13:17:16 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dfba25224a9a672a445b74d09a8d16bf9beaa381

commit dfba25224a9a672a445b74d09a8d16bf9beaa381
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2018-08-27 13:14:05 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2018-08-27 13:17:09 +0000

    sys-libs/binutils-libs: cut 2 patchset for 2.31.1
    
    Single new patch to fix build failure against llvm:
    + 0013-Fix-type-checking-errors.patch
    
    Reported-by: David Carlos Manuelda
    Closes: https://bugs.gentoo.org/663194
    Package-Manager: Portage-2.3.48, Repoman-2.3.10

 sys-libs/binutils-libs/Manifest                    | 2 +-
 sys-libs/binutils-libs/binutils-libs-2.31.1.ebuild | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=496fd5fe49c3995bdde031d6a2499bff2ff7bbe2

commit 496fd5fe49c3995bdde031d6a2499bff2ff7bbe2
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2018-08-27 13:13:04 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2018-08-27 13:17:09 +0000

    sys-devel/binutils-hppa64: cut 2 patchset for 2.31.1
    
    Single new patch to fix build failure against llvm:
    + 0013-Fix-type-checking-errors.patch
    
    Reported-by: David Carlos Manuelda
    Closes: https://bugs.gentoo.org/663194
    Package-Manager: Portage-2.3.48, Repoman-2.3.10

 sys-devel/binutils-hppa64/Manifest                      | 2 +-
 sys-devel/binutils-hppa64/binutils-hppa64-2.31.1.ebuild | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bb0df5be78a66dcd29eb320351fb81e8cc54dca0

commit bb0df5be78a66dcd29eb320351fb81e8cc54dca0
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2018-08-27 13:11:53 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2018-08-27 13:17:09 +0000

    sys-devel/binutils: cut 2 patchset for 2.31.1
    
    Single new patch to fix build failure against llvm:
    + 0013-Fix-type-checking-errors.patch
    
    Reported-by: David Carlos Manuelda
    Closes: https://bugs.gentoo.org/663194
    Package-Manager: Portage-2.3.48, Repoman-2.3.10

 sys-devel/binutils/Manifest               | 2 +-
 sys-devel/binutils/binutils-2.31.1.ebuild | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)