Mail Archives: djgpp-workers/2001/11/22/04:51:42
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 -