This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
GCC Extending: 'hello world' example or documents request.
- From: Ill iac <illiacmaillists at gmail dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Mon, 18 Jul 2011 23:13:57 +0200
- Subject: GCC Extending: 'hello world' example or documents request.
Hello GCC folk,
Recently I fel prey to my urge to plunge into a new field of development.
After looking around a bit in various projects (QEMU, Linux Kernel,
Various Drivers, Coteboot), I had a look at GCC.
For most of these projects I made a very small test (you know, one
that makes you smile like your first 'hello world').
During this time I got seriously intrested into GPL compatible Linux
Kernel Development.
But, just a kernel is not enough.. I wanted to learn a bit more about
the entity that compiles this kernel, yea you guessed it, the GNU
Compiler Collection.
And this I started my own little 'hello world' project for GCC.
Thus I wrote a Mission Statement, this mission statement said: "I want
to extend GCC with the function to use the #nop and #dbgbreak
preprocessors to implement nops and breaks in the application".
I know this can easily be done by the following code:
#ifndef nop
#if __x86__
#define nop asm("nop");
#endif
But I want more then that, I just want my own 'hello world' preprocessor.
I tried reading the sources and the documents but I got a bit dazed.
After reading about back-ends and plugins I was wondering what I'd
require for a objective as this?
And where can I find decent demo implementations of this or documentation?
I really hope that someone can point me at the right direction.
Kind regards,
--Illiac