This linker was not configured to use sysroots
C compiler cannot create executables
To compile Linux kernel in Ubuntu, type the command
Make menuconfig
This linker was not configured to use sysroots
Check it because/usr/local/bin/LD is not configured as configure -- With-sysroot before compilation.
So I downloaded the binutils-2.22 and wanted to compile a program with sysroot.
Type the command ../binutils-2.22/configure -- With-sysroot
Error:
C compiler cannot create executables, open config. log in the directory
This linker was not configured to use sysroots error message also exists,
Later, I checked that there is also a LD in the/usr/bin directory and tried it with/usr/bin/LD -- sysroot =/. No error message is reported.
This linker was not configured to use sysroots should support sysroot
Then, rename/usr/bin/LD to/usr/bin/ldxxxx. The command is
MV/usr/bin/LD/usr/bin/ldxxxx
Then execute ../binutils-2.22/configure -- With-sysroot
Make
Make install
Then, we can compile the Linux kernel. In fact, we only change the name of/usr/local/bin/LD to/usr/local/bin/ldxxxx.
You should be able to execute make menuconfig in the Linux kernel directory.