Re: How to add new library into GCC source

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear Ian,
Thanks for your help and I'm sorry because of providing less information for you. I have only one *.h file; in this file I define a struct A and a variable which has A type. I use this variable in many other files. I see this variable is like as the targetm variable. How do I do to make GCC understand this declaration. 
Thank you very much.
Best regards,

Le Ton Chanh 
email:letonchanh at yahoo dot com


--- On Tue, 12/2/08, Ian Lance Taylor <iant@xxxxxxxxxx> wrote:

> From: Ian Lance Taylor <iant@xxxxxxxxxx>
> Subject: Re: How to add new library into GCC source
> To: "Le Ton Chanh" <letonchanh@xxxxxxxxx>
> Cc: "GCC Help" <gcc-help@xxxxxxxxxxx>
> Date: Tuesday, December 2, 2008, 10:32 PM
> Le Ton Chanh <letonchanh@xxxxxxxxx> writes:
> 
> > I added a new C library (*.h file) into GCC source in
> directory
> > $(GCC_ROOT)/gcc and it is used in haifa-sched.c and
> final.c. But
> > when I built GCC, it warmed "undefined reference
> to ...". How can I
> > fix this?
> 
> Impossible to say with the amount of information you
> provided.  Is
> there a new .c file?  Did you add the corresponding .o file
> to
> OBJS-common in gcc/Makefile.in, or whereever it should go?
> 
> > The second question, I want to add 'nop'
> instruction after an
> > instruction in assembly source file generated by cc1
> when the
> > schedule queued for 1 cycles for the insn
> respectively. Does GCC
> > support that?
> 
> Sure, but it's not trivial to implement.  The MIPS
> backend does stuff
> like that when compiling for the MIPS 1 ISA.  It's done
> in the machine
> reorg pass.  The code is in config/mips/mips.c, in
> mips_reorg_process_insns.
> 
> > I am using GCC 3.3.4. Thanks in advance.
> 
> That is quite old by now.
> 
> Ian


      

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux