mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2025-04-09 12:21:18 +00:00
libc/newlib: allow using CVS snapshots
The newlib "team" rolls new releases about once a year (december). This is quite a long time between releases, in case code was fixed. So, allow user to use a CVS snapshot to benefit early from fixes and enhancements to newlib.
This commit is contained in:
parent
e73418236d
commit
49e5b08739
@ -20,13 +20,34 @@ config LIBC_NEWLIB_V_1_17_0
|
||||
bool
|
||||
prompt "1.17.0"
|
||||
|
||||
config LIBC_NEWLIB_CVS
|
||||
bool
|
||||
prompt "Use CVS snapshot"
|
||||
help
|
||||
The newlib "team" rolls new releases about once a year (december).
|
||||
This is quite a long time between releases, in case code was fixed.
|
||||
|
||||
Saying 'Y' here will allow you to use the bleeding-edge code from
|
||||
the CVS repository. This may or may not fix your issues, may or may
|
||||
not build, may or may not crash your machine, may or may not withdraw
|
||||
money from your bank account, may or may not date your girlfriend,
|
||||
may or may not resurect Elvis... :-)
|
||||
|
||||
In a word: use the CVS snapshot at your own risk!
|
||||
|
||||
endchoice
|
||||
|
||||
config LIBC_VERSION
|
||||
string
|
||||
prompt "use CVS tag" if LIBC_NEWLIB_CVS
|
||||
# Don't remove next line
|
||||
# CT_INSERT_VERSION_STRING_BELOW
|
||||
default "1.17.0" if LIBC_NEWLIB_V_1_17_0
|
||||
help
|
||||
Enter the tag you want to use.
|
||||
Leave empty to use the 'head' of the repository.
|
||||
|
||||
comment "Architecture specific options"
|
||||
|
||||
config ATMEL_AVR32_HEADERS
|
||||
bool
|
||||
|
@ -5,12 +5,27 @@
|
||||
# Edited by Martin Lund <mgl@doredevelopment.dk>
|
||||
#
|
||||
|
||||
libc_newlib_basename() {
|
||||
if [ -z "${CT_LIBC_NEWLIB_CVS}" ]; then
|
||||
echo "newlib-${CT_LIBC_VERSION}"
|
||||
else
|
||||
echo "newlib-cvs${CT_LIBC_VERSION:+-${CT_LIBC_VERSION}}"
|
||||
fi
|
||||
}
|
||||
|
||||
do_libc_get() {
|
||||
libc_src="ftp://sources.redhat.com/pub/newlib"
|
||||
avr32headers_src="http://dev.doredevelopment.dk/avr32-toolchain/sources"
|
||||
|
||||
CT_GetFile "newlib-${CT_LIBC_VERSION}" ${libc_src}
|
||||
|
||||
if [ -z "${CT_LIBC_NEWLIB_CVS}" ]; then
|
||||
CT_GetFile "newlib-${CT_LIBC_VERSION}" ${libc_src}
|
||||
else
|
||||
CT_GetCVS "$(libc_newlib_basename)" \
|
||||
":pserver:anoncvs@sources.redhat.com:/cvs/src" \
|
||||
"newlib" \
|
||||
"${CT_LIBC_VERSION}" \
|
||||
"$(libc_newlib_basename)=src"
|
||||
fi
|
||||
|
||||
if [ "${CT_ATMEL_AVR32_HEADERS}" = "y" ]; then
|
||||
CT_GetFile "avr32headers" ${avr32headers_src}
|
||||
@ -18,8 +33,8 @@ do_libc_get() {
|
||||
}
|
||||
|
||||
do_libc_extract() {
|
||||
CT_Extract "newlib-${CT_LIBC_VERSION}"
|
||||
CT_Patch "newlib-${CT_LIBC_VERSION}"
|
||||
CT_Extract "$(libc_newlib_basename)"
|
||||
CT_Patch "$(libc_newlib_basename)"
|
||||
|
||||
if [ "${CT_ATMEL_AVR32_HEADERS}" = "y" ]; then
|
||||
CT_Extract "avr32headers"
|
||||
@ -51,14 +66,14 @@ do_libc() {
|
||||
# build : not used
|
||||
# host : the machine building newlib
|
||||
# target : the machine newlib runs on
|
||||
CC_FOR_BUILD="${CT_BUILD}-gcc" \
|
||||
CFLAGS_FOR_TARGET="${CT_TARGET_CFLAGS} -O" \
|
||||
AR=${CT_TARGET}-ar \
|
||||
RANLIB=${CT_TARGET}-ranlib \
|
||||
CT_DoExecLog ALL \
|
||||
"${CT_SRC_DIR}/newlib-${CT_LIBC_VERSION}/configure" \
|
||||
--host=${CT_BUILD} \
|
||||
--target=${CT_TARGET} \
|
||||
CC_FOR_BUILD="${CT_BUILD}-gcc" \
|
||||
CFLAGS_FOR_TARGET="${CT_TARGET_CFLAGS} -O" \
|
||||
AR=${CT_TARGET}-ar \
|
||||
RANLIB=${CT_TARGET}-ranlib \
|
||||
CT_DoExecLog ALL \
|
||||
"${CT_SRC_DIR}/$(libc_newlib_basename)/configure" \
|
||||
--host=${CT_BUILD} \
|
||||
--target=${CT_TARGET} \
|
||||
--prefix=${CT_PREFIX_DIR}
|
||||
|
||||
CT_DoLog EXTRA "Building C library"
|
||||
|
@ -503,8 +503,8 @@ CT_GetCVS() {
|
||||
if [ -n "${dirname}" ]; then
|
||||
case "${dirname}" in
|
||||
*=*)
|
||||
CT_DoExecLog DEBUG mv "${dirname%%=*}" "${dirname#*=}"
|
||||
CT_DoExecLog ALL tar cjf "${CT_TARBALLS_DIR}/${basename}.tar.bz2" "${dirname#*=}"
|
||||
CT_DoExecLog DEBUG mv "${dirname#*=}" "${dirname%%=*}"
|
||||
CT_DoExecLog ALL tar cjf "${CT_TARBALLS_DIR}/${basename}.tar.bz2" "${dirname%%=*}"
|
||||
;;
|
||||
*)
|
||||
CT_DoExecLog ALL mv "${module}" "${dirname}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user