如何设置GCC 4.3的默认规格文件? [英] How to set gcc 4.3 default specs file?

查看:153
本文介绍了如何设置GCC 4.3的默认规格文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在使用gcc 4.3.2版,我看到如何使用生成规格:

When using gcc version 4.3.2, I see how to generate specs using:

$ /usr/local/gcc-4.3.2/bin/gcc -v
Using built-in specs

现在更改为相同的目录libgcc的:

Now changing to the same directory as libgcc:

cd /usr/local/gcc-4.3.2/lib/gcc/x86_64-unknown-linux-gnu/4.3.2
/usr/local/gcc-4.3.2/bin/gcc -dumpspecs > specs

我有一个人口稠密的规格文件,我可以修改。然而,一旦做到这一点我还看到:

I have a populated specs file that I can modify. However, once that is done I still see that:

$ /usr/local/gcc-4.3.2/bin/gcc -v
Using built-in specs

我如何告诉GCC使用默认情况下该规范文件,而不是逼着我传递一个 -specs 参数每个编译?我想它在那里我得到以下匹配另一个系统我有:

How do I tell gcc to use that specs file by default rather than forcing me to pass a -specs parameter every compile? I would like it to match another system I have where I get the following:

$ /usr/local/gcc-4.3.2/bin/gcc -v
Reading specs from /usr/local/gcc-4.3.2/lib/gcc/i686-pc-linux-gnu/4.3.2/specs</code>

正如你所看到的,这两个系统之间的主要区别在于,现有的设置是32位的,现在我想匹配的64位系统。 Linux版本,否则是相同的,我的gcc编译的版本相同。 (由于这两个系统的gcc 4.3.2是第二GCC安装4.1.2被用来编译4.3.2)

As you can see, the major difference between the two systems is that the existing setup is 32-bit and I am now trying to match that on a 64-bit system. The version of Linux is otherwise the same and I am compiling the same version of gcc. (With both systems gcc 4.3.2 is the second gcc installation, with 4.1.2 being used to compile 4.3.2)

推荐答案

在由约翰内斯·绍布的strace的建议作为暗示 - litb,这是有可能与编译器正在寻找该文件的问题。事实证明,非工作安装有一个环境变量这是造成混乱的.bashrc中设置。

As hinted at by the strace suggestion by Johannes Schaub - litb, it was a problem with where the compiler was looking for the file. As it turns out, the non-working installation had an environment variable set in the .bashrc that was causing the confusion.

对于规范文件的正确位置的确是同一个目录的libgcc的是,只要确保你正在寻找在那里。

The correct location for the specs file is indeed the same directory that libgcc is in. Just be sure you're looking there.

这篇关于如何设置GCC 4.3的默认规格文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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