This is the mail archive of the gcc-bugs@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]

[Bug fortran/31978] New: -x f77-cpp-input causes trouble when linking


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]