crosstool-ng build fails on gcc 7.1
|Status:||Closed||Start date:||01 Feb 2019|
|Category:||00 - Basic Build Issues|
|Target version:||1.1.0 - Upgrades|
|Severity:||01 - Critical|
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.
- 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.
#1 Updated by Hammel over 2 years ago
- Status changed from New to In Progress
- % Done changed from 0 to 30
I found an RPM from here: https://drive.google.com/file/d/1t4WrgvpEP-6_NN3qMJhz9MS3CJhHrHKc/view
It was reference on Stack Overflow: https://stackoverflow.com/questions/49018215/install-gcc-and-g-version-6-in-fedora-27
I installed the RPM, which installs a /usr/bin/gcc63 binary. I then ran the xcc build as such:
make CC=gcc63 HW=rpi2 xcc
That seems to get past the bug without having to patch the source or use git. We'll see if this works for the test of the build.
#4 Updated by Hammel over 2 years ago
I found a workaround for now. Edit this file:
and change line 1474 (or whatever line is reported in the error while building Crosstool-NG) from this
|| xloc.file == '\0' || xloc.file == '\xff'
|| xloc.file == '\0'
This allows the build to continue. See Crosstool-NG issues for details.
#5 Updated by Hammel over 2 years ago
- 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.