This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran 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
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:subject:date:user-agent:cc:mime-version:content-type:content-transfer-encoding:content-disposition:message-id; bh=K+8bX/6hF9TRz81htC4/LU4/t01VZfBO2YoiW2kIRtU=; b=XTytgOV8z+NTgPTh/TJVWl0+Hv+GKmGmc6mqpyUXaGAjHMrw48u4GSu36pZvKbypDB0lc1LimIIP/7/jm+2A5KaoFGCYrfUQNXkj3lPv6F5BR02ki4CUHJ7bwEhPj5Ttbv/UaAjdiVXqs9qvonXyEfSukF5B8sW6sCCMYxxBBPY=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:cc:mime-version:content-type:content-transfer-encoding:content-disposition:message-id; b=GSBLyjSnK59EVUE8j0W6WIbOfn3u/N/b2mkAtbE9K2te1e2tjkNCYzD3jUfkGrIg9uol6TKoggnjJfpMf2Tx/cxgHoIbOErWCgbeomlhR33qfYjpaRf+yMRX1IZEKJ6pHoj4hOKGXii+4FS9WhL5SbnPltk6JVL+UrykrSN9A60=
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