A Portable C Compiler

R

Rob Kendrick

This is normal for me.

A build after 10 minutes is quite normal when I am developing. Maybe
more. I made a typing mistake, and discover that at link time...
or, I misspelled a variable, or called the wrong function, then you
correct and build again. A normal thing...

Just a minute - surely you only have to do this if you typo in a header?
Or is your build system screwed? Or perhaps you keep code in headers?

(Otherwise only the file you changed generally needs to be rebuilt,
depending on your dependency tree.)

B.
 
F

Flash Gordon

jacob navia wrote, On 18/09/07 21:33:
I am not "whinning", this is just a problem of the GCC "support" people.
They think that they can forget their "customers" because they offer
their software for free. I have never treated people pointing me the
bugs in the compiler as "whinners".

When people here have pointed out bugs in your implementation you have
certainly not taken it well. Look at how much work everyone had to put
in before you admitted that you needed to use parenthesis on numeric
constants in limits.h, and even then you did not seem pleased about
fixing it.

1) I do not care about 4 from those 6 languages. I program in C, and the
company uses C++.
2) Maybe is great that GCC supports many platforms but (for instance)
under AIX is unusable because of too many bugs, we had to use IBM's
AIX compiler. Under Solaris the situation is similar. We use Sun's
compiler. And those are company decisions, not mine.

Well, we have a large company in the UK running SW daily with hundreds
of users that I've been building with gcc on AIX for the last few years.
I did once hit a bug with gcc specific to AIX, but it had already been
fixed in a later version by then.
Look.
Did you know that /usr/lib/libc.so is not a binary shared library?
NO!

It is an ASCII LINKER SCRIPT for GNU's "ld"...

So? That is not part of gcc and the actual C library is available as a
shared object, check /lib/libc.so.6. That is two reasons why your
argument here is rubbish.
Ahhh you do not use "ld"?

What has that got to do with whether you are using gcc? ld is a seperate
product which gcc happens to use.
Then you are doomed stupid!

Most of the headers and system headers under linux are full of
__attribute__ etc etc etc!

I have ported lcc-win to linux and I can tell you that I had to write
my own headers,

So? When gcc is built it goes through a lot of hoops to create suitable
headers based on whatever the system provides.
exactly like under windows

So why complain it is a gcc problem?
with the BIG difference that
with Microsoft it is still possible to use the windows SDK headers.

What you mean is you support the extensions MS use in their headers but
you don't support the extensions used in the headers shipped with glibc.
glibc is another seperate product by the way, and not part of gcc.
Under linux if you do not support __attribute__ you are doomed.

By the same argument under Windows you are doomed if you don't support
__cdecl or whatever it is that MS use in all their headers.
Borland tried ... Where are they now?

Over here http://www.codegear.com/ although they have stopped the Linux
port now. However, I would not have chosen their compiler for serious
work on Windows either.
Intel is there though, but that is the only one. Never heard from anyone
else.

What about you, or don't you count? I also listed a couple of others in
my other post. In any case, one alternative shows it is not a monopoly,
especially as the Intel compiler is designed to be compatible with gcc.
Yeah I stopped somking some years ago.

Bad decision, it was a good defense against getting excited about this
kind of stuff.

You haven't answered the point about there being complete distributions
built with other than gcc.
 
R

Rob Kendrick

Of course, only one file is rebuilt. But there is always the link step,
what is not fast really, specially with BIG projects.

Woah, 10 minutes of *linking* ? I think it's time you investigate making
your build system suck less.

B.
 
C

CBFalconer

jacob said:
.... snip ...

Each time you make a change in C you have to rebuild. for many
projects, a change can affect a lot of files. Global changes that
need a full recompilation are done not VERY often, but they are
done...

This means that a compiler that slows down the development process
by just 30-60 seconds per build, it is taking between 15-30
minutes per day to each developer...

To me, the requirement for such a long routine compile indicates
mis-organization. Normally you would only be modifying one source
file, and the rebuild should be limited to recompiling that and
relinking. Sometimes the associated .h file may need revision, and
then (rarely) the work can become considerably larger. So in
general the compilation should not be a problem, however the
linking may be.
 
J

jacob navia

Flash said:
You haven't answered the point about there being complete distributions
built with other than gcc.

As I said several lines before:
Yes, Intel has the resources to throw into something like that. It has
developed a "gcc clone" mode, where it even copies the command line
options of gcc.
 
R

Rui Maciel

jacob navia wrote:

A build after 10 minutes is quite normal when I am developing. Maybe
more. I made a typing mistake, and discover that at link time...
or, I misspelled a variable, or called the wrong function, then you
correct and build again. A normal thing...

