Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 578422 - sys-devel/gcc-4.9.3: compile error for ARM architecture when building with clang
Summary: sys-devel/gcc-4.9.3: compile error for ARM architecture when building with clang
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL: https://gcc.gnu.org/ml/gcc/2014-05/ms...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-28 01:49 UTC by A. Wilcox (awilfox)
Modified: 2017-10-02 20:42 UTC (History)
0 users

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


Attachments
gcc-stage1 build.log showing failure (cross-armv7hf-foxkit-linux-musleabi-gcc-stage1.log.xz,61.64 KB, application/x-xz)
2016-03-28 01:49 UTC, A. Wilcox (awilfox)
Details
toolchain-eclass-gcc-on-arm-with-clang.patch (toolchain-eclass-clang-arm.patch,311 bytes, patch)
2016-03-28 01:49 UTC, A. Wilcox (awilfox)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description A. Wilcox (awilfox) 2016-03-28 01:49:16 UTC
Created attachment 429120 [details]
gcc-stage1 build.log showing failure

I have an experimental host system using CC=clang CXX=clang++.  Attempting to build an ARM cross compiler using crossdev fails with GCC 4.9.3 due to an upstream bug in GCC (linked in URL).

# crossdev --b 2.25.1-r1 --g 4.9.3 --k 4.4 --l 1.1.14 --genv 'USE="libssp -sanitize -fortran"' armv7hf-foxkit-linux-musleabi -v
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 * crossdev version:      20151026
 * Host Portage ARCH:     amd64
 * Target Portage ARCH:   arm
 * Target System:         armv7hf-foxkit-linux-musleabi
 * Stage:                 4 (C/C++ compiler)
 * ABIs:                  default

 * binutils:              binutils-2.25.1-r1
 * gcc:                   gcc-4.9.3
 * headers:               linux-headers-4.4
 * libc:                  musl-1.1.14

[...]

/var/tmp/portage/cross-armv7hf-foxkit-linux-musleabi/gcc-4.9.3/work/gcc-4.9.3/gcc/config/arm/neon.md:3486:10917: fatal error: 
      bracket nesting level exceeded maximum of 256
/var/tmp/portage/cross-armv7hf-foxkit-linux-musleabi/gcc-4.9.3/work/gcc-4.9.3/gcc/config/arm/neon.md:3486:10917: note: 
      use -fbracket-depth=N to increase maximum nesting level
32 warnings and 1 error generated.
Makefile:1069: recipe for target 'insn-attrtab.o' failed
make[2]: *** [insn-attrtab.o] Error 1
make[2]: *** Waiting for unfinished jobs....



A one-line patch to toolchain.eclass seems to fix this for me.  I am not sure if this is something that the Gentoo toolchain team wishes to support.  I am also not entirely sure if this patch meets style guidelines, as this is the first time I've ever touched an eclass, but I think it does.
Comment 1 A. Wilcox (awilfox) 2016-03-28 01:49:46 UTC
Created attachment 429122 [details, diff]
toolchain-eclass-gcc-on-arm-with-clang.patch
Comment 2 SpanKY gentoo-dev 2016-03-28 03:20:30 UTC
Comment on attachment 429122 [details, diff]
toolchain-eclass-gcc-on-arm-with-clang.patch

this isn't a patch i think we should be carrying at all.  it indicates there's a bug elsewhere (like clang).
Comment 3 Andreas K. Hüttel archtester gentoo-dev 2017-10-02 20:42:24 UTC
More something for local flags or a bug in clang.