This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Tiny GCC: Pure, Unadulterated, Object Code


On 25 Jan 2008, at 11:48 PM, Brian Dessent wrote:

Michael Witten wrote:

I still don't understand why gcc imposes these libraries, when they
have nothing to do with compilation. It just seems like bad design.

You can't divorce a compiler from the target. The target's ABI specifies a great number of details that are very much relevant to the compiler, such as:

- calling conventions
- how assembler names are decorated
- size of pointers
- how SIMD and floating registers are passed and saved/restored
- alignment of the stack
- struct and bitfield padding
- register used for PIC and how PIC code is generated
- how TLS variables are created and accessed
- method for unwinding the stack for exception handling
- accessing shared variables and calling into shared libraries
- etc.

As an example I present Linux (ELF) and Windows (PE). These both run on
identical ia32 and x64 hardware. But they could not be more different
in a number of the above.

What you describe is not related to compilation to an intermediate language, which is all distcc really requires.

However, you seem to have an impressive breadth of knowledge--one that
I'd like to have!


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]