Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 583198 - cross-arm*/gcc: nesting level exceeded when compiling cross compiler for arm with clang
Summary: cross-arm*/gcc: nesting level exceeded when compiling cross compiler for arm ...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All OS X
: Normal normal (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-16 16:18 UTC by Michael Weiser
Modified: 2016-06-19 23:05 UTC (History)
0 users

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


Attachments
Make gcc compile as cross compiler for arm using clang (gcc-5.3.0-darwin-cross-arm.patch,440 bytes, patch)
2016-05-16 16:19 UTC, Michael Weiser
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Weiser 2016-05-16 16:18:42 UTC
When compiling gcc as a cross compiler for target arm with clang, I hit bug https://llvm.org/bugs/show_bug.cgi?id=19650:

.../gcc/config/arm/neon.md:3486:10917: fatal error:
     bracket nesting level exceeded maximum of 256
.../gcc/config/arm/neon.md:3486:10917: note: use
     -fbracket-depth=N to increase maximum nesting level

As the linked llvm upsteam bug and gcc mailing list discussion linked from there show, there is some contention who's actually at fault. A quick upstream fix does not seem to be forthcoming. So I changed the ebuild as shown in the attached patch to work around it.

Reproducible: Always
Comment 1 Michael Weiser 2016-05-16 16:19:21 UTC
Created attachment 434438 [details, diff]
Make gcc compile as cross compiler for arm using clang
Comment 2 Michael Weiser 2016-05-16 16:21:01 UTC
Ah, BTW, I'm not checking for compiling a cross compiler because I expect the same thing to happen when compiling using clang *on* arm for arm.
Comment 3 Michael Weiser 2016-06-19 23:05:34 UTC
Please disregard. This does not work. CFLAGS are still reset by toolchain.eclass. You need to set CFLAGS_${CTARGET//-/_}, i.e. CFLAGS_armv7ve_hardfloat_linux_gnueabi="-fbracket-depth=1024", to get them around toolchain's flags cleanliness. I've worked around it using an env snippet now.