Bug #685
closed
crosstool-ng build fails on gcc 7.1
Added by Hammel almost 6 years ago.
Updated almost 6 years ago.
Category:
00 - Basic Build Issues
Description
This is a known issue: https://github.com/crosstool-ng/crosstool-ng/issues/992
It's fixed in git but won't be available till the next release of Ctng.
This means I can't build on Fedora 27 right now.
Options:
- Downrev gcc or install gcc-6.x. There don't appear to be any packages for gcc-6.x available in th default repos.
- Fix xcc build to support building from git. Right now it only builds from release images.
- Status changed from New to In Progress
- % Done changed from 0 to 30
I was wrong. Setting CC=gcc63 didn't force use of that compiler and I hit the bug again.
Investigating how I can force the compiler selection on the build.
- % Done changed from 30 to 50
I can force a different gcc on the host and in the build but it doesn't matter. The bug still shows up.
So now I need to modify the build to support Crosstool-NG GIT releases.
I found a workaround for now. Edit this file:
<bld>/crosstool-ng-1.23.0.bld/work/src/gcc-linaro-6.3-2017.02/gcc/ubsan.c
and change line 1474 (or whatever line is reported in the error while building Crosstool-NG) from this
|| xloc.file == '\0' || xloc.file[0] == '\xff'
to this
|| xloc.file[0] == '\0'
This allows the build to continue. See Crosstool-NG issues for details.
- Status changed from In Progress to Closed
- % Done changed from 50 to 100
Crosstool-NG has a patches directory and there is a subdir for the Linaro gcc PiBox is using. I created a patch for the ubsan.c file and put it in that directory. Then I created a patch of the Crosstool-NG tree and placed that patch in the PiBox xcc patch directory so it gets applied in the xcc-patch target. This appears to have worked.
The patch is applicable for any gcc as the bug was always there but simply not identified by compilers before gcc 7.x (as far as I know).
Patch has been tested and pushed upstream.
Closing issue.
Also available in: Atom
PDF