Yeah. You do not do as many builds, never do typing mistakes etc.
Great!

Oh I do and I do a lot of them. Yet, we aren't talking about the occasional
compilation but complete project rebuilds. Unless you happen to touch every
single source file in the project or happen to edit that one file which is
a dependency of everything else, no one has the need to perform a complete
project rebuild each and every 10 minutes.

Well, unless your project is very small, which again will not lead to any
relevant difference in the compile times.

It is not good to use the compiler too much... or what?

If, as was stated, all developers were forced to do a complete project
rebuild every 10 minutes (the presented case) then I believe that it is
safe to say that there would be something very wrong with that project.

Nobody said that GCC is a "piece of crap". In my original message I even
doubted that PCC will stay as simple with 10 supported platforms. You are
exaggerating to bring the discussion into an emotional battle, what is
quite an error. Let's discuss without getting excited OK?

There is no exaggeration. If you read your message you notice that, while
trying to make the case for PCC by comparing it to GCC, you repeatedly
claimed that GCC was slow and buggy. A compiler which is both slow and
buggy is not a decent compiler.


Yeah, if it compiles C it is of no much use, I know.

But maybe it *could* be that *some* people *like* C you see?

Sarcasm aside, no one has ever stated that no one liked C. As this very
thread is taking place in a newsgroup dedicated to the C programming
language, that insinuation is rather amusing. Were you trying to fan the
flames?

About the comment, PCC's simplicity was pointed out as one of it's strong
points. I pointed out that it's simplicity comes with a cost: the absence
of features like optimisation and support for multiple programming
languages and multiple target platforms. Obviously a compiler which
supports a large number of target platforms and multiple programming
languages and to top thing up optimises the code (along with a few other
features) is of more use than a compiler which only supports a hand full of
platforms and can only work with a single programming language. That added
value comes with a cost.

I am not "whinning", this is just a problem of the GCC "support" people.
They think that they can forget their "customers" because they offer
their software for free. I have never treated people pointing me the
bugs in the compiler as "whinners".

And on you go with the whining. Listen, GCC is perfectly irrelevant to this
subject. The subject is PCC, not GCC. Why do you keep on dragging GCC into
a discussion about PCC? Are PCC's problems suddenly gone if you compare it
to GCC? If you repeatedly whine about GCC being slow and buggy does that
make PCC faster and less buggy? Does PCC suddenly become a better compiler
with your attempts at smearing GCC?

Obviously not. So why do you insist?

Moreover, your reasoning doesn't suddenly make sense nor becomes valid if
you try to label those who disagree with you and point out the flaws in
your reasoning as being "the GCC support people", specially if they even
weren't the ones dragging GCC into this discussion.

Yes, that would be really difficult.

No, PCC didn't improved a bit due to that comment.


Well, it compiled ssh, and many other utilities. "Plagued with bugs" is
your own imagination.

You avoided answering the question. Should I ask it again?

1) I do not care about 4 from those 6 languages. I program in C, and the
company uses C++.
2) Maybe is great that GCC supports many platforms but (for instance)
under AIX is unusable because of too many bugs, we had to use IBM's
AIX compiler. Under Solaris the situation is similar. We use Sun's
compiler. And those are company decisions, not mine.

Again, you avoided the question. Should I ask it again?


Borland tried ... Where are they now?
Intel is there though, but that is the only one. Never heard from anyone
else.

The thing is, Intel's compiler is regarded as one of the best compilers, if
not the very best. Yet, in the last benchmark that I've seen that compares
ICC with GCC (it pins ICC 8.1 against GCC 3.3.5, 3.4.3 and 4.0.0) it isn't
that much better. It largely outperforms GCC on compile times but in
executable size and runtime/performance, it largely evens out. So if the
difference between the compiler produced by the company that makes the
processors and the free alternative is, to a large degree, irrelevant then
it is safe to say that there isn't a whole lot of market for compilers.


Rui Maciel
 
J

jacob navia

Flash said:
jacob navia wrote, On 18/09/07 21:33:

So? That is not part of gcc and the actual C library is available as a
shared object, check /lib/libc.so.6. That is two reasons why your
argument here is rubbish.

OK. You find normal that the system library uses an ASCII script for a
specific linker. If Microsoft would have done that, nobody could
link under windows without using their linker...
What has that got to do with whether you are using gcc? ld is a seperate
product which gcc happens to use.

