Message du 15/09/18 19:25
Objet : Re: [lfs-support] LFS v. 8.3 : Compiler lacks asm-goto
support.. Stop.
Post by Terence WaterhousePost by Terence WaterhouseHello all,
When running right at the start of chapter 8.3 to prepare the
kernel build, I got the
Post by Terence WaterhousePost by Terence Waterhousearch/x86/Makefile:184: *** Compiler lacks asm-goto support.. Stop.
As far as I can make out this is an issue with kernels before
4.5 and the current kernel is 4.18.5. I had no
Post by Terence WaterhousePost by Terence Waterhousebuild problems with gcc-8.2.0 and no test fails.
Should I continue or is this critical ?
Short answer is that you cannot continue until you are able to
determine what has gone wrong. At the moment you can't build a
kernel, so you cannot boot the new system.
Post by Terence WaterhouseOf course I should have written "this is an issue with gcc
versions before 4.5" sorry for that mistake.
Post by Terence WaterhouseHere is the output of gcc -v
gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/8.2.0/lto-wrapper
Post by Terence WaterhouseTarget: x86_64-pc-linux-gnu
Configured with: ../configure --prefix=/usr
--enable-languages=c,c++ --disable-multilib --disable-bootstrap
--disable-libmpx --with-system-zlib
Post by Terence WaterhouseThread model: posix
gcc version 8.2.0 (GCC)
I've not heard of anybody hitting this problem with recent gcc.
Google found the patch where this was proposed, the initial comment
| Now that we have objtool to validate the correctness of asm-goto
| constructs we can start using it to guarantee the absence of dynamic
| branches (and thus speculation).
So the problem appears to be in objtool. We added elfutils to LFS
in 8.2 to support objtool, maybe something went wrong in your
install of that (libelf).
The test in the kernel tree is at scripts/gcc-goto.sh, but I don't
know how to run that successfully from outside the kernel build (in
particular, it needs to be persuaded to run objtool, and altered to
not discard the output).
You are using the orc unwinder ?
All I can suggest is that you run ldd on the compiled objtool in the
kernel tree (tools/objtool/objtool) to see if that reports an error
(it should report it is linked to libelf.so.1 as libz, libc, the
vdso and the loader.
Unfortunately, the kernel build system has changed this year, and
things which used to reliably trigger the expected error messages
(in my experiences, trying to change the kernel config and rebuild
the existing tree as a user after building as root, and at first boot
a typo in the bootargs root=/dev/sda76, caused failures but with
very odd error messages.
ĸen
--
Tout est bien, tout va bien, tout va pour le mieux qu'il soit possible
-- Candide, de Voltaire
(Everything is for the best, in the best of all possible worlds)
Hello all and of course, Ken,
I tried your suggestions and couldn't get much (any) feedback. There
are only source files in the tools/objtool directory
so ldd couldn't be much help.
I couldn't get gcc-goto.sh to run either. however, you mentioned
libelf so I tried recompiling the package and it reports that
////////////////
configure:3371: checking for gcc
configure:3387: found /usr/bin/gcc
configure:3398: result: gcc
configure:3627: checking for C compiler version
configure:3636: gcc --version >&5
gcc (GCC) 8.2.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
configure:3647: $? = 0
configure:3636: gcc -v >&5
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/8.2.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../configure --prefix=/usr --enable-languages=c,c++
--disable-multilib --disable-bootstrap --disable-libmpx --with-system-zlib
Thread model: posix
gcc version 8.2.0 (GCC)
configure:3647: $? = 0
configure:3636: gcc -V >&5
gcc: error: unrecognized command line option '-V'
gcc: fatal error: no input files
compilation terminated.
configure:3647: $? = 1
configure:3636: gcc -qversion >&5
gcc: error: unrecognized command line option '-qversion'; did you mean '--version'?
gcc: fatal error: no input files
compilation terminated.
configure:3647: $? = 1
configure:3667: checking whether the C compiler works
configure:3689: gcc conftest.c >&5
gcc: error trying to exec 'as': execvp: No such file or directory
configure:3693: $? = 1
configure:3731: result: no
| /* confdefs.h */
| #define PACKAGE_NAME "elfutils"
| #define PACKAGE_TARNAME "elfutils"
| #define PACKAGE_VERSION "0.173"
| #define PACKAGE_STRING "elfutils 0.173"
| #define PACKAGE_BUGREPORT "https://sourceware.org/bugzilla"
| #define PACKAGE_URL "http://elfutils.org/"
| #define PACKAGE "elfutils"
| #define VERSION "0.173"
| #define DEFAULT_AR_DETERMINISTIC false
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:3738: error: C compiler cannot create executables
See `config.log' for more details
/////////////////
I must stress that the first compile of elfutils gave no errors and
the test suite was perfectly clean. Now
it would seem that gcc-8.2.0 is not working properly and the build of
this also went smoothly.
Incidentally, I don't know what the orc unwinder is although there are
files concerning orc in
the tools/objtool directory.
many thanks in advance
Terence
Something when wrong in the Adjusting the tools chain step.
Do not top post on this list.
A: Because it messes up the order in which people normally read text.
A: Top-posting.