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: How to add new library into GCC source


Le Ton Chanh <letonchanh@yahoo.com> 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 Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]