config/binutils.in
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sun Jun 13 23:45:29 2010 +0200 (2010-06-13)
changeset 1982 63cee3d5ab85
parent 1887 5d872df743fe
child 2564 5d4e91c0343e
permissions -rw-r--r--
libc/newlib: build in the 'start files' pass

A few facts:
- building the C library requires a proper core compiler
- core compiler is issued from one of the core passes
- the C library is required to build libstdc++
- newlib is only built for baremetal
- in bare metal, the final compiler is issued from one of the core passes

So we need to build the C library between core pass 1 and core pass 2.
The only place is eithe libc_headers() or libc_start_files(). The most
pertinent seems to be libc_start_files().

So we build newlib from libc_start_files(), and leave libc() empty.
     1 # Binary utilities menu
     2 
     3 menu "Binary utilities"
     4 
     5 choice
     6     bool
     7     prompt "Binary format:"
     8 
     9 if ARCH_USE_MMU || BARE_METAL
    10 
    11 config ARCH_BINFMT_ELF
    12     bool
    13     prompt "ELF"
    14     help
    15       This will make your system build ELF exectubales,
    16       suitable for architectures with an MMU.
    17 
    18 endif # ARCH_USE_MMU
    19 
    20 if ! ARCH_USE_MMU
    21 
    22 config ARCH_BINFMT_FLAT
    23     bool
    24     prompt "Flat"
    25     help
    26       This will build flat binaries, suitable for
    27       MMU-less architectures.
    28 
    29 config ARCH_BINFMT_FDPIC
    30     bool
    31     prompt "FD_PIC ELF"
    32     help
    33       This will build FD_PIC ELF binaries, suitable for
    34       MMU-less architectures that still require to use
    35       shared libraries (FIXME).
    36 
    37 endif # ! ARCH_USE_MMU
    38 
    39 endchoice
    40 
    41 source "config/binutils/binutils.in"
    42 source "config/binutils/elf2flt.in"
    43 source "config/binutils/sstrip.in"
    44 
    45 endmenu