I'm trying to build libgcc by following https://wiki.osdev.org/Building_libgcc_ ... l%3Dkernel. The sed command doesn't help at all (it does what it's supposed to, but looks like that's not what has to be done) and the build fails again for the same reason. I have followed the https://wiki.osdev.org/GCC_Cross-Compiler article up to this point.
I have also tried with this multilib setup
Code: Select all
MULTILIB_OPTIONS += mno-red-zone mcmodel=kernel/fpic
I'm using gcc 7.4.0 on ubuntu, first tried compiling gcc 8.3, then 9.1, same results both times. Although I didn't try the multilib thing on 8.3.
A web search returns a bunch of posts about not being able to compile the linux kernel, and suggests adding -fno-pie to some flags, but that was supposed to be what the sed command in the libgcc article does.
Has anyone else had issues with this?