gcc -B/usr/bin -B的含义

nyhenry2 2008-01-11 06:56:43
CC="gcc -B/usr/bin" ../sources/binutils-2.17/configure
中的 -B什么含义啊,我查过bash手册里面只说了单独的 -B 是 括号扩展的意思
-B/usr/bin连在一起是什么意思啊,这是一个什么语法现象呢。。
...全文
276 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
tqtuuuu 2010-08-26
  • 打赏
  • 举报
回复
请问CC=的CC是什么意思啊,我是小菜...
nyhenry2 2008-01-11
  • 打赏
  • 举报
回复
henryfour好厉害阿,多谢你了,20分送上:)
henryfour 2008-01-11
  • 打赏
  • 举报
回复
-Bprefix
This option specifies where to find the executables, libraries,
include files, and data files of the compiler itself.

The compiler driver program runs one or more of the subprograms
cpp, cc1, as and ld. It tries prefix as a prefix for each program
it tries to run, both with and without machine/version/.

For each subprogram to be run, the compiler driver first tries the
-B prefix, if any. If that name is not found, or if -B was not
specified, the driver tries two standard prefixes, which are
/usr/lib/gcc/ and /usr/local/lib/gcc/. If neither of those results
in a file name that is found, the unmodified program name is
searched for using the directories specified in your PATH environ-
ment variable.

The compiler will check to see if the path provided by the -B
refers to a directory, and if necessary it will add a directory
separator character at the end of the path.

-B prefixes that effectively specify directory names also apply to
libraries in the linker, because the compiler translates these
options into -L options for the linker. They also apply to
includes files in the preprocessor, because the compiler translates
these options into -isystem options for the preprocessor. In this
case, the compiler appends include to the prefix.

The run-time support file libgcc.a can also be searched for using
the -B prefix, if needed. If it is not found there, the two stan-
dard prefixes above are tried, and that is all. The file is left
out of the link if it is not found by those means.

Another way to specify a prefix much like the -B prefix is to use
the environment variable GCC_EXEC_PREFIX.

As a special kludge, if the path provided by -B is [dir/]stageN/,
where N is a number in the range 0 to 9, then it will be replaced
by [dir/]include. This is to help with boot-strapping the com-
piler.
henryfour 2008-01-11
  • 打赏
  • 举报
回复
哎....才发现你也是 henry 哈

19,612

社区成员

发帖
与我相关
我的任务
社区描述
系统使用、管理、维护问题。可以是Ubuntu, Fedora, Unix等等
社区管理员
  • 系统维护与使用区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