Help needed in adding a library function in gcc

Swati swatirathi@cse.iitb.ac.in
Sat Oct 8 10:51:00 GMT 2011


Hello,

I have created a static library libdump.a for file dump.c as below :
gcc -c dump.c -o dump.o
ar -rcsv libdump.a dump.o

When I test it for an eg program as below, it works fine.
gcc eg.c -L. -ldump -o eg.o

Now I have added a call to a function "dummy" from dump.c in all the 
functions in gcc.
And modified Makefile and configure to incorporate the option -L{path} 
-ldump.
Now during make, in stage1, it fails at i686-pc-linux-gnu/libgomp.
It gives error : C compiler cannot create executables

When I check config.log, it is unable to find reference to the function 
dummy.

Could you please tell me the right way of adding a library in gcc?
Also where all do I have to modify, so that all the functions in gcc can 
access the library?

Regards,
Swati



More information about the Gcc-help mailing list