This is the mail archive of the gcc@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: [Steven Woody] M16C development using GCC, Is It Possible?


DJ Delorie <dj@redhat.com> writes:

>> > To compile for the m16c specifically, use "m32c-elf-gcc -mcpu=m16c ..."
>> 
>> thanks. is that a 4.02 option? i can not find them on my 3.4 gcc man page.
>
> The r8c/m16c/m32c port is new.  Currently, it's only in the mainline
> CVS sources, and will be "officially" released in the gcc 4.1 series.
>
>> > gdb and a simulator are still in progress.
>> 
>> that seem ok since i currently only need gcc.
>
> You'll need binutils also, at least, and probably newlib to get crt0
> and some sample libraries and linker scripts.

where to get the binutils and other stuff you mentioned? are they included in
current CVS?

>
>> and, because i am new to the field , i want to ask, what is a
>> 'simulator'? run target excutable on host computer?
>
> Yes.
>
>> > That's a different attempt to port gcc to m16c, and has nothing to do
>> > with what I did.
>> 
>> sorry, are you the author of the new m16c/gcc code? i noticed your
>> domain name is redhat.
>
> I am one of the authors, and the current maintainer.
>
>> do you mean, the current m16c/gcc code never compiler c++ code?
>
> No, it just means I haven't tried it recently.  It mostly worked back
> when I was working in that area, but "mostly" wasn't good enough for
> what I was doing, so I just skipped it, as I didn't need C++ back
> then.

might there is anyone else tried it. but i think i will be the one ...

>
>> C++). though you pointed that i could build for my self, but in fact
>> i can not, i know nothing about compiler writing :(
>
> Compiler building, not compiler writing.  I already did the writing part.
>
>> so, i am thinking another question. if i can write the code which
>> can pass both the current (3.4) g++ compiler and the IAR M16C C++
>> compiler, so my problem will resolved. but is it possible of the
>> idea? i think i can use some #ifdef statements and move any IO into
>> stubs. how different are these two compilers in C++ syntax?
>

> The pragmas for assigning addresses to I/O variables are different,
> but it's only a header change to get them working with gcc.  Note that

okay, it's a good news.

> g++'s C++ is much more strict and current than most other C++
> compilers; it's likely you'll have to fix your code to get it to work,
> but this would be due to code bugs and not g++ bugs if so.

i plan to write in g++ from scratch. so its strictness is a good news and it
will make life easy when i later compile on IAR's compiler, do i rightly understand?

-- 
steven woody (id: narke)

How Far You Fall Doesn't Matter, It's How You Land

	- Haine, La (1995)


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