Errors & Suggestions for GCC Cross Tut

All about the OSDev Wiki. Discussions about the organization and general structure of articles and how to use the wiki. Request changes here if you don't know how to use the wiki.
Post Reply
SoulofDeity
Member
Member
Posts: 193
Joined: Wed Jan 11, 2012 6:10 pm

Errors & Suggestions for GCC Cross Tut

Post by SoulofDeity »

Noticed an error in the requirements section:
MinGW + MSYS is an option, and as it addresses the native Windows API instead of a POSIX emulation layer, results in a slightly faster. Some...
Also, I wanna suggest adding "CFLAGS=-Wno-error" to the "make" lines for building binutils and gcc, and point out that when using binutils-2.22, there's an error in "binutils/dwarf.c" in the function dwarf_select_sections_by_letters() that can be fixed by replacing "optarg" with "letters".
User avatar
bluemoon
Member
Member
Posts: 1761
Joined: Wed Dec 01, 2010 3:41 am
Location: Hong Kong

Re: Errors & Suggestions for GCC Cross Tut

Post by bluemoon »

You can pass --disable-werror to configure instead of messing CFLAGS, this is also known issue when building on mac.
gerryg400
Member
Member
Posts: 1801
Joined: Thu Mar 25, 2010 11:26 pm
Location: Melbourne, Australia

Re: Errors & Suggestions for GCC Cross Tut

Post by gerryg400 »

SoulofDeity wrote:Noticed an error in the requirements section:
MinGW + MSYS is an option, and as it addresses the native Windows API instead of a POSIX emulation layer, results in a slightly faster. Some...
What's the error ?
If a trainstation is where trains stop, what is a workstation ?
SoulofDeity
Member
Member
Posts: 193
Joined: Wed Jan 11, 2012 6:10 pm

Re: Errors & Suggestions for GCC Cross Tut

Post by SoulofDeity »

gerryg400 wrote:
SoulofDeity wrote:Noticed an error in the requirements section:
MinGW + MSYS is an option, and as it addresses the native Windows API instead of a POSIX emulation layer, results in a slightly faster. Some...
What's the error ?
MinGW + MSYS is an option, and as it addresses the native Windows API instead of a POSIX emulation layer, results in a slightly faster <missing noun>. Some...
The CFLAGS=-Wno-error or --disable-werror option is also needed to build with MinGW.
SoulofDeity
Member
Member
Posts: 193
Joined: Wed Jan 11, 2012 6:10 pm

Re: Errors & Suggestions for GCC Cross Tut

Post by SoulofDeity »

I hate to double post, but this is a different question here, why don't people just upload an already built cross compiler instead of expecting noobs to do it?

Here's the one I built. Specs:
  • Host: Windows 32-bit
  • Target: i586-elf
  • Built With: MinGW (no cygwin dll dependency :P)
  • Extra Libraries: libgcc
Download Here

If you're worried about it being malware or something, someone can do a virus check. Just trying to make life easier is all...
User avatar
bluemoon
Member
Member
Posts: 1761
Joined: Wed Dec 01, 2010 3:41 am
Location: Hong Kong

Re: Errors & Suggestions for GCC Cross Tut

Post by bluemoon »

SoulofDeity wrote:I hate to double post, but this is a different question here, why don't people just upload an already built cross compiler instead of expecting noobs to do it?
Somehow it is expected one to be able to deal with the toolchain himself/herself as OS developer.
Furthermore, who's going to host the build for infinite number of { host platform x target platform x binutil version x gcc version } ? Not to add llvm to the matrix yet.
User avatar
Griwes
Member
Member
Posts: 374
Joined: Sat Jul 30, 2011 10:07 am
Libera.chat IRC: Griwes
Location: Wrocław/Racibórz, Poland
Contact:

Re: Errors & Suggestions for GCC Cross Tut

Post by Griwes »

What bluemoon said, plus:

We don't expect *noobs* to do it, we expect everyone to be able to read English ("Languages" point in Required Knowledge) and to be able to think. It's not hard. And building the cross compiler doesn't take much time on any sane (= modern) hardware.

