cross compiler ?

Programming, for all ages and all languages.
User avatar
Sam111
Member
Member
Posts: 385
Joined: Mon Nov 03, 2008 6:06 pm

Re: cross compiler ?

Post by Sam111 »

In what area? Desktops? Servers? Embedded? Microcontrollers?
All of them
I am assuming for desktops x86/64 60% , AMD 30%, others 10%
Servers not sure but I know IBM is the leader here for supercomputers/servers , SGI another one.

Embedded? Microcontrollers?
Maybe arm, mips , m68k, avr , pic though I don't know the break down %

Anyway I do know alot of mobile phones use arm

curious to know if embedded devices like comcast cable modems , dvr's , blue ray players , sony radio's , tv's ,...etc use.

Are their arch that are used that are secret that the ISA is not even published for or chips sold for. Or can you always get a processor chip and ISA for it. Like if I opened up my cable modem could I send away for that chip/processor and get the ISA / programmer for it.
What I am getting at is their a large portion of embedded device using processors/chips that are not published and ISA that are not publish for them. So in theory even if somebody got a percentage for embedded devices the other/unknown % would be much higher defeating the classification purpose of embedded devices.
Last edited by Sam111 on Tue Mar 13, 2012 4:38 am, edited 1 time in total.
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re: cross compiler ?

Post by Solar »

Yoda wrote:In fact, distribution size doesn't prevent, does it? :)
If it makes the distro maintainers not using that option, it does effectively preventing you from getting such a package for your distro, doesn't it?
On the other hand, GCC includes frontends for different languages and nobody says: "Get rid of that junk, I'll use pure C!" :)
But why, it does! Quick check: Do you get gcj and gcd installed by default?
In fact I'd better say that libs and headers are not parts of compiler.
gcc hello_world.c -o a.out

You expect that to produce an executable, do you? You need crt0.o, the standard library, and its headers for that.

Of course it doesn't fall into the responsibility of the GCC maintainers to provide it. But it would fall into the responsibility of the distro maintainers, if they were to provide a GCC package that supports "all possible targets".
To be more precise - compiler, libs and headers are three components of a specific development kit. But compiler may be (and frequently is) used as standalone tool.
Guys, do a reality check. Virtually no one (present company excluded) is working with freestanding compilers.

Yes I know that OS developers do so. But in the big picture we don't matter.

Name one Linux distro that installs Bochs or QEMU by default. Because there is no significant demand.
Solar wrote:(Note that the GCC project itself doesn't distribute binaries at all; they distribute source and leave it up to the individual what kind of cross-platform, cross-language support is required.)
That's one of the drawbacks of GCC. I'd better prefer to have product that works out of box instead of spending much time digging lots of compilation options and guessing what to do to force compiler to work as I expect.
[/quote]

You might not have noticed, but about 90% of all Linux userspace projects don't provide binaries at all. That's the development mode: Upstream provides source, distributors create and package binaries.
Every good solution is obvious once you've found it.
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re: cross compiler ?

Post by Solar »

Sam111 wrote:I am assuming for desktops x86/64 60% , AMD 30%, others 10%.
And you expect others to take your definition and compile a chart for you, constantly updated just in case you want to look at it?

Quick, what's the market share of MSIE, Firefox, and Chrome?
Every good solution is obvious once you've found it.
User avatar
Sam111
Member
Member
Posts: 385
Joined: Mon Nov 03, 2008 6:06 pm

Re: cross compiler ?

Post by Sam111 »

close with firefox wining
chrome going up
I.E going down
and all the others negligible
but this chart was on the w3c site :)

never mind about the classification of cpu's and ISA stuff.
I see that this would change more then the browser / networking devices ,...etc
And would get to be to hard to track.
O well, I am a person that likes to classify things but I will have to give it up
to the sure fact that the times are a changing
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: cross compiler ?

Post by Combuster »

Sam111 wrote:close with firefox wining
All five counters I've checked say you're lying., W3Counter included.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
Yoda
Member
Member
Posts: 255
Joined: Tue Mar 09, 2010 8:57 am
Location: Moscow, Russia

Re: cross compiler ?

Post by Yoda »

Solar wrote:gcc hello_world.c -o a.out

You expect that to produce an executable, do you? You need crt0.o, the standard library, and its headers for that.
That's bad example, because output of a character is 100% OS specific. "memcpy" is better example, but as I wrote:
Yoda wrote:...with the exception of a very few headers and libs.
Solar wrote:You might not have noticed, but about 90% of all Linux userspace projects don't provide binaries at all.
I noticed that bad habit of GNU projects developers yet for a long time ago. Yes, I'm a spoilt child of ready-to-use packages :).
Yet Other Developer of Architecture.
OS Boot Tools.
Russian national OSDev forum.
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re: cross compiler ?

Post by Solar »

Yoda wrote:
Solar wrote:You might not have noticed, but about 90% of all Linux userspace projects don't provide binaries at all.
I noticed that bad habit of GNU projects developers yet for a long time ago. Yes, I'm a spoilt child of ready-to-use packages :).
If you consider it a "bad habit", you haven't understood the "distro" concept. At all. Try using Gentoo Linux for a while, and you will grow an understanding of the issues involved in maintaining a Linux distribution.

