config/cc/gcc.in.2
author Johannes Stezenbach <js@sig21.net>
Thu Jul 29 19:47:16 2010 +0200 (2010-07-29)
changeset 2045 fdaa6c7f6dea
parent 2043 efb1058baa31
child 2054 2ec4260a4692
permissions -rw-r--r--
cc/gcc: add option to compile against static libstdc++, for gcc-4.4 and newer

Idea and know-how taken from CodeSourcery build script.

Normal build:
$ ldd arm-unknown-linux-uclibcgnueabi-gcc
linux-gate.so.1 => (0xb77f3000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb76e8000)
libc.so.6 => /lib/i686/cmov/libc.so.6 (0xb75a1000)
libm.so.6 => /lib/i686/cmov/libm.so.6 (0xb757a000)
/lib/ld-linux.so.2 (0xb77f4000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb755c000)

CC_STATIC_LIBSTDCXX=y:
$ ldd arm-unknown-linux-uclibcgnueabi-gcc
linux-gate.so.1 => (0xb7843000)
libc.so.6 => /lib/i686/cmov/libc.so.6 (0xb76e6000)
/lib/ld-linux.so.2 (0xb7844000)

I made CC_STATIC_LIBSTDCXX default=y since I think
it is always desirable.

Signed-off-by: Johannes Stezenbach <js@sig21.net>
     1 config CC_GCC_ENABLE_TARGET_OPTSPACE
     2     bool
     3     prompt "Optimize gcc libs for size"
     4     default y
     5     help
     6       Pass --enable-target-optspace to crossgcc's configure.
     7       
     8       This will compile crossgcc's libs with -Os.
     9 
    10 config CC_STATIC_LIBSTDCXX
    11     bool
    12     prompt "Link libstdc++ statically into the gcc binary"
    13     default y
    14     depends on CC_GCC_4_4_or_later
    15     help
    16       Newer gcc versions use the PPL library which is C++ code.  Statically
    17       linking libstdc++ increases the likeliness that the gcc binary will
    18       run on machines other than the one which it was built on, without
    19       having to worry about distributing the matching version of libstdc++
    20       along with it.
    21 
    22 comment "Misc. obscure options."
    23 
    24 config CC_CXA_ATEXIT
    25     bool
    26     prompt "Use __cxa_atexit"
    27     default y
    28     depends on ! BARE_METAL
    29     help
    30       If you get the missing symbol "__cxa_atexit" when building C++ programs,
    31       you might want to try disabling this option.
    32 
    33 config CC_GCC_DISABLE_PCH
    34     bool
    35     prompt "Do not build PCH"
    36     default n
    37     help
    38       Say 'y' here to not use Pre-Compiled Headers in the resulting toolchain.
    39       at the expense of speed when compiling C++ code.
    40       
    41       For some configurations (most notably canadian?), PCH are broken, and
    42       need to be disabled. Please see:
    43         http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40974
    44 
    45 config CC_GCC_SJLJ_EXCEPTIONS
    46     tristate
    47     prompt "Use sjlj for exceptions"
    48     default m
    49     help
    50       'sjlj' is short for setjmp/longjmp.
    51       
    52       On some architectures, stack unwinding during exception handling
    53       works perfectly well without using sjlj, while on some others,
    54       use of sjlj is required for proper stack unwinding.
    55       
    56        Option  | sjlj use           | Associated ./configure switch
    57       ---------+--------------------+--------------------------------
    58          Y     | forcibly used      | --enable-sjlj-exceptions
    59          M     | auto               | (none, ./configure decides)
    60          N     | forcibly not used  | --disable-sjlj-exceptions
    61       
    62       It should be safe to say 'M' or 'N'.
    63       
    64       It can happen that ./configure is wrong in some cases. Known
    65       case is for ARM big endian, where you should say 'N'.
    66 
    67 config CC_GCC_LIBMUDFLAP
    68     bool
    69     prompt "Compile libmudflap"
    70     default n
    71     help
    72       libmudflap is a pointer-use checking tool, which can detect
    73       various mis-usages of pointers in C and (to some extents) C++.
    74       
    75       You should say 'N' here, as libmduflap generates instrumented
    76       code (thus it is a bit bigger and a bit slower) and requires
    77       re-compilation and re-link, while it exists better run-time
    78       alternatives (eg. DUMA, dmalloc...) that need neither re-
    79       compilation nor re-link.