Dear all

It looks like specifying the option -x f77-cpp-input forces the preprocessor to
be run even though the input files are object or static libraries.
As an toy exmple try with a simple prog.f

% gfortran -x f77-cpp-input -c prog.f
% gfortran -x f77-cpp-input prog.o -o prog

It looks like the preprocessor is run on prog.o and prog is not created.

When using autotools it is a problem since CPPFLAGS is not used to compile
fortran codes. A trick is to use -x none

% fortran -x f77-cpp-input -x none prog.o -o prog

When using autotools it is possible to specify -x none in LDFLAGS

Sincerely,
Patrick


-- 
           Summary: -x f77-cpp-input causes trouble when linking
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: p dot guio at ucl dot ac dot uk


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31978

Reply via email to