且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何制作“灯"?带有语言支持等的GCC版本是否已修剪?

更新时间:2023-12-04 22:20:34

安装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"时重新定义语言已经不起作用了!