mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2024-12-19 04:47:52 +00:00
libc/newlib: allow using newlib with archs other than avr32
This commit is contained in:
parent
f5cfdc1369
commit
68b9b30f6b
@ -4,8 +4,6 @@ menu "C-library"
|
|||||||
|
|
||||||
config LIBC
|
config LIBC
|
||||||
string
|
string
|
||||||
default "newlib" if BARE_METAL && ARCH_avr32 && EXPERIMENTAL
|
|
||||||
default "none" if BARE_METAL
|
|
||||||
|
|
||||||
config LIBC_VERSION
|
config LIBC_VERSION
|
||||||
string
|
string
|
||||||
@ -23,8 +21,6 @@ config LIBC_VERSION
|
|||||||
|
|
||||||
source config.gen/libc.in
|
source config.gen/libc.in
|
||||||
|
|
||||||
comment "Common C library options"
|
|
||||||
|
|
||||||
config LIBC_SUPPORT_NPTL
|
config LIBC_SUPPORT_NPTL
|
||||||
bool
|
bool
|
||||||
default n
|
default n
|
||||||
@ -37,7 +33,12 @@ config THREADS
|
|||||||
string
|
string
|
||||||
default "nptl" if THREADS_NPTL
|
default "nptl" if THREADS_NPTL
|
||||||
default "linuxthreads" if THREADS_LINUXTHREADS
|
default "linuxthreads" if THREADS_LINUXTHREADS
|
||||||
default "none" if THREADS_NONE
|
default "none" if THREADS_NONE || LIBC_none
|
||||||
|
# No C library, no threads!
|
||||||
|
|
||||||
|
if ! LIBC_none
|
||||||
|
|
||||||
|
comment "Common C library options"
|
||||||
|
|
||||||
choice
|
choice
|
||||||
bool
|
bool
|
||||||
@ -62,4 +63,6 @@ config THREADS_NONE
|
|||||||
|
|
||||||
endchoice
|
endchoice
|
||||||
|
|
||||||
|
endif # ! LIBC_none
|
||||||
|
|
||||||
endmenu
|
endmenu
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
# newlib options
|
# newlib options
|
||||||
# depends on EXPERIMENTAL
|
# depends on EXPERIMENTAL && BARE_METAL
|
||||||
|
|
||||||
config LIBC_newlib
|
config LIBC_newlib
|
||||||
help
|
help
|
||||||
Newlib is a C library intended for use on embedded systems. It is a
|
Newlib is a C library intended for use on embedded systems. It is a
|
||||||
conglomeration of several library parts, all under free software
|
conglomeration of several library parts, all under free software
|
||||||
licenses that make them easily usable on embedded products. Newlib
|
licenses that make them easily usable on embedded products. Newlib
|
||||||
is only available in source form. It can be compiled for a wide
|
is only available in source form. It can be compiled for a wide
|
||||||
array of processors, and will usually work on any architecture with
|
array of processors, and will usually work on any architecture with
|
||||||
the addition of a few low-level routines.
|
the addition of a few low-level routines.
|
||||||
|
|
||||||
choice
|
choice
|
||||||
bool
|
bool
|
||||||
@ -31,10 +31,10 @@ config LIBC_VERSION
|
|||||||
config ATMEL_AVR32_HEADERS
|
config ATMEL_AVR32_HEADERS
|
||||||
bool
|
bool
|
||||||
prompt "Install Atmel AVR32 headers"
|
prompt "Install Atmel AVR32 headers"
|
||||||
|
depends on ARCH_avr32
|
||||||
default y
|
default y
|
||||||
help
|
help
|
||||||
Install Atmel AVR32 headers for native AVR32 development. Most
|
Install Atmel AVR32 headers for native AVR32 development. Most
|
||||||
AVR32 MCU devices are supported.
|
AVR32 MCU devices are supported.
|
||||||
|
|
||||||
If you do native AVR32 development you want to say 'Y' here.
|
If you do native AVR32 development you want to say 'Y' here.
|
||||||
|
|
||||||
|
14
config/libc/none.in
Normal file
14
config/libc/none.in
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# Dummy config file to not use a C library *at all*
|
||||||
|
# depends on BARE_METAL
|
||||||
|
|
||||||
|
config LIBC_none
|
||||||
|
help
|
||||||
|
Do not use a C library.
|
||||||
|
|
||||||
|
This is usefull if your project is self-contained, does not rely on
|
||||||
|
an external C library, and provides all the necessary bits.
|
||||||
|
|
||||||
|
Most probably usefull to bootloaders, as they generally don't depend
|
||||||
|
on the C library.
|
||||||
|
|
||||||
|
If unsure: do *not* choose that, and use another option in the choice.
|
@ -8,7 +8,7 @@ CT_DoArchTupleValues() {
|
|||||||
case "${CT_LIBC},${CT_ARCH_ARM_EABI}" in
|
case "${CT_LIBC},${CT_ARCH_ARM_EABI}" in
|
||||||
*glibc,y) CT_TARGET_SYS=gnueabi;;
|
*glibc,y) CT_TARGET_SYS=gnueabi;;
|
||||||
uClibc,y) CT_TARGET_SYS=uclibcgnueabi;;
|
uClibc,y) CT_TARGET_SYS=uclibcgnueabi;;
|
||||||
none,y) CT_TARGET_SYS=eabi;;
|
*,y) CT_TARGET_SYS=eabi;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# In case we're EABI, do *not* specify any ABI!
|
# In case we're EABI, do *not* specify any ABI!
|
||||||
|
@ -696,9 +696,9 @@ CT_DoBuildTargetTuple() {
|
|||||||
# Set defaults for the system part of the tuple. Can be overriden
|
# Set defaults for the system part of the tuple. Can be overriden
|
||||||
# by architecture-specific values.
|
# by architecture-specific values.
|
||||||
case "${CT_LIBC}" in
|
case "${CT_LIBC}" in
|
||||||
none) CT_TARGET_SYS=elf;;
|
|
||||||
*glibc) CT_TARGET_SYS=gnu;;
|
*glibc) CT_TARGET_SYS=gnu;;
|
||||||
uClibc) CT_TARGET_SYS=uclibc;;
|
uClibc) CT_TARGET_SYS=uclibc;;
|
||||||
|
*) CT_TARGET_SYS=elf;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Transform the ARCH into a kernel-understandable ARCH
|
# Transform the ARCH into a kernel-understandable ARCH
|
||||||
|
Loading…
Reference in New Issue
Block a user