public inbox for crossgcc@sourceware.org
 help / color / mirror / Atom feed
From: David Holsgrove <david.holsgrove@xilinx.com>
To: bryanhundven@gmail.com, yann.morin.1998@free.fr
Cc: crossgcc@sourceware.org
Subject: [PATCH 4 of 6] libc: Add CUSTOM version and CUSTOM_LOCATION config options and GetCustom
Date: Wed, 10 Oct 2012 06:08:00 -0000	[thread overview]
Message-ID: <e3e4a439914d0d206b08.1349849277@localhost.localdomain> (raw)
In-Reply-To: <patchbomb.1349849273@localhost.localdomain>

# HG changeset patch
# User David Holsgrove <david.holsgrove@xilinx.com>
# Date 1349847854 -36000
# Node ID e3e4a439914d0d206b08a7bed0245fc4854bc374
# Parent  7748cfa416638a6d2b808628f6e9a84ed37a89e5
libc: Add CUSTOM version and CUSTOM_LOCATION config options and GetCustom

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

diff -r 7748cfa41663 -r e3e4a439914d config/libc/eglibc.in
--- a/config/libc/eglibc.in	Wed Oct 10 15:44:14 2012 +1000
+++ b/config/libc/eglibc.in	Wed Oct 10 15:44:14 2012 +1000
@@ -85,6 +85,13 @@
     help
       Selecting this will export the trunk of the eglibc subversion repository.
 
+config LIBC_EGLIBC_CUSTOM
+    bool
+    prompt "Custom eglibc"
+    depends on EXPERIMENTAL
+    select LIBC_EGLIBC_2_16_or_later
+    select LIBC_CUSTOM
+
 endchoice
 
 config LIBC_VERSION
@@ -104,6 +111,7 @@
     default "2_6" if LIBC_EGLIBC_V_2_6
     default "2_5" if LIBC_EGLIBC_V_2_5
     default "trunk" if LIBC_EGLIBC_V_TRUNK
+    default "custom" if LIBC_EGLIBC_CUSTOM
 
 config LIBC_EGLIBC_2_16_or_later
     bool
@@ -140,6 +148,22 @@
 config LIBC_EGLIBC_HAS_PKGVERSION_BUGURL
     bool
 
+config LIBC_CUSTOM
+    bool
+
+if LIBC_EGLIBC_CUSTOM
+
+config LIBC_EGLIBC_CUSTOM_LOCATION
+    string
+    prompt "full path to custom eglibc source"
+    default ""
+    help
+      Enter the path to the directory (or tarball) of your source for eglibc,
+      or leave blank to use default CT_CUSTOM_LOCATION_ROOT_DIR/eglibc
+
+endif # LIBC_EGLIBC_CUSTOM
+if ! LIBC_EGLIBC_CUSTOM
+
 if CONFIGURE_has_svn
 
 config EGLIBC_REVISION
@@ -189,6 +213,7 @@
 comment "otherwise you won't be able to download eglibc"
 
 endif # ! CONFIGURE_has_svn
+endif # ! LIBC_EGLIBC_CUSTOM
 
 config EGLIBC_OPT_SIZE
     bool
diff -r 7748cfa41663 -r e3e4a439914d config/libc/glibc.in
--- a/config/libc/glibc.in	Wed Oct 10 15:44:14 2012 +1000
+++ b/config/libc/glibc.in	Wed Oct 10 15:44:14 2012 +1000
@@ -9,34 +9,6 @@
 
 choice
     bool
-    prompt "Retrieval method"
-    default LIBC_GLIBC_TARBALL
-
-config LIBC_GLIBC_TARBALL
-    bool
-    prompt "Released tarball"
-    help
-      Until end of Februrary 2009, there was no tarball for glibc releases
-      2.8 and later. This was intentional.
-      
-      Then, all of a sudden, tarballs for those releases have appeared at the
-      traditional download place (ftp.gnu.org).
-      
-      Some of the glibc people argue that fixes are committed to the maintenance
-      branch, and thus it is the best plac e to retrieve the glibc from.
-      On the other hand, it might be preferable to always generate a toolchain
-      using a known code-base, so the toolchain can be reproducible.
-      
-      For version prior to 2.8, tarballs were readily available.
-      
-      If you want your toolchain to really be reproducible, say 'Y' here.
-      If you can live with a moving code-base, look at the other choice
-      entries, below.
-
-endchoice
-
-choice
-    bool
     prompt "glibc version"
 # Don't remove next line
 # CT_INSERT_VERSION_BELOW
@@ -109,8 +81,60 @@
     depends on OBSOLETE
     select LIBC_SUPPORT_LINUXTHREADS
 
