Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > A Portable C Compiler

Reply
Thread Tools

A Portable C Compiler

 
 
Rob Kendrick
Guest
Posts: n/a
 
      09-18-2007
On Tue, 18 Sep 2007 22:33:15 +0200, jacob navia wrote:

> 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.
 
Reply With Quote
 
 
 
 
Flash Gordon
Guest
Posts: n/a
 
      09-18-2007
jacob navia wrote, On 18/09/07 21:33:
> Rui Maciel wrote:
>> jacob navia wrote:


<snip>

>> Once again, GCC is perfectly irrelevant to this subject. Why you keep on
>> whining about GCC is beyond me.

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

<snip>

>> Do you believe that taking less time to produce
>> non-optimised, bug-ridden code is in some way better than the heavily
>> optimised code that GCC generates or even the fact that it supports
>> dozens
>> of target platforms and 6 programming languages?
>>

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

>>>>> Naturally it is a nice feature but there
>>>> is absolutely no way it would ever be seriously considered for any
>>>> tradeoff.
>>>>
>>> Since they have the monopoly under linux, there is nothing
>>> anyone can do about that.

>>
>> Monopoly? What the hell are you talking about? No one forces anyone or
>> any
>> linux distro to adopt GCC nor anyone bars anyone from installing and
>> using
>> some other compiler on a linux distro.

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

>> Some companies even sell compilers
>> for linux.

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

>> Heck, some linux distros even compile their binaries with other
>> compilers such as Intel's. What on earth are you smoking?

>
> 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.
--
Flash Gordon
 
Reply With Quote
 
 
 
 
Rob Kendrick
Guest
Posts: n/a
 
      09-18-2007
On Tue, 18 Sep 2007 23:31:30 +0200, jacob navia wrote:

> 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.
 
Reply With Quote
 
CBFalconer
Guest
Posts: n/a
 
      09-18-2007
jacob navia wrote:
>

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

--
Chuck F (cbfalconer at maineline dot net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net>



--
Posted via a free Usenet account from http://www.teranews.com

 
Reply With Quote
 
jacob navia
Guest
Posts: n/a
 
      09-18-2007
Flash Gordon wrote:

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


As I said several lines before:
>> Intel is there though, but that is the only one. Never heard from
>> anyone else.


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.
 
Reply With Quote
 
Rui Maciel
Guest
Posts: n/a
 
      09-18-2007
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...


<snip/>

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


>>> Surely not. A fast compiler allows YOU to develop faster. And that is
>>> important. Gcc is not very fast, mind you.

>>
>> In order for the compiler speed to have any measurable impact on the
>> development speed, you have to compile your code on virtually every small
>> change you do in the code. If that is the case, you have bigger problems
>> to deal with than your compiler.
>>

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


<snip />

>>> A simpler compiler is surely easier to debug you see?

>>
>> Simpler, in the sense that it is virtually void of any feature like
>> optimisation, support for target platforms and for other languages beyond
>> C. It won't be of much use but it will be simpler to maintain.

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


>> Once again, GCC is perfectly irrelevant to this subject. Why you keep on
>> whining about GCC is beyond me.

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


>> Moreover, no one ever claimed that GCC was
>> the best compiler around or even the fastest.

>
> Yes, that would be really difficult.


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


<snip />

>>>>> Other people will have other priorities.
>>>> I don't believe that any developer will ever be willing to trade
>>>> quality code for a snappier build process.
>>> Quality of code? Gcc's code quality can be great when there is no bugs
>>> in the optimizer... When they are, as it is sadly very often the case,
>>> we have to use the debug version... And that code is quite bad.
>>>
>>> We get then the worst of both worlds: slow AND buggy.

>>
>>
>> Once again, GCC is perfectly irrelevant to this subject.
>> Nonetheless, let me get this straight. In your own words GCC does in fact
>> produce great code but if there happens to be a bug somewhere then GCC is
>> suddently terrible. Do you honestly believe that right now PCC, which is
>> void of any basic feature and plagued with bugs, is a better compiler
>> than GCC's C compiler?

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


>> Do you believe that taking less time to produce
>> non-optimised, bug-ridden code is in some way better than the heavily
>> optimised code that GCC generates or even the fact that it supports
>> dozens of target platforms and 6 programming languages?
>>

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


<snip />

>> Some companies even sell compilers
>> for linux.

>
> 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
 
Reply With Quote
 
jacob navia
Guest
Posts: n/a
 
      09-18-2007
Flash Gordon wrote:
> jacob navia wrote, On 18/09/07 21:33:
>> 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.
>


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

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


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

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


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

>> exactly like under windows

>


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.

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


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.

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


I do not support __cdecl.

 
Reply With Quote
 
Old Wolf
Guest
Posts: n/a
 
      09-18-2007
On Sep 19, 10:34 am, jacob navia <(E-Mail Removed)> wrote:
> >> 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.

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

 
Reply With Quote
 
A N Other
Guest
Posts: n/a
 
      09-18-2007
On 18 Sep 2007 at 22:32, Rui Maciel wrote:
> jacob navia wrote:
>> 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?


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.

 
Reply With Quote
 
jacob navia
Guest
Posts: n/a
 
      09-18-2007
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Most portable compiler: llvl llc or pcc or gcc rtl? Ir. Hj. Othman bin Hj. Ahmad C Programming 22 10-19-2012 07:34 PM
Portable (as in literally) C++ compiler/IDE? gordon.is.a.moron@gmail.com C++ 5 03-12-2007 11:19 PM
Portable Python - free portable development environment ! perica.zivkovic@gmail.com Python 7 01-13-2007 11:19 AM
portable (VHDL) vs. non-portable (altera LPM) approaches to signed computations Eli Bendersky VHDL 1 03-01-2006 02:43 PM
Compiler Error Message: The compiler failed with error code 128. Yan ASP .Net 0 07-21-2003 10:49 PM



Advertisments