A developer uses the whole chain:
compiler --> assembler-->linker-->debugger.
So? When gcc is built it goes through a lot of hoops to create suitable
headers based on whatever the system provides.

Yes. They are no better than Microsoft or IBM. Just the same.
Yes

So why complain it is a gcc problem?

I do not complain. I say that they have the monopoly. I do not complain
about Microsoft. I just say that they have a windows monopoly.
What you mean is you support the extensions MS use in their headers but
you don't support the extensions used in the headers shipped with glibc.

I only support stdcall. No other MS extension is supported unless it is
generally useful like dllexport/import.
glibc is another seperate product by the way, and not part of gcc.

Yes, sure.
By the same argument under Windows you are doomed if you don't support
__cdecl or whatever it is that MS use in all their headers.

I do not support __cdecl.
 
O

Old Wolf

A developer uses the whole chain:
compiler --> assembler-->linker-->debugger.

"ld" has nothing to do with GCC. GCC does not
distribute with an assembler, nor with a linker.
Often "ld" is a proprietary product.

You are complaning about slow link times. That is
the fault of your choice of linker, not of GCC.
 
A

A N Other

Sarcasm aside, no one has ever stated that no one liked C. As this very
thread is taking place in a newsgroup dedicated to the C programming
language, that insinuation is rather amusing. Were you trying to fan the
flames?

Gee, do you reckon? Jacob's whole modus operandi in this group is to be
completely unreasonable, get people really riled up, and then when they
react he plays the victim - "everyone's picking on me!"

Look at this thread. It serves absolutely no purpose except for Jacob to
spread a load of FUD about gcc.

Jacob obviously thinks the world owes him a living because he took
someone else's compiler, knocked up a pretty GUI IDE to go with it, and
repackaged it as a commercial product. It's clear from his postings to
this group over several years that he doesn't have the first beginnings
of a clue about C - he's not just a social pariah, he's technically
inept to go with it.

This group would be a better place if Jacob would stop posting to it and
leave us all in peace.
 
J

jacob navia

A N Other wrote:
[snip]

The *only* messages you post in this group are long messages
of despair about "jacob"...

I must be really important to you my dear, what an interest
for my humble person.

Have a nice time and next time do not be afraid.

Just post with your correct name as I do. Nothing will
happen to you.

jacob
 
M

Mark McIntyre

OK. You find normal that the system library uses an ASCII script for a
specific linker.

The point is, you were criticising gcc, and this isn't part of it.
Your argument was consequently nonsense.
If Microsoft would have done that, nobody could
link under windows without using their linker...

Nonsense. All your linker has to do is parse the script. Even easier,
do as cygwin do, and provide your own standard library.
A developer uses the whole chain:

Again, so what? If you attack a tool, don't blame the tool for flaws
in someone else's product.

"My mother was injured in the Pamplona bull run. I blame the gas
board."
I do not support __cdecl.

Then by your own logic, you are doomed, right?
--
Mark McIntyre

"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it."
--Brian Kernighan
 
U

user923005

That depends on in what manner you are trying to compete. It is true that it
seems unlikely that PCC will be able to generate as good code as GCC anytime
in the near future. On the other hand it should not be very difficult to
compete with GCC with regards to compile time and memory usage needed by the
compiler (areas in which GCC is not very good.)

For people trying to do development on older machines these features can be worth
much more than having the generated code run 0.5% faster.

GCC works great as a cross compiler. Why work on some crusty old
platform?
Other people will have other priorities.

[snip]
 
K

Keith Thompson

A N Other said:
Jacob obviously thinks the world owes him a living because he took
someone else's compiler, knocked up a pretty GUI IDE to go with it, and
repackaged it as a commercial product.
[...]

jacob has claimed here that lcc-win32 is a complete rewrite of lcc,
and that little or no original lcc source code remains.

I have no basis on which to judge the accuracy of that claim.
 
R

Richard Heathfield

Keith Thompson said:
A N Other said:
Jacob obviously thinks the world owes him a living because he took
someone else's compiler, knocked up a pretty GUI IDE to go with it, and
repackaged it as a commercial product.
[...]

jacob has claimed here that lcc-win32 is a complete rewrite of lcc,
and that little or no original lcc source code remains.

I have no basis on which to judge the accuracy of that claim.

Simply compare it to the accuracy of all his other claims.

Since I killfiled Mr Navia, people have stopped complaining at me for
arguing with him all the time. I am not ungrateful for this. I have
noticed, however, a marked increase in the rate with which *other people*
are arguing with him. When you sack firefighters, you should expect more
fires.

I would be interested in hearing people's justifications for arguing with
Mr Navia, given that I was often criticised for so doing.
 
