如何解释gcc -print-multi-lib的输出 [英] How to interpret the output of gcc -print-multi-lib

查看:290
本文介绍了如何解释gcc -print-multi-lib的输出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

man gcc解释了-print-multi-lib列出了开关及其分离方式,但没有列出

man gcc explains that -print-multi-lib lists switches and how they're separated, but not what e.g.

.;

.;
32;@m32
x32;@mx32

可能意味着.我什至无法确定我是否具有 https://stackoverflow.com/a/9753955/1797006 .

could mean. I can't even tell if I have multilib support as requested by https://stackoverflow.com/a/9753955/1797006.

我正在使用gcc 5.3.1和4.6.3.

I'm using gcc 5.3.1 and 4.6.3.

推荐答案

格式为.;的输出没有任何其他行,则意味着在主机上未找到多库.

The output in form: .; without any additional lines means that no multilibs were found on your host.

通常:

-print-multi-lib:此调试选项使GCC显示从multilib目录名称到启用了该功能的编译器开关的映射 他们.该信息是从使用的规范文件中提取的 由编译器执行,其中目录名与 以分号切换,并且每个切换均以@符号开头 而不是传统的破折号/减号,两者之间没有空格 多个开关.

-print-multi-lib: This debugging option causes GCC to display the mapping from multilib directory names to compiler switches that enable them. This information is extracted from the specification files used by the compiler, in which the directory name is separated from the switches by a semicolon, and each switch starts with an @ symbol instead of the traditional dash/minus symbol, with no spaces between multiple switches.

资料来源: GCC权威指南,作者:威廉·冯·哈根(William von Hagen)[第二版,Apress 2006].请注意-本书涵盖了GCC 4.x.y版本,但我在GCC> 5中未找到有关此范围内某些重大变化的任何信息.

Source: The Definitive Guide to GCC by William von Hagen [2nd edition, Apress 2006]. Please notice - this book covers GCC 4.x.y versions but I haven't found any information about some radical changes in this scope in GCC > 5.

因此,您帖子中的第二个输出显示有关两个multilib的信息.

Therefore, the second output in your post shows information about two multilibs.

通常使用multilib进行交叉编译.

Usage of multilib is typical for cross-compilation purpose.

我认为另一个 同一本书的引用值得一提的是另一个有用的开关:

I think that another quote for the same book is worth mentioning about another useful switch:

-print-multi-directory:此调试选项使GCC打印与其他任何目录所选择的multilib相对应的目录名 命令行上提供的开关.这个目录是 应该存在于GCC_EXEC_PREFIX定义的目录中 环境变量.

-print-multi-directory: This debugging option causes GCC to print the directory name corresponding to the multilib selected by any other switches that are given on the command line. This directory is supposed to exist in the directory defined by the GCC_EXEC_PREFIX environment variable.

这篇关于如何解释gcc -print-multi-lib的输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