It's simply not the business of the GCC people to provide binaries for AmigaOS 4.0 on PPC Amigas, AmigaOS 4.0 on Classic Amigas, Fedora on Raspberry Pi, Arch on Raspberry Pi, Debian on Raspberry Pi, AIX 5.x on PowerPC, AIX 6.x on PowerPC, AIX 7.x on PowerPC, Fedora on PowerPC, Debian on PowerPC, SuSE on PowerPC, Solaris 8 on SPARC, Solaris 9 on SPARC, Solaris 10 on SPARC, Fedora (15 / 16 / 17) on IA32, Debian (6 / 7) on IA32, SuSE (11.4 / 12.1) on IA32, Fedora (15 / 16 / 17) on AMD64, Debian (6 / 7) on AMD64, SuSE (11.4 / 12.1) on AMD64, ...

It's not manageable.
Every good solution is obvious once you've found it.
User avatar
bubach
Member
Member
Posts: 1223
Joined: Sat Oct 23, 2004 11:00 pm
Location: Sweden
Contact:

Re: cross compiler ?

Post by bubach »

Erhm... Why would you change backend when compiling your OS? I've never used GCC, but please give me a valid reason for recompiling when it's the same computer hardware that's being targeted...? Omitting libs and changing binary format unsupported? :?
"Simplicity is the ultimate sophistication."
http://bos.asmhackers.net/ - GitHub
User avatar
JAAman
Member
Member
Posts: 879
Joined: Wed Oct 27, 2004 11:00 pm
Location: WA

Re: cross compiler ?

Post by JAAman »

valid reasons? how about so that your error messages, output, and commandline options are the same as everyone else, that way you can get help if its not working correctly

also:
makes it easier to self-host, eventually
ensures that people have the latest version of GCC (rather than the, sometimes quite old, version of GCC shipping with your distro)


granted, if you are an advanced expert, you may be able to use a targeted version of GCC (just like you could use a non-GCC compiler), but it is official forum policy that if you do so, you are assumed to be expert enough to solve all your own problems, and do not need any help from anyone on this forum with compiler issues


edit: btw, i also have never used GCC... so all i know about it is what I have heard from other people
User avatar
Yoda
Member
Member
Posts: 255
Joined: Tue Mar 09, 2010 8:57 am
Location: Moscow, Russia

Re: cross compiler ?

Post by Yoda »

Solar wrote:If you consider it a "bad habit", you haven't understood the "distro" concept. At all....
It's simply not the business of the GCC people to provide binaries for [all flavours of distros for all targets skipped :)]
It's not manageable.
Indeed, I understood. But that's a point of criticism of a whole Linux ideology, if only that Babel could be called "ideology" at all. People speak about freedom and create thousands of unmantainable forks and "distros". You claim about manageability, but in fact distribution of packages as sources is the only chance to keep a visibility of control over that spaghetti. :)
Yet Other Developer of Architecture.
OS Boot Tools.
Russian national OSDev forum.
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re: cross compiler ?

Post by Solar »

So far, so good. I actually agree with you, to a point - Linux needs less distros, not more.

But no other userspace is available on so diverse a range of platforms. No other userspace faces this issue. (No other userspace is this tempting for hobbyist OS developers to target.)

The only alternative would be a WORM approach, like Java or .NET. They really would like to go there, but no matter how bad the Unix environment might be, it has several decades of head start on those two, and the source-based approach simply works better in restricted environments where you cannot afford a Java VM...
Every good solution is obvious once you've found it.
User avatar
Yoda
Member
Member
Posts: 255
Joined: Tue Mar 09, 2010 8:57 am
Location: Moscow, Russia

Re: cross compiler ?

Post by Yoda »

Agreed. Actually, I don't like a multitude of architectures too. In fact, WORM approach adds a new virtual platforms instead of cutting down total amount of them. Also it hits performance in many cases. I hope, one day will appear a good universal hardware architecture that will dominate by natural selection over this Cambrian explosion that we can observe nowadays.
Yet Other Developer of Architecture.
OS Boot Tools.
Russian national OSDev forum.
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re: cross compiler ?

Post by Solar »

Yoda wrote:I hope, one day will appear a good universal hardware architecture that will dominate by natural selection...
You know that Darwin's "survival of the fittest" is usually misunderstood, especially in the English speaking world?

He didn't mean "fit" as in lean, powerful, performing, beautiful, good-looking, a pleasure to be with.

He meant "fit" as in "best adapted to the environment", and that means that ugly chimeras like the x86_64 are actually darwinist success stories...
Every good solution is obvious once you've found it.
User avatar
Yoda
Member
Member
Posts: 255
Joined: Tue Mar 09, 2010 8:57 am
Location: Moscow, Russia

Re: cross compiler ?

Post by Yoda »

:D :D :D
Then let it be "Selection of Good Will".
Yet Other Developer of Architecture.
OS Boot Tools.
Russian national OSDev forum.
Post Reply