libc/newlib: allow using newlib with archs other than avr32
author"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Wed Oct 21 22:51:39 2009 +0200 (2009-10-21)
changeset 159111460fc587e6
parent 1590 b51724d5250d
child 1592 c08132a93049
libc/newlib: allow using newlib with archs other than avr32
config/libc.in
config/libc/newlib.in
config/libc/none.in
scripts/build/arch/arm.sh
scripts/functions
     1.1 --- a/config/libc.in	Mon Oct 26 18:47:11 2009 +0100
     1.2 +++ b/config/libc.in	Wed Oct 21 22:51:39 2009 +0200
     1.3 @@ -4,8 +4,6 @@
     1.4  
     1.5  config LIBC
     1.6      string
     1.7 -    default "newlib" if BARE_METAL && ARCH_avr32 && EXPERIMENTAL
     1.8 -    default "none" if BARE_METAL
     1.9  
    1.10  config LIBC_VERSION
    1.11      string
    1.12 @@ -23,8 +21,6 @@
    1.13  
    1.14  source config.gen/libc.in
    1.15  
    1.16 -comment "Common C library options"
    1.17 -
    1.18  config LIBC_SUPPORT_NPTL
    1.19      bool
    1.20      default n
    1.21 @@ -37,7 +33,12 @@
    1.22      string
    1.23      default "nptl"          if THREADS_NPTL
    1.24      default "linuxthreads"  if THREADS_LINUXTHREADS
    1.25 -    default "none"          if THREADS_NONE
    1.26 +    default "none"          if THREADS_NONE || LIBC_none
    1.27 +#                              No C library, no threads!
    1.28 +
    1.29 +if ! LIBC_none
    1.30 +
    1.31 +comment "Common C library options"
    1.32  
    1.33  choice
    1.34      bool
    1.35 @@ -62,4 +63,6 @@
    1.36  
    1.37  endchoice
    1.38  
    1.39 +endif # ! LIBC_none
    1.40 +
    1.41  endmenu
     2.1 --- a/config/libc/newlib.in	Mon Oct 26 18:47:11 2009 +0100
     2.2 +++ b/config/libc/newlib.in	Wed Oct 21 22:51:39 2009 +0200
     2.3 @@ -1,14 +1,14 @@
     2.4  # newlib options
     2.5 -# depends on EXPERIMENTAL
     2.6 +# depends on EXPERIMENTAL && BARE_METAL
     2.7  
     2.8  config LIBC_newlib
     2.9      help
    2.10 -    Newlib is a C library intended for use on embedded systems. It is a 
    2.11 -    conglomeration of several library parts, all under free software 
    2.12 -    licenses that make them easily usable on embedded products. Newlib 
    2.13 -    is only available in source form. It can be compiled for a wide 
    2.14 -    array of processors, and will usually work on any architecture with
    2.15 -    the addition of a few low-level routines. 
    2.16 +      Newlib is a C library intended for use on embedded systems. It is a
    2.17 +      conglomeration of several library parts, all under free software
    2.18 +      licenses that make them easily usable on embedded products. Newlib
    2.19 +      is only available in source form. It can be compiled for a wide
    2.20 +      array of processors, and will usually work on any architecture with
    2.21 +      the addition of a few low-level routines.
    2.22  
    2.23  choice
    2.24      bool
    2.25 @@ -31,10 +31,10 @@
    2.26  config ATMEL_AVR32_HEADERS
    2.27      bool
    2.28      prompt "Install Atmel AVR32 headers"
    2.29 +    depends on ARCH_avr32
    2.30      default y
    2.31      help
    2.32        Install Atmel AVR32 headers for native AVR32 development. Most
    2.33        AVR32 MCU devices are supported.
    2.34        
    2.35        If you do native AVR32 development you want to say 'Y' here.
    2.36 -
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/config/libc/none.in	Wed Oct 21 22:51:39 2009 +0200
     3.3 @@ -0,0 +1,14 @@
     3.4 +# Dummy config file to not use a C library *at all*
     3.5 +# depends on BARE_METAL
     3.6 +
     3.7 +config LIBC_none
     3.8 +    help
     3.9 +      Do not use a C library.
    3.10 +      
    3.11 +      This is usefull if your project is self-contained, does not rely on
    3.12 +      an external C library, and provides all the necessary bits.
    3.13 +      
    3.14 +      Most probably usefull to bootloaders, as they generally don't depend
    3.15 +      on the C library.
    3.16 +      
    3.17 +      If unsure: do *not* choose that, and use another option in the choice.
     4.1 --- a/scripts/build/arch/arm.sh	Mon Oct 26 18:47:11 2009 +0100
     4.2 +++ b/scripts/build/arch/arm.sh	Wed Oct 21 22:51:39 2009 +0200
     4.3 @@ -8,7 +8,7 @@
     4.4      case "${CT_LIBC},${CT_ARCH_ARM_EABI}" in
     4.5          *glibc,y)   CT_TARGET_SYS=gnueabi;;
     4.6          uClibc,y)   CT_TARGET_SYS=uclibcgnueabi;;
     4.7 -        none,y)     CT_TARGET_SYS=eabi;;
     4.8 +        *,y)        CT_TARGET_SYS=eabi;;
     4.9      esac
    4.10  
    4.11      # In case we're EABI, do *not* specify any ABI!
     5.1 --- a/scripts/functions	Mon Oct 26 18:47:11 2009 +0100
     5.2 +++ b/scripts/functions	Wed Oct 21 22:51:39 2009 +0200
     5.3 @@ -696,9 +696,9 @@
     5.4      # Set defaults for the system part of the tuple. Can be overriden
     5.5      # by architecture-specific values.
     5.6      case "${CT_LIBC}" in
     5.7 -        none)   CT_TARGET_SYS=elf;;
     5.8          *glibc) CT_TARGET_SYS=gnu;;
     5.9          uClibc) CT_TARGET_SYS=uclibc;;
    5.10 +        *)      CT_TARGET_SYS=elf;;
    5.11      esac
    5.12  
    5.13      # Transform the ARCH into a kernel-understandable ARCH