如何制作“灯"?带有语言支持等的GCC版本是否已修剪? [英] How to make a "light" build of GCC with language supports etc. pruned?

查看:49
本文介绍了如何制作“灯"?带有语言支持等的GCC版本是否已修剪?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

基本上,我想仅支持C/C ++来简化GCC的构建.可以轻松做到这一点吗?还是需要对源代码进行手动修改?

Basically I would like to make a light build of GCC with only C/C++ support. Can this be done easily or does it require manual tinkering with source?

推荐答案

安装GCC 配置

-enable-languages = lang1,lang2,...
指定仅应构建编译器及其运行时库的特定子集.有关langN的有效值的列表,您可以在GCC源代码树的gcc目录中发出以下命令:

--enable-languages=lang1,lang2,...
Specify that only a particular subset of compilers and their runtime libraries should be built. For a list of valid values for langN you can issue the following command in the gcc directory of your GCC source tree:

         grep language= */config-lang.in

当前,您可以使用以下任意一种:all,ada,c,c ++,fortran,go,java,objc,obj-c ++.构建Ada编译器有特殊要求,请参见下文.如果不传递此标志,或不指定所有选项,则将配置gcc子树中所有可用的默认语言.Ada,Go和Objective-C ++不是默认语言.其余的都是.

Currently, you can use any of the following: all, ada, c, c++, fortran, go, java, objc, obj-c++. Building the Ada compiler has special requirements, see below. If you do not pass this flag, or specify the option all, then all default languages available in the gcc sub-tree will be configured. Ada, Go and Objective-C++ are not default languages; the rest are.

因此,根据您的情况使用:

So, for your case using:

../gcc/configure --enable-languages=c,c++

当然,除了其他所需的选项之外,就足够了.

should be sufficient, besides other needed options, of course.

另请参见建筑物

请注意,在调用"make"时重新定义语言已经不起作用了!

这篇关于如何制作“灯"?带有语言支持等的GCC版本是否已修剪?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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