delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/11/22/04:51:42

From: pavenis AT lanet DOT lv
To: djgpp-workers AT delorie DOT com, bonner AT ifu DOT bepr DOT ethz DOT ch
Date: Thu, 22 Nov 2001 11:50:25 +0200
MIME-Version: 1.0
Subject: Re: g77 problem
Cc: gcc-bugs AT gcc DOT gnu DOT org
Message-ID: <3BFCE681.5421.2F2C17@localhost>
In-reply-to: <3bfcb6af$1@pfaff.ethz.ch>
X-mailer: Pegasus Mail for Windows (v4.01)
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On 22 Nov 2001 at 9:26, Thomas Bonner wrote:

> Hi,
> I upgraded to version 3.02 and found the following problem with g77:
> 
> g77 test.fpp
> c:/djgpp/lib/gcc-lib/djgpp/3.02/tradcpp0.exe: Invalid option `-remap'
> 
> this happens only with fortran files to be preprocessed (.fpp extension).
> 

gcc/f/lang_specs.h contains specs which run tradcpp0 and uses 
cpp_options unconditionally.

 {"@f77-cpp-input",
   "tradcpp0 -lang-fortran %(cpp_options) %{!M:%{!MM:%{!E:%{!pipe:%g.f |\n\
    f771 %{!pipe:%g.f} %(cc1_options) %{I*} %{!fsyntax-only:%(invoke_as)}}}}}", 
0},

For DJGPP I have following specified for cpp_spec:

*cpp:
%{!traditional:%{!ftraditional:%{!traditional-cpp:-remap -imacros 
%sdjgpp.ver}}}    %(cpp_cpu) %{posix:-D_POSIX_SOURCE} 
%{!ansi:%{!std=c*:%{!std=i*:-DMSDOS -DGO32 -Dunix}}}

 So if cpp options contains something incompatible with tradcpp0 then we have 
trouble. For DJGPP we have -remap in cpp_options as result one is getting 
message mentioned above.

Is there any way how to detect this case in cpp_options and to avoid this
problem. I see that specifying -traditional in gcc command line helps, but
I think it could be rather ugly solution

Andris

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019