Also stop using word "noob" as synonymous to "newbie"; they have completely different meaning. We don't want noobs here, but newbies with problems other than "I can't read, can you read that for me?" or "I know the solution you gave me, but I explicitly stated I don't want it!" are welcome.
Reaver Project :: Repository :: Ohloh project page
<klange> This is a horror story about what happens when you need a hammer and all you have is the skulls of the damned.
<drake1> as long as the lock is read and modified by atomic operations
SoulofDeity
Member
Member
Posts: 193
Joined: Wed Jan 11, 2012 6:10 pm

Re: Errors & Suggestions for GCC Cross Tut

Post by SoulofDeity »

By 'noobs' I was referring to people who are just getting started in os development. Wrong term I guess, but still you wouldn't need to host infinite number gcc toolchains. It's pretty much safe to assume that they're going to be using Windows, Mac, or Linux, and be targeting either i586-elf, x86_64-elf, or arm-elf, or ppc-elf.

That's only 12 toolchains, and if you factor in that people using Window's and Linux most likely won't be targeting arm-elf or ppc-elf, its really only 8 toolchains. I'm not saying they shouldn't learn how to port it because it's a necessity down the road, I just think it would be best if beginners were able to focus more on what they're wanting to do than preparation.
User avatar
bluemoon
Member
Member
Posts: 1761
Joined: Wed Dec 01, 2010 3:41 am
Location: Hong Kong

Re: Errors & Suggestions for GCC Cross Tut

Post by bluemoon »

SoulofDeity wrote:By 'noobs' I was referring to people who are just getting started in os development. Wrong term I guess, but still you wouldn't need to host infinite number gcc toolchains. It's pretty much safe to assume that they're going to be using Windows, Mac, or Linux, and be targeting either i586-elf, x86_64-elf, or arm-elf, or ppc-elf.

That's only 12 toolchains, and if you factor in that people using Window's and Linux most likely won't be targeting arm-elf or ppc-elf, its really only 8 toolchains. I'm not saying they shouldn't learn how to port it because it's a necessity down the road, I just think it would be best if beginners were able to focus more on what they're wanting to do than preparation.
1. There are people using PE format
2. There are more than one linux (ubuntu family, debian family, red hat family, etc) that do not execute the same binary due to different dependency libraries.
3. Some people are playing with MIPS (eg. those runs on router)
4. As noted above, there are multiple versions of binutil and gcc available
5. Some people also integrate their own libc (or libgloss) into gcc
6. Some people does not use gcc at all, but llvm or watcom

In short, you may cover a certain number of builds, but you can never fits all need, and that due to it's quite easy and quick to build one, nobody bothered to give / download binaries, since maintaining the updates for tens of builds is proven to be messy headache.
I just think it would be best if beginners were able to focus more on what they're wanting to do than preparation.
Come on, it take no time at all to follow exactly the step on the wiki, and takes about half an hour to build it. If you have a build script it can be done in 70 seconds. Do it really draw any focus or consume any effort?
User avatar
Brynet-Inc
Member
Member
Posts: 2426
Joined: Tue Oct 17, 2006 9:29 pm
Libera.chat IRC: brynet
Location: Canada
Contact:

Re: Errors & Suggestions for GCC Cross Tut

Post by Brynet-Inc »

There is nothing preventing someone from searching for a precompiled cross-compiler themselves, but providing binaries here is a mistake.

If they can't read instructions or use a search engine, are you truly helping?
Image
Twitter: @canadianbryan. Award by smcerm, I stole it. Original was larger.
SoulofDeity
Member
Member
Posts: 193
Joined: Wed Jan 11, 2012 6:10 pm

Re: Errors & Suggestions for GCC Cross Tut

Post by SoulofDeity »

Brynet-Inc wrote:There is nothing preventing someone from searching for a precompiled cross-compiler themselves, but providing binaries here is a mistake.

If they can't read instructions or use a search engine, are you truly helping?

Idk, I just my personal opinion.
Post Reply