如何在Linux中编译DEC UNIX v4.0应用程序源代码? [英] How to compile DEC UNIX v4.0 application source code in Linux?
问题描述
我想编译源代码,但我在编译时遇到麻烦。
cc -O2 -Olimit 2000 -g - migrate -assume -Zp1 noaligned_objects ...
pre>
cc:error:2000:没有这样的文件或目录
cc:error:noaligned_objects:没有这样的文件或目录
cc:error:unrecognized命令行选项'-migrate'
cc:错误:无法识别的命令行选项'-assume'
cc:错误:无法识别的命令行选项'-Zp1'
解决方案开始编译它没有系统特定的标志(即使用
gcc
可能与-I
,-L
和-l </ code>标志,没有别的)。如果所讨论的程序是足够便携的,那么它将是一个获得所有依赖关系的问题。
一旦您能够建立,请查看它是否按预期运作(忽略成效)。如果没有,那将是一个好时机,看看你在DEC使用的标志,看看它是否需要任何特殊的待遇,建设。这是您使程序可移植或尝试使用
gcc
在您选择的目标体系结构上获得相同的行为。
最后,一旦程序构建并运行,这将是一个好时机,看看是否要使用任何优化标志(提示:你不必如果运行良好,离开它的方式)。
I want to compile a source code but I have trouble in compile.
cc -O2 -Olimit 2000 -g -migrate -assume -Zp1 noaligned_objects ... cc: error: 2000: No such file or directory cc: error: noaligned_objects: No such file or directory cc: error: unrecognized command line option ‘-migrate’ cc: error: unrecognized command line option ‘-assume’ cc: error: unrecognized command line option ‘-Zp1’
解决方案Start with compiling it with no system-specific flags (i.e. by using
gcc
possibly with-I
,-L
, and-l
flags and nothing else). If the program in question is portable enough, then it will be a matter of getting all dependencies available for it.Once you are able to build it, see if it runs as expected (ignore performance). If it doesn't, that would be a good time to look at the flags you used on DEC to see if it requires any special treatment when building. This is where you either make the program portable or try to get the equivalent behavior using
gcc
on the target architecture of your choice.Finally, once the program builds and runs, that would be a good time to see if you want to use any optimization flags (hint: you don't have to. If it runs fine, leave it the way it is).
这篇关于如何在Linux中编译DEC UNIX v4.0应用程序源代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!