This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See crosstool-NG for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 13 of 13] libc/newlib: Add CUSTOM version and CUSTOM_LOCATION config options and GetCustom


# HG changeset patch
# User David Holsgrove <david.holsgrove@xilinx.com>
# Date 1349930385 -36000
# Node ID d02252752d4dc5e68ae3bfd6697ac76f647a4497
# Parent  712995e3e719fbbe24afba8efd370e4213372405
libc/newlib: Add CUSTOM version and CUSTOM_LOCATION config options and GetCustom

CUSTOM_LOCATION config options only presented in menuconfig if component
CUSTOM version selected.

Signed-off-by: "David Holsgrove" <david.holsgrove@xilinx.com>

diff -r 712995e3e719 -r d02252752d4d config/libc/newlib.in
--- a/config/libc/newlib.in	Thu Oct 11 14:39:44 2012 +1000
+++ b/config/libc/newlib.in	Thu Oct 11 14:39:45 2012 +1000
@@ -52,8 +52,25 @@
       
       In a word: use the CVS snapshot at your own risk! 
 
+config LIBC_NEWLIB_CUSTOM
+    bool
+    prompt "Custom newlib"
+    depends on EXPERIMENTAL
+
 endchoice
 
+if LIBC_NEWLIB_CUSTOM
+
+config LIBC_NEWLIB_CUSTOM_LOCATION
+    string
+    prompt "Full path to custom newlib source"
+    default ""
+    help
+      Enter the path to the directory (or tarball) of your source for newlib,
+      or leave blank to use default CT_CUSTOM_LOCATION_ROOT_DIR/newlib
+
+endif # LIBC_NEWLIB_CUSTOM
+
 config LIBC_VERSION
     string
     prompt "use CVS tag" if LIBC_NEWLIB_CVS
@@ -63,6 +80,7 @@
     default "1.19.0" if LIBC_NEWLIB_V_1_19_0
     default "1.18.0" if LIBC_NEWLIB_V_1_18_0
     default "1.17.0" if LIBC_NEWLIB_V_1_17_0
+    default "custom" if LIBC_NEWLIB_CUSTOM
     help
       Enter the tag you want to use.
       Leave empty to use the 'head' of the repository.
diff -r 712995e3e719 -r d02252752d4d scripts/build/libc/newlib.sh
--- a/scripts/build/libc/newlib.sh	Thu Oct 11 14:39:44 2012 +1000
+++ b/scripts/build/libc/newlib.sh	Thu Oct 11 14:39:45 2012 +1000
@@ -20,7 +20,10 @@
     libc_src="ftp://sources.redhat.com/pub/newlib";
     avr32headers_src="http://dev.doredevelopment.dk/avr32-toolchain/sources";
 
-    if [ -z "${CT_LIBC_NEWLIB_CVS}" ]; then
+    if [ "${CT_LIBC_NEWLIB_CUSTOM}" = "y" ]; then
+        CT_GetCustom "newlib" "${CT_LIBC_VERSION}" \
+        "${CT_LIBC_NEWLIB_CUSTOM_LOCATION}"
+    elif [ -z "${CT_LIBC_NEWLIB_CVS}" ]; then
         CT_GetFile "newlib-${CT_LIBC_VERSION}" ${libc_src}
     else
         CT_GetCVS "newlib-$(libc_newlib_version)"                   \
@@ -36,7 +39,10 @@
 }
 
 do_libc_extract() {
-    CT_Extract "newlib-$(libc_newlib_version)"
+    if [ "${CT_LIBC_NEWLIB_CUSTOM}" != "y" \
+         -o ! -d "${CT_SRC_DIR}/newlib-$(libc_newlib_version)" ]; then
+        CT_Extract "newlib-$(libc_newlib_version)"
+    fi
     CT_Patch "newlib" "$(libc_newlib_version)"
 
     if [ "${CT_ATMEL_AVR32_HEADERS}" = "y" ]; then

--
For unsubscribe information see http://sourceware.org/lists.html#faq


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]