The problem would manifest even by compiling a hello world C file, such as
- Code: Select all
int main() { return 0; }
Which when compiled would error:
- Code: Select all
/usr/lib/gcc/x86_64-pc-linux-gnu/6.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.0/../../../../lib64/Scrt1.o: unrecognized relocation (0x2a) in section `.text'
After trying a lot of things out, including emerging binaries from a different Gentoo system, I finally reverted, and got the problem solved thanks to optiz0r (for solving my issue) and Ryuno-Ki[m] (for letting me know about optiz0rs reply when I had logged off).
The solution in my case
- Code: Select all
sudo binutils-config x86_64-pc-linux-gnu-2.29.1
Very simple! The solution to your problem may differ, but running
- Code: Select all
sudo binutils-config -l
may reveal the version you can enter instead of the version I used.