+config LIBC_GLIBC_CUSTOM
+    bool
+    prompt "Custom glibc"
+    depends on EXPERIMENTAL
+    select LIBC_CUSTOM
+
 endchoice
 
+config LIBC_CUSTOM
+    bool
+
+if LIBC_GLIBC_CUSTOM
+
+config LIBC_GLIBC_CUSTOM_LOCATION
+    string
+    prompt "full path to custom glibc source"
+    default ""
+    help
+      Enter the path to the directory (or tarball) of your source for glibc,
+      or leave blank to use default CT_CUSTOM_LOCATION_ROOT_DIR/glibc
+
+endif # LIBC_GLIBC_CUSTOM
+if ! LIBC_GLIBC_CUSTOM
+
+choice
+    bool
+    prompt "Retrieval method"
+    default LIBC_GLIBC_TARBALL
+
+config LIBC_GLIBC_TARBALL
+    bool
+    prompt "Released tarball"
+    help
+      Until end of Februrary 2009, there was no tarball for glibc releases
+      2.8 and later. This was intentional.
+      
+      Then, all of a sudden, tarballs for those releases have appeared at the
+      traditional download place (ftp.gnu.org).
+      
+      Some of the glibc people argue that fixes are committed to the maintenance
+      branch, and thus it is the best plac e to retrieve the glibc from.
+      On the other hand, it might be preferable to always generate a toolchain
+      using a known code-base, so the toolchain can be reproducible.
+      
+      For version prior to 2.8, tarballs were readily available.
+      
+      If you want your toolchain to really be reproducible, say 'Y' here.
+      If you can live with a moving code-base, look at the other choice
+      entries, below.
+
+endchoice
+
+endif # ! LIBC_GLIBC_CUSTOM
+
 config LIBC_VERSION
     string
 # Don't remove next line
@@ -130,3 +154,4 @@
     default "2.6" if LIBC_GLIBC_V_2_6
     default "2.5.1" if LIBC_GLIBC_V_2_5_1
     default "2.5" if LIBC_GLIBC_V_2_5
+    default "custom" if LIBC_GLIBC_CUSTOM
diff -r 7748cfa41663 -r e3e4a439914d config/libc/newlib.in
--- a/config/libc/newlib.in	Wed Oct 10 15:44:14 2012 +1000
+++ b/config/libc/newlib.in	Wed Oct 10 15:44:14 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 7748cfa41663 -r e3e4a439914d scripts/build/libc/eglibc.sh
--- a/scripts/build/libc/eglibc.sh	Wed Oct 10 15:44:14 2012 +1000
+++ b/scripts/build/libc/eglibc.sh	Wed Oct 10 15:44:14 2012 +1000
@@ -28,9 +28,19 @@
         *)      svn_base+="/branches/eglibc-${CT_LIBC_VERSION}";;
     esac
 
-    CT_GetSVN "eglibc-${CT_LIBC_VERSION}"   \
-              "${svn_base}/libc"            \
-              "${CT_EGLIBC_REVISION:-HEAD}"
+    if [ "${CT_LIBC_CUSTOM}" = "y" ]; then
+        CT_TestAndAbort "Custom eglibc: CT_CUSTOM_LOCATION_ROOT_DIR or CT_LIBC_EGLIBC_CUSTOM_LOCATION must be set." \
+        -z "${CT_CUSTOM_LOCATION_ROOT_DIR}" -a -z "${CT_LIBC_EGLIBC_CUSTOM_LOCATION}"
+        CT_LIBC_CUSTOM_LOCATION="${CT_LIBC_EGLIBC_CUSTOM_LOCATION}"
+        if [ -n "${CT_CUSTOM_LOCATION_ROOT_DIR}" -a -z "${CT_LIBC_EGLIBC_CUSTOM_LOCATION}" ]; then
+            CT_LIBC_CUSTOM_LOCATION="${CT_CUSTOM_LOCATION_ROOT_DIR}/eglibc"
+        fi
+        CT_GetCustom "eglibc-${CT_LIBC_VERSION}" "${CT_LIBC_CUSTOM_LOCATION}"
+    else
+        CT_GetSVN "eglibc-${CT_LIBC_VERSION}"   \
+                  "${svn_base}/libc"            \
+                  "${CT_EGLIBC_REVISION:-HEAD}"
+    fi
 
     if [ "${CT_LIBC_LOCALES}" = "y" ]; then
         extra_addons+=("localedef")
diff -r 7748cfa41663 -r e3e4a439914d scripts/build/libc/glibc-eglibc.sh-common
--- a/scripts/build/libc/glibc-eglibc.sh-common	Wed Oct 10 15:44:14 2012 +1000
+++ b/scripts/build/libc/glibc-eglibc.sh-common	Wed Oct 10 15:44:14 2012 +1000
@@ -5,7 +5,10 @@
     local addon
 
     # Extract the main tarball
