raspberrypi / tools

1.89k stars 865 forks source link

Error with current toolchain (outdated, maybe?) #38

Open nooboba opened 9 years ago

nooboba commented 9 years ago

I've been trying to compile the RPi's kernel using Ubuntu to cross-compile. I've been using a default configuration, and every time I try and compile the kernel, I get this error:

error Your compiler is too buggy; it is known to miscompile kernels

^ arch/arm/kernel/asm-offsets.c:54:2: error: #error and result in filesystem corruption and oopses.

error and result in filesystem corruption and oopses.

I've followed the documentation on the official Raspberry Pi website, and as someone who's new to kernel compilation, I'm not quite sure how to fix this. Maybe it's an issue that only I'm experiencing, and if so, does anyone know how to resolve this?

popcornmix commented 9 years ago

The official kernel builds are built with this: https://github.com/raspberrypi/tools/tree/master/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin

What are you using to compile?

nooboba commented 9 years ago

The documentation told me just to download the whole tools file....if that's the case, should I just download the x64 file only?

popcornmix commented 9 years ago

You download the whole tools repo. What matters is what you set CROSS_COMPILE to.

nooboba commented 9 years ago

I set it as arm-linux-gnueabihf.....is that wrong?

popcornmix commented 9 years ago

That is correct. What does: arm-linux-gnueabihf-gcc --version report?