Talk:GCC Cross-Compiler: Difference between revisions

Jump to navigation Jump to search
Content deleted Content added
Solar (talk | contribs)
Line 147: Line 147:
:But I am confused. Your cross-compiler should reside in /usr/local/cross/bin, named i386-elf-gcc. (As your example call shows.) Whatever /usr/bin/gcc is or points to shouldn't affect it in the least. Neither should your CC / CXX / ... exports solve the problem...?!? -- [[User:Solar|Solar]] 07:11, 29 November 2011 (UTC)
:But I am confused. Your cross-compiler should reside in /usr/local/cross/bin, named i386-elf-gcc. (As your example call shows.) Whatever /usr/bin/gcc is or points to shouldn't affect it in the least. Neither should your CC / CXX / ... exports solve the problem...?!? -- [[User:Solar|Solar]] 07:11, 29 November 2011 (UTC)
::$CC & co. are used when compiling the cross-compiler. Something about using llvm-gcc to produce the cross-compiler triggers a bug of some sort in the gcc source code, so you get a defective i386-elf-gcc. At least, that's what I've come to think. I don't know how else to explain why the host compiler would affect the resulting cross-compiler. I'd dig into the gcc source code to try to figure it out but I've heard so many horror stories about that codebase that I'm breaking into a cold sweat just by entertaining the idea... --[[User:Nokurn|Nokurn]] 07:18, 29 November 2011 (UTC)
::$CC & co. are used when compiling the cross-compiler. Something about using llvm-gcc to produce the cross-compiler triggers a bug of some sort in the gcc source code, so you get a defective i386-elf-gcc. At least, that's what I've come to think. I don't know how else to explain why the host compiler would affect the resulting cross-compiler. I'd dig into the gcc source code to try to figure it out but I've heard so many horror stories about that codebase that I'm breaking into a cold sweat just by entertaining the idea... --[[User:Nokurn|Nokurn]] 07:18, 29 November 2011 (UTC)
:::Ah, I see - you set those exports ''while compiling the cross-compiler'', not while using it (as I initially understood). That's definitely worth a bug report to upstream (GCC)... Funny enough, a quick Google shows that [http://llvm.org/docs/GettingStarted.html#brokengcc the animosities are mutual]. :-D I'll extend the tutorial ASAP. -- [[User:Solar|Solar]] 14:58, 29 November 2011 (UTC)