-    CT_Extract "${CT_LIBC}-${CT_LIBC_VERSION}"
+    if [ "${CT_LIBC_CUSTOM}" != "y" \
+         -o ! -d "${CT_LIBC_CUSTOM_LOCATION}" ]; then
+        CT_Extract "${CT_LIBC}-${CT_LIBC_VERSION}"
+    fi
     CT_Pushd "${CT_SRC_DIR}/${CT_LIBC}-${CT_LIBC_VERSION}"
     CT_Patch nochdir "${CT_LIBC}" "${CT_LIBC_VERSION}"
 
diff -r 7748cfa41663 -r e3e4a439914d scripts/build/libc/glibc.sh
--- a/scripts/build/libc/glibc.sh	Wed Oct 10 15:44:14 2012 +1000
+++ b/scripts/build/libc/glibc.sh	Wed Oct 10 15:44:14 2012 +1000
@@ -20,10 +20,20 @@
     addons_list=($(do_libc_add_ons_list " "))
 
     # Main source
-    CT_GetFile "glibc-${CT_LIBC_VERSION}"               \
-               {ftp,http}://ftp.gnu.org/gnu/glibc       \
-               ftp://gcc.gnu.org/pub/glibc/releases     \
-               ftp://gcc.gnu.org/pub/glibc/snapshots
+    if [ "${CT_LIBC_CUSTOM}" = "y" ]; then
+        CT_TestAndAbort "Custom glibc: CT_CUSTOM_LOCATION_ROOT_DIR or CT_LIBC_GLIBC_CUSTOM_LOCATION must be set." \
+        -z "${CT_CUSTOM_LOCATION_ROOT_DIR}" -a -z "${CT_LIBC_GLIBC_CUSTOM_LOCATION}"
+        CT_LIBC_CUSTOM_LOCATION="${CT_LIBC_GLIBC_CUSTOM_LOCATION}"
+        if [ -n "${CT_CUSTOM_LOCATION_ROOT_DIR}" -a -z "${CT_LIBC_GLIBC_CUSTOM_LOCATION}" ]; then
+            CT_LIBC_CUSTOM_LOCATION="${CT_CUSTOM_LOCATION_ROOT_DIR}/glibc"
+        fi
+        CT_GetCustom "glibc-${CT_LIBC_VERSION}" "${CT_LIBC_CUSTOM_LOCATION}"
+    else
+        CT_GetFile "glibc-${CT_LIBC_VERSION}"               \
+                   {ftp,http}://ftp.gnu.org/gnu/glibc       \
+                   ftp://gcc.gnu.org/pub/glibc/releases     \
+                   ftp://gcc.gnu.org/pub/glibc/snapshots
+    fi
 
     # C library addons
     for addon in "${addons_list[@]}"; do
diff -r 7748cfa41663 -r e3e4a439914d scripts/build/libc/newlib.sh
--- a/scripts/build/libc/newlib.sh	Wed Oct 10 15:44:14 2012 +1000
+++ b/scripts/build/libc/newlib.sh	Wed Oct 10 15:44:14 2012 +1000
@@ -20,7 +20,14 @@
     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_TestAndAbort "Custom newlib: CT_CUSTOM_LOCATION_ROOT_DIR or CT_LIBC_NEWLIB_CUSTOM_LOCATION must be set." \
