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