This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
gfortran+libcpp: linking objects from c-compiler
- From: Daniel Franke <franke dot daniel at gmail dot com>
- To: fortran at gcc dot gnu dot org
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 15 Apr 2008 22:59:58 +0200
- Subject: gfortran+libcpp: linking objects from c-compiler
Hi all.
To integrate libcpp into gfortran, I copy/adapt quite some code from the c
frontend. For include-path handling, I found that I can nicely re-use the
functions defined in c-incpath.c and exported by c-incpath.h. Now, linking
gfortran, the linker of course complains about undefined references, namely
app_path() and register_include_chains().
Is it acceptable to simply link in the C-frontend object to gfortran (as C is
a required language and the .o file will be available)? Do I need to do
something else in addition or instead, like renaming or moving functions,
pushing them to a library or anything else?
Comments are highly welcome!
Regards
Daniel