+        -z "${CT_CUSTOM_LOCATION_ROOT_DIR}" -a -z "${CT_LIBC_NEWLIB_CUSTOM_LOCATION}"
+        if [ -n "${CT_CUSTOM_LOCATION_ROOT_DIR}" -a -z "${CT_LIBC_NEWLIB_CUSTOM_LOCATION}" ]; then
+            CT_LIBC_NEWLIB_CUSTOM_LOCATION="${CT_CUSTOM_LOCATION_ROOT_DIR}/newlib"
+        fi
+        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 +43,10 @@
 }
 
 do_libc_extract() {
-    CT_Extract "newlib-$(libc_newlib_version)"
+    if [ "${CT_LIBC_NEWLIB_CUSTOM}" != "y" \
+         -o ! -d "${CT_LIBC_NEWLIB_CUSTOM_LOCATION}" ]; 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

  parent reply	other threads:[~2012-10-10  6:08 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-04  4:46 [PATCH 0 of 1 ] RFC - Add CUSTOM version for gcc, binutils, libc, gdb David Holsgrove
2012-10-04  4:47 ` [PATCH 1 of 1] config+scripts: Custom gcc, binutils, libc, gdb version David Holsgrove
2012-10-05  8:48   ` Florian Fainelli
2012-10-05  7:57 ` [PATCH 0 of 1 ] RFC - Add CUSTOM version for gcc, binutils, libc, gdb Bryan Hundven
2012-10-10  6:08 ` [PATCH 0 of 6 " David Holsgrove
2012-10-10  6:08   ` [PATCH 1 of 6] config+scripts: Extract CUSTOM / CUSTOM_LOCATION currently in linux.sh David Holsgrove
2012-10-10 22:19     ` Yann E. MORIN
2012-10-10  6:08   ` [PATCH 5 of 6] binutils: Add CUSTOM version and CUSTOM_LOCATION config options and GetCustom David Holsgrove
2012-10-10 22:41     ` Yann E. MORIN
2012-10-10  6:08   ` [PATCH 3 of 6] cc/gcc: " David Holsgrove
2012-10-10  6:08   ` [PATCH 6 of 6] debug/gdb: " David Holsgrove
2012-10-10 22:45     ` Yann E. MORIN
2012-10-10  6:08   ` David Holsgrove [this message]
2012-10-10 22:38     ` [PATCH 4 of 6] libc: " Yann E. MORIN
2012-10-10  6:08   ` [PATCH 2 of 6] kernel/linux: Extract custom location function and use generic GetCustom David Holsgrove
2012-10-10 22:25     ` Yann E. MORIN
2012-10-10 21:56   ` [PATCH 0 of 6 ] RFC - Add CUSTOM version for gcc, binutils, libc, gdb Yann E. MORIN
2012-10-11  4:53   ` [PATCH 00 of 13 ] " David Holsgrove
2012-10-11  4:53     ` [PATCH 01 of 13] libc/glibc: Remove redundant LIBC_GLIBC_TARBALL config option David Holsgrove
2012-10-11 18:53       ` Yann E. MORIN
2012-10-11  4:53     ` [PATCH 02 of 13] scripts/functions: add a generic custom location infrastructure David Holsgrove
2012-10-13 22:00       ` Yann E. MORIN
2012-10-11  4:53     ` [PATCH 04 of 13] kernel/linux: use generic custom infrastructure David Holsgrove
2012-10-13 22:00       ` Yann E. MORIN
2012-10-11  4:53     ` [PATCH 03 of 13] config/paths: add a generic custom location infrastructure David Holsgrove
2012-10-13 22:00       ` scripts/functions: " Yann E. MORIN
2012-10-11  4:53     ` [PATCH 06 of 13] binutils/binutils: Add CUSTOM version and CUSTOM_LOCATION config options and GetCustom David Holsgrove
2012-10-29 23:27       ` Yann E. MORIN
2012-10-11  4:53     ` [PATCH 07 of 13] binutils/elf2flt: Add CUSTOM version, CUSTOM_LOCATION config options, GetCustom David Holsgrove
2012-10-29 23:27       ` Yann E. MORIN
2012-10-11  4:53     ` [PATCH 05 of 13] cc/gcc: Add CUSTOM version and CUSTOM_LOCATION config options and GetCustom David Holsgrove
2012-10-11 20:24       ` Yann E. MORIN
2012-10-15  1:31         ` David Holsgrove
2012-10-16 20:38           ` Yann E. MORIN
2012-10-17  7:52             ` David Holsgrove
2012-10-29 23:27       ` Yann E. MORIN
2012-10-11  4:54     ` [PATCH 11 of 13] libc/eglibc: " David Holsgrove
2012-10-11  4:54     ` [PATCH 09 of 13] libc/{, e}glibc: Add CUSTOM version, " David Holsgrove
2012-10-11  4:54     ` [PATCH 13 of 13] libc/newlib: Add CUSTOM version and " David Holsgrove
2012-10-30 22:20       ` Yann E. MORIN
2012-10-11  4:54     ` [PATCH 08 of 13] debug/gdb: " David Holsgrove
2012-10-29 23:28       ` Yann E. MORIN
2012-10-11  4:54     ` [PATCH 12 of 13] libc/uClibc: " David Holsgrove
2012-10-31 22:55       ` Yann E. MORIN
2012-10-11  4:54     ` [PATCH 10 of 13] libc/glibc: " David Holsgrove
2012-10-22 21:56     ` [PATCH 00 of 13 ] Add CUSTOM version for gcc, binutils, libc, gdb Yann E. MORIN
2012-10-23  8:09       ` David Holsgrove

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e3e4a439914d0d206b08.1349849277@localhost.localdomain \
    --to=david.holsgrove@xilinx.com \
    --cc=bryanhundven@gmail.com \
    --cc=crossgcc@sourceware.org \
    --cc=yann.morin.1998@free.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).