25

基本的には、C/C++ のみをサポートする GCC の軽量ビルドを作成したいと考えています。これは簡単にできますか、それとも手動でソースをいじる必要がありますか?

4

2 に答える 2

41

This is covered in Installing GCC and Configuration

--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

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.

See also Building

Please note, that re-defining LANGUAGES when calling `make' does not work anymore!

于 2013-02-06T12:13:47.657 に答える