Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to Compile GCC 10.1 for Toolchain #24

Closed
dslm4515 opened this issue Jun 17, 2020 · 8 comments
Closed

Unable to Compile GCC 10.1 for Toolchain #24

dslm4515 opened this issue Jun 17, 2020 · 8 comments
Labels
help wanted Extra attention is needed invalid This doesn't seem right

Comments

@dslm4515
Copy link
Owner

Step 10 fails with this output after command:
PATH=/bin:/usr/bin:/cross-tools/bin:/tools/bin make

Output:

configure: summary of build options:

  Version:           GNU MP 6.2.0
  Host type:         none-mlfs-linux-musl
  ABI:               standard
  Install prefix:    /tools
  Compiler:          x86_64-mlfs-linux-musl-gcc
  Static libraries:  yes
  Shared libraries:  no

make[1]: Leaving directory '/mnt/mlfs/sources/gcc-10.1.0/build'
make: *** [Makefile:963: all] Error 2
@dslm4515 dslm4515 added help wanted Extra attention is needed invalid This doesn't seem right labels Jun 17, 2020
@dslm4515
Copy link
Owner Author

Rerunning command as make :

checking for an ANSI C-conforming const... yes
checking for inline... inline
checking whether byte ordering is bigendian... no
checking for a BSD-compatible install... /bin/install -c
checking for CET support... configure: error: in `/mnt/mlfs/sources/gcc-10.1.0/build/libiberty':
configure: error: cannot run test program while cross compiling
See `config.log' for more details
make[1]: *** [Makefile:8919: configure-libiberty] Error 1
make[1]: Leaving directory '/mnt/mlfs/sources/gcc-10.1.0/build'
make: *** [Makefile:963: all] Error 2

@firasuke
Copy link
Contributor

firasuke commented Jun 18, 2020

Yes, this is actually due to broken CET in libiberty and lto-plugin (when cross compiling GCC), and was fixed by upstream.

Fetch that patch, and run patch -p1 -i Enable-CET-in-cross-compiler-if-possible.patch in gcc's source directory.

@dslm4515
Copy link
Owner Author

I tried the --disable-cet flag. No change. Same output. Perhaps I need the flag also when building the cross-compiler?

@dslm4515
Copy link
Owner Author

dslm4515 commented Jun 18, 2020

Ugh. I didn't see the other half of your message on mobile. I will try that patch.

P.S. using a new machine! i7-9700K with 16Gb ram!

@firasuke
Copy link
Contributor

Oh the --disable-cet won't do anything, the CET check is faulty when checking for cross compilation in both libiberty and lto-plugin, so a patch is needed (and the one I provided above is from upstream itself).

Congratulations on the new machine!

@dslm4515
Copy link
Owner Author

I applied patch, cleared build directory, ran configure and now compiling... So far no errors! Will check back on it later.

@firasuke
Copy link
Contributor

Good to know.

@dslm4515
Copy link
Owner Author

GCC compiled without error!

2.5 min build time on this i7 machine!

Just realized same patch was used in current development version of LFS. I forgot to check.

Patch will be included once I finish my build and upload it as branch 7.00

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants