diff options
author | Bryan Hundven <bryanhundven@gmail.com> | 2014-12-15 09:33:43 -0800 |
---|---|---|
committer | Bryan Hundven <bryanhundven@gmail.com> | 2014-12-15 09:33:43 -0800 |
commit | 0ee9ecbcf709b0e90dd825768bb917ca89db5e77 (patch) | |
tree | bdd2bb04b5a1ac92c567d5fd82b65d70b413a696 /scripts/build/libc | |
parent | 7275900f9ffce61fabc90e0ff870fec175976ffb (diff) | |
parent | 163a1737b8464ae241c0bfc1dfe61bbc668b3428 (diff) | |
download | crosstool-ng-0ee9ecbcf709b0e90dd825768bb917ca89db5e77.tar.gz crosstool-ng-0ee9ecbcf709b0e90dd825768bb917ca89db5e77.tar.bz2 crosstool-ng-0ee9ecbcf709b0e90dd825768bb917ca89db5e77.zip |
Merge pull request #6 from davidholsgrove/libc_custom_location
Libc custom location
Diffstat (limited to 'scripts/build/libc')
-rw-r--r-- | scripts/build/libc/eglibc.sh | 11 | ||||
-rw-r--r-- | scripts/build/libc/glibc-eglibc.sh-common | 12 | ||||
-rw-r--r-- | scripts/build/libc/glibc.sh | 7 |
3 files changed, 23 insertions, 7 deletions
diff --git a/scripts/build/libc/eglibc.sh b/scripts/build/libc/eglibc.sh index d7960d96..1f1095fa 100644 --- a/scripts/build/libc/eglibc.sh +++ b/scripts/build/libc/eglibc.sh @@ -27,9 +27,14 @@ do_libc_get() { *) 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_GetCustom "eglibc" "${CT_LIBC_VERSION}" "${CT_LIBC_EGLIBC_CUSTOM_LOCATION}" + CT_LIBC_CUSTOM_LOCATION="${CT_SRC_DIR}/eglibc-${CT_LIBC_VERSION}" + 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 --git a/scripts/build/libc/glibc-eglibc.sh-common b/scripts/build/libc/glibc-eglibc.sh-common index af3b1f14..367a80d9 100644 --- a/scripts/build/libc/glibc-eglibc.sh-common +++ b/scripts/build/libc/glibc-eglibc.sh-common @@ -4,10 +4,16 @@ do_libc_extract() { local addon - # Extract the main tarball - CT_Extract "${CT_LIBC}-${CT_LIBC_VERSION}" + # Attempt CT_EXTRACT only if NOT custom, or CUSTOM_LOCATION is not a directory + 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}" + # Attempt CT_PATCH only if NOT custom + if [ "${CT_LIBC_CUSTOM}" != "y" ]; then + CT_Patch nochdir "${CT_LIBC}" "${CT_LIBC_VERSION}" + fi # Extract the add-opns for addon in $(do_libc_add_ons_list " "); do diff --git a/scripts/build/libc/glibc.sh b/scripts/build/libc/glibc.sh index 7bc47c58..8093d94c 100644 --- a/scripts/build/libc/glibc.sh +++ b/scripts/build/libc/glibc.sh @@ -19,9 +19,14 @@ do_libc_get() { addons_list=($(do_libc_add_ons_list " ")) # Main source - CT_GetFile "glibc-${CT_LIBC_VERSION}" \ + if [ "${CT_LIBC_CUSTOM}" = "y" ]; then + CT_GetCustom "glibc" "${CT_LIBC_VERSION}" "${CT_LIBC_GLIBC_CUSTOM_LOCATION}" + CT_LIBC_CUSTOM_LOCATION="${CT_SRC_DIR}/glibc-${CT_LIBC_VERSION}" + else + CT_GetFile "glibc-${CT_LIBC_VERSION}" \ {http,ftp,https}://ftp.gnu.org/gnu/glibc \ ftp://{sourceware.org,gcc.gnu.org}/pub/glibc/{releases,snapshots} + fi # C library addons for addon in "${addons_list[@]}"; do |