Talk:GCC Cross-Compiler

From OSDev.wiki
Jump to navigation Jump to search

Unwieldy Configurations Table Size

I've just added another working config and the table of "known good" configurations is now getting a little big when viewed on a 1024x768 4:3 monitor. The situation is only going to get worse, so could I make some suggestions:

  1. Remove GCC versions < 4.0.0 and/or
  2. Make the table reverse-chronological, so GCC 4.5.0 / Binutils 2.20 would be at the top left and version numbers would decrease rightwards and downwards, so no horizontal scroling for the latest version. and/or
  3. Something else... and/or
  4. Club together and buy me a nice widescreen monitor ;o)

Any thoughts, before I make such a big change? I favour option 2 (or 4!) so that all information is left intact --Aj 12:29, 11 February 2010 (UTC)Reply[reply]

I support this, there should be a minimal resolution that all the articles should target.. most of my monitors are <= 1024x768, so that's my biased recommendation. --Brynet-Inc 03:00, 13 February 2010 (UTC)Reply[reply]

Building Target-libgcc

At the end of cross-compiler creation, I always run make all-target-libgcc install-target-libgcc for long long integer support and so on. I wonder if this should be added to the Cross-Compiler tutorial, as the sensible time to do this is when you already have a configured build directory. If so, how should it be added; perhaps just as a footnote or should it actually be listed as an (optional) additional build command at the end of the GCC build? --Aj 10:56, 3 August 2009 (UTC)Reply[reply]

+1 for adding this to the tutorial. I think it would be best to keep it away from the bulk of the tutorial and leave it as a "Now you're done" sort of thing. That way people (especially those new to this kind of stuff) will be happy to leave with a cross-compiler without libgcc, and those who are interested in the additional features libgcc provides will read further. My 2c. --pcmattman 12:02, 3 August 2009 (UTC)Reply[reply]
I have inserted this information before the troubleshooting section. The idea is that the libgcc targets should be built while the configured gcc directory still exists, so I hope to catch people before they close Bash and delete their temporary build-gcc directory. I have also added a link to a summary of libgcc and have deleted the (dead) link to bill gaitliff's site - he used to offer a free advice page, but now seems to provide commercial cross-compiler services under a different URL. --Aj 10:04, 25 August 2009 (UTC)Reply[reply]

Compilation of x86_64-elf Target

I have just tried with GCC 4.3.1 and 4.3.2 and it appears that GCC no longer requires the x86_64-elf target adding manually for configuration (it now works in exactly the same way as i586-elf. I am going to make a few changes to the article to reflect this, but where does this leave the specific x86_64 Cross compiler article? Deleted? Added as a cross-reference for people building against older versions? --Aj 10:41, 29 September 2008 (UTC)Reply[reply]

I would put that information in the x86_64 crosscompiler article, rather than adding it here, since people are told to go there anyway. - Combuster 10:58, 29 September 2008 (UTC)Reply[reply]

Cross-Reference Suggestion

I was thinking of referencing the Porting Newlib article from Step 2 of this tutorial and/or the Articles section at the end of the page - any problems with that? --AJ 07:38, 1 October 2007 (CDT)

No problem at all. - Combuster 10:51, 1 October 2007 (CDT)

Binutils requires Flex & Bison

I'm editing the article because flex and bison are still required for at least binutils 4.2.2. CodeAnxiety 01:45, 31 January 2008 (CST)

What does it Do?

After reading through part 1, i fail to see what is done that cannot be done by GCC before creation of this cross compiler. It seems to be a waste of time, and nothing is specified about the platform that can't be accomplished by all other versions of GCC. --Tyler 22:50, 15 March 2007 (CDT)

Either your answer is in GCC_Cross-Compiler#Why_an_OS_developer_should_build_a_cross-compiler, otherwise, could you please be more clear in what the problem is exactly? - Combuster 04:03, 16 March 2007 (CDT)

My problem is... this tutorial does not show you how to "solve" any of these problems. It tells you how to recompile GCC to make only ELF files... something GCC can do anyway, ridding you of the problems. --Tyler 08:25, 16 March 2007 (CDT)

The main difference is that the GCC you are building is a Stage 1 toolchain, not a bootstrapped toolchain. (Not ELF vs COFF like you think) A dedicated crosscompiler does not think its compiling for windows/linux and as such does not fill in the gaps for you. It does just what you ask and only what you ask and nothing more, which is something you cant say of a stock GCC. Some of these 'features' you can override with commandline parameters, but some will stubbornly persist. - Combuster 04:45, 19 March 2007 (CDT)

Actually, the main difference is that, to my knowlegde, Cygwin GCC doesn't allow you to generate ELF binaries without the help of objcopy. Several other problems - like careless inclusion of system headers, error messages being posted to the forum that cannot be reproduced by people using a different host OS, and more - are also solved by this tutorial. Solar 09:57, 3 April 2007 (CDT)
Like Solar says, Cygwin GCC can't create ELF binaries by default. Creating a cross compiler fixes that, and more, and is pretty easily done. - Quok 20:30, 3 April 2007 (CDT)

Texinfo

Has anyone else had problems building Binutils/GCC when Texinfo is not installed? I am not sure what it is used for, but for some reason when not installed the Make fails. -- Tyler 14:02, 13 September 2007 (CDT)

AFAIK texinfo should only be used to make the documentation. On my setup, running 'make all-gcc' does not, by default, attempt to create the documentation and 'make install-gcc' does not attempt to install it, so texinfo shouldn't be required. Having said that, I do have texinfo installed, so I might not have noticed a call to it. John 14:41, 13 September 2007 (CDT)
I've never got as far as GCC without Texinfo, so i wouldn't know, it dies in the Binutils build, during a make all. Does Make all create documentation? -- Tyler 15:25, 13 September 2007 (CDT)
Yes, I'm afraid it does. There is a 'make all-binutils' command, but that also seems to try building in the bfd/doc directory. Apparently running configure with the --without-docdir option stops it trying to install the documentation. I don't know if it stops it trying to make it however. John 16:35, 13 September 2007 (CDT)
I checked my cygwin setup, and noticed texinfo is installed without me specifically selecting it, so it either is a dependency of one of the other packages I do have, or its installed by default. Since solar's regression test of removing, reinstalling, selecting the basic install + the packages listed always results in an environment that can build the crosscompiler, I don't think its an error in the tutorial. - Combuster 02:55, 14 September 2007 (CDT)
For those having problems building binutils without texinfo installed, run the configure step as normal. When that finishes, do this:
echo "MAKEINFO = :" >> Makefile
That command overrides the MAKEINFO variable in the Makefile, setting it to something that does not exist. This causes make to skip attempting to build (and subsequently install) the documentation. --quok 06:20, 26 August 2008 (UTC)Reply[reply]

Version Junkies...

Pretty impressive to see how GCC 4.5.0 is listed in the "compatibility matrix", when it has not even hit ftp.gnu.org yet... someone *is* eager to use the latest... ;-) -- Solar 07:52, 12 February 2010 (UTC)Reply[reply]