【发布时间】:2018-08-29 15:36:28
【问题描述】:
我正在尝试在 Fortran 77 中运行我没有编写的程序的 makefile。
它指定了以下标志:
FLT_FLAGS = -native -libmil
然后用它们编译一个 Fortran 77 程序:
f77 -O -native -libmil -c a2.f
但失败了:
f77: error: unrecognized command line option ‘-native’ makefile:107: recipe for target 'vg.a(a2.o)' failed make: *** [vg.a(a2.o)] Error 1
关于这个问题,我唯一能找到的是 -native 已过时,这可能就是 gfortran (f77) 无法识别它的原因:https://docs.oracle.com/cd/E37069_01/html/E37076/aevft.html#scrolltoc
【问题讨论】:
-
等等,你用的是哪个编译器,Oracle 还是 gfortran?
f77 -v打印什么?你怎么称呼gfortran?没有什么能比得上 Fortran 原生标志,每个编译器都有自己的标志。 -
查看 GCC 的 -mtune 和 -march 标志(包括 gfortran)stackoverflow.com/questions/10559275/…
-
@VladimirF
f77 -v打印COLLECT_GCC=f77 COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper Target: x86_64-linux-gnu Configured with:[...]Thread model: posix gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.9)。我没有看到我正在使用的代码的任何许可证,因为教授给了我。代码来自:aip.scitation.org/doi/abs/10.1063/1.168405,不知道要不要在这里发布,让社区帮助我。
标签: fortran gfortran fortran77