summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2009-10-26 21:00:30 (GMT)
committerYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2009-10-26 21:00:30 (GMT)
commit49e5b08739dd69624e7a5e7173bc32fe3fd8fd91 (patch)
tree6f218e6c533046006f55ab5bd4991bb967819686
parente73418236d013152b3891948faa791a45ddc9c20 (diff)
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.
-rw-r--r--config/libc/newlib.in21
-rw-r--r--scripts/build/libc/newlib.sh39
-rw-r--r--scripts/functions4
3 files changed, 50 insertions, 14 deletions
diff --git a/config/libc/newlib.in b/config/libc/newlib.in
index 61803d7..446cb4d 100644
--- a/config/libc/newlib.in
+++ b/config/libc/newlib.in
@@ -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
diff --git a/scripts/build/libc/newlib.sh b/scripts/build/libc/newlib.sh
index 09bbdac..c4cf654 100644
--- a/scripts/build/libc/newlib.sh
+++ b/scripts/build/libc/newlib.sh
@@ -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"
diff --git a/scripts/functions b/scripts/functions
index 730ecf1..b9aa7e7 100644
--- a/scripts/functions
+++ b/scripts/functions
@@ -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}"