F

Flash Gordon

jacob navia wrote, On 18/09/07 23:27:
As I said several lines before:

Yes, Intel has the resources to throw into something like that. It has
developed a "gcc clone" mode, where it even copies the command line
options of gcc.

Therefore gcc does *not* have the monopoly you were claiming it has.
 
F

Flash Gordon

jacob navia wrote, On 18/09/07 23:34:
OK. You find normal that the system library uses an ASCII script for a
specific linker.

They also provide the ACTUAL C library if you want to use it. They also
provide a linker you can use. You can also see how the damn thing works
so you can write your linker to use it if you want.
If Microsoft would have done that, nobody could
link under windows without using their linker...

You have to either use the Microsoft linker or write your own compatible
with it or provide your own C library. The ONLY difference with Linux is
that the linker is actually provided free and installed already on most
systems.
A developer uses the whole chain:
compiler --> assembler-->linker-->debugger.

Well, not everyone uses an assembler. However, if we ignore that you are
forgetting how things work there is still the point that gcc is is NOT a
linker nor is it a debugger. So what are you complaining about, just gcc
which is all you initially mentioned, gcc and GNU ld, or the debugger as
well, or what?
Yes. They are no better than Microsoft or IBM. Just the same.

I think you will find that the headers for all C libraries use
implementation specific tricks. For a start, offsetof cannot be
implemented *without* using implementation specific tricks. So EVERY
provider of implementations including *you* is guilty. So what on earth
are you complaining about?

So why raise it as a problem with gcc?
I do not complain. I say that they have the monopoly. I do not complain
about Microsoft. I just say that they have a windows monopoly.

You are wrong. See all the stuff you have just read including the posts
you have replied to pointing out there are complete distributions built
*without* gcc.
I only support stdcall. No other MS extension is supported unless it is
generally useful like dllexport/import.


Yes, sure.

So why raise things about glibc as complaints about gcc?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
I do not support __cdecl.

Since I EXPLICITLY cover that I might not have remembered what MS use
why not address the obvious and real point, namely that you DO support
whatever extension it is that MS use.
 
I

Ian Collins

As a reverse example, OpenSolaris builds with Sun cc and gcc.
As I said several lines before:

Yes, Intel has the resources to throw into something like that. It has
developed a "gcc clone" mode, where it even copies the command line
options of gcc.

As does Sun Studio. Before too long, we'll have non-standardised, but
near universal compiler options, which makes porting a heck of a lot
easier. Just goes to show what happens one one compiler dominates a sector.
 
J

Jean-Marc Bourguet

Flash Gordon said:
Personally I've hit very few bugs in gcc. They do exist but I don't hit
them often enough to worry about.

I've been hit by about the same number of bugs in gcc than in other
compilers we use. Very few. I've been far more often explained to someone
that, no it wasn't a bug in the compiler, it is a bug in the program.
No gcc does not have a monopoly under Linux. There is tcc, although that
is still flagged as experimental on Ubuntu, Tendra and of course Intel's
icc.

There is also
- lcc
- the compiler of SunStudio (which claims C99 compliance -- I've not
checked and don't remember if it comes with a compliant library or use glibc)
- the C compiler of Comeau (which use gcc as back end, and also claims
C99 compliance but use glibc).
- IBM xlC is also available for Linux according to the web pages, I don't
know if they support x86
- Open64

I'm probably missing some. And I'm pretty sure that if pcc does bring
something, somebody will port it to Linux.

But it is true that most people and even compagnies use gcc.
 
J

Jean-Marc Bourguet

Rui Maciel said:
Once again, GCC is perfectly irrelevant to this subject. Why you keep on
whining about GCC is beyond me. Moreover, no one ever claimed that GCC was
the best compiler around or even the fastest. The claim that was made was
that the "people building on old machines" claim is perfectly irrelevant,
knowing that any system sold in the past 3 or 4 years is more than capable
of doing a decent build job.

In the case of OpenBSD and NetBSD distributions, they target things which
where already outdated 10 years ago (vaxes were still sold 10 years ago but
I'd have problem to say they were current at that time).

Yours,
 
J

Jean-Marc Bourguet

jacob navia said:
Yes, Intel has the resources to throw into something like that. It has
developed a "gcc clone" mode, where it even copies the command line
options of gcc.

That's the think everybody does when there is a big player in a market: be
as compatible -- sometimes even bug compatible -- with it. That's not the
same as having a monopoly.

Yours,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,813
Latest member
lawrwtwinkle111

Latest Threads

Top