OSDev.org

The Place to Start for Operating System Developers
It is currently Fri Apr 19, 2024 8:20 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 11 posts ] 
Author Message
 Post subject: Errors & Suggestions for GCC Cross Tut
PostPosted: Fri Nov 23, 2012 4:49 am 
Offline
Member
Member

Joined: Wed Jan 11, 2012 6:10 pm
Posts: 193
Noticed an error in the requirements section:

Quote:
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".


Top
 Profile  
 
 Post subject: Re: Errors & Suggestions for GCC Cross Tut
PostPosted: Fri Nov 23, 2012 6:01 am 
Offline
Member
Member
User avatar

Joined: Wed Dec 01, 2010 3:41 am
Posts: 1761
Location: Hong Kong
You can pass --disable-werror to configure instead of messing CFLAGS, this is also known issue when building on mac.


Top
 Profile  
 
 Post subject: Re: Errors & Suggestions for GCC Cross Tut
PostPosted: Fri Nov 23, 2012 1:50 pm 
Offline
Member
Member

Joined: Thu Mar 25, 2010 11:26 pm
Posts: 1801
Location: Melbourne, Australia
SoulofDeity wrote:
Noticed an error in the requirements section:

Quote:
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 ?


Top
 Profile  
 
 Post subject: Re: Errors & Suggestions for GCC Cross Tut
PostPosted: Fri Nov 23, 2012 2:29 pm 
Offline
Member
Member

Joined: Wed Jan 11, 2012 6:10 pm
Posts: 193
gerryg400 wrote:
SoulofDeity wrote:
Noticed an error in the requirements section:

Quote:
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 ?


Quote:
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.


Top
 Profile  
 
 Post subject: Re: Errors & Suggestions for GCC Cross Tut
PostPosted: Sun Nov 25, 2012 2:18 am 
Offline
Member
Member

Joined: Wed Jan 11, 2012 6:10 pm
Posts: 193
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...


Top
 Profile  
 
 Post subject: Re: Errors & Suggestions for GCC Cross Tut
PostPosted: Sun Nov 25, 2012 3:18 am 
Offline
Member
Member
User avatar

Joined: Wed Dec 01, 2010 3:41 am
Posts: 1761
Location: Hong Kong
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.


Top
 Profile  
 
 Post subject: Re: Errors & Suggestions for GCC Cross Tut
PostPosted: Sun Nov 25, 2012 4:10 am 
Offline
Member
Member
User avatar

Joined: Sat Jul 30, 2011 10:07 am
Posts: 374
Location: Wrocław/Racibórz, Poland
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


Top
 Profile  
 
 Post subject: Re: Errors & Suggestions for GCC Cross Tut
PostPosted: Sun Nov 25, 2012 11:45 am 
Offline
Member
Member

Joined: Wed Jan 11, 2012 6:10 pm
Posts: 193
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.


Top
 Profile  
 
 Post subject: Re: Errors & Suggestions for GCC Cross Tut
PostPosted: Sun Nov 25, 2012 12:27 pm 
Offline
Member
Member
User avatar

Joined: Wed Dec 01, 2010 3:41 am
Posts: 1761
Location: Hong Kong
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.

Quote:
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?


Top
 Profile  
 
 Post subject: Re: Errors & Suggestions for GCC Cross Tut
PostPosted: Sun Nov 25, 2012 3:32 pm 
Offline
Member
Member
User avatar

Joined: Tue Oct 17, 2006 9:29 pm
Posts: 2426
Location: Canada
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.


Top
 Profile  
 
 Post subject: Re: Errors & Suggestions for GCC Cross Tut
PostPosted: Sun Nov 25, 2012 10:02 pm 
Offline
Member
Member

Joined: Wed Jan 11, 2012 6:10 pm
Posts: 193
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 57 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group