diff options
author | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2009-10-26 21:00:30 (GMT) |
---|---|---|
committer | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2009-10-26 21:00:30 (GMT) |
commit | 49e5b08739dd69624e7a5e7173bc32fe3fd8fd91 (patch) | |
tree | 6f218e6c533046006f55ab5bd4991bb967819686 /scripts | |
parent | e73418236d013152b3891948faa791a45ddc9c20 (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.
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/build/libc/newlib.sh | 39 | ||||
-rw-r--r-- | scripts/functions | 4 |
2 files changed, 29 insertions, 14 deletions
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}" |