summaryrefslogtreecommitdiff
path: root/scripts/build/libc
diff options
context:
space:
mode:
authorBryan Hundven <bryanhundven@gmail.com>2015-11-26 13:06:21 (GMT)
committerBryan Hundven <bryanhundven@gmail.com>2015-12-08 18:55:13 (GMT)
commit4e2227e8a5537a8553c503e55d2cb2190f2a0d2f (patch)
tree051e239d76d8bc60062efdbc3ecee9338a740fbc /scripts/build/libc
parent1b3131448809f05d47cd50a98ede0d1b78eb85f0 (diff)
scripts: Update usage of CT_GetCustom
This commit updates the build scripts to match the new usage of CT_GetCustom from the previous change. Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
Diffstat (limited to 'scripts/build/libc')
-rw-r--r--scripts/build/libc/avr-libc.sh14
-rw-r--r--scripts/build/libc/glibc.sh16
-rw-r--r--scripts/build/libc/musl.sh14
-rw-r--r--scripts/build/libc/newlib.sh10
-rw-r--r--scripts/build/libc/uClibc.sh16
5 files changed, 15 insertions, 55 deletions
diff --git a/scripts/build/libc/avr-libc.sh b/scripts/build/libc/avr-libc.sh
index 103a795..b73f990 100644
--- a/scripts/build/libc/avr-libc.sh
+++ b/scripts/build/libc/avr-libc.sh
@@ -6,24 +6,14 @@ do_libc_get() {
libc_src="http://download.savannah.gnu.org/releases/avr-libc"
if [ "${CT_LIBC_AVR_LIBC_CUSTOM}" = "y" ]; then
- CT_GetCustom "avr-libc" "${CT_LIBC_VERSION}" \
- "${CT_LIBC_AVR_LIBC_CUSTOM_LOCATION}"
+ CT_GetCustom "avr-libc" "${CT_LIBC_AVR_LIBC_CUSTOM_VERSION}" \
+ "${CT_LIBC_AVR_LIBC_CUSTOM_LOCATION}"
else # ! custom location
CT_GetFile "avr-libc-${CT_LIBC_VERSION}" "${libc_src}"
fi # ! custom location
}
do_libc_extract() {
- # If using custom directory location, nothing to do.
- if [ "${CT_LIBC_AVR_LIBC_CUSTOM}" = "y" ]; then
- # Abort if the custom directory is not found.
- if ! [ -d "${CT_SRC_DIR}/avr-libc-${CT_LIBC_VERSION}" ]; then
- CT_Abort "Directory not found: ${CT_SRC_DIR}/avr-libc-${CT_LIBC_VERSION}"
- fi
-
- return 0
- fi
-
CT_Extract "avr-libc-${CT_LIBC_VERSION}"
CT_Patch "avr-libc" "${CT_LIBC_VERSION}"
}
diff --git a/scripts/build/libc/glibc.sh b/scripts/build/libc/glibc.sh
index 126e9e0..d45248a 100644
--- a/scripts/build/libc/glibc.sh
+++ b/scripts/build/libc/glibc.sh
@@ -6,16 +6,10 @@
do_libc_extract() {
local addon
- # 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_Extract "${CT_LIBC}-${CT_LIBC_VERSION}"
CT_Pushd "${CT_SRC_DIR}/${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
+ CT_Patch nochdir "${CT_LIBC}" "${CT_LIBC_VERSION}"
# Extract the add-opns if => 2.17
if [ "${CT_LIBC_GLIBC_2_17_or_later}" != "y" ]; then
@@ -554,9 +548,9 @@ do_libc_get() {
addons_list=($(do_libc_add_ons_list " "))
# Main source
- 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}"
+ if [ "${CT_LIBC_GLIBC_CUSTOM}" = "y" ]; then
+ CT_GetCustom "glibc" "${CT_LIBC_GLIBC_CUSTOM_VERSION}" \
+ "${CT_LIBC_GLIBC_CUSTOM_LOCATION}"
else
if echo ${CT_LIBC_VERSION} |${grep} -q linaro; then
# Linaro glibc releases come from regular downloads...
diff --git a/scripts/build/libc/musl.sh b/scripts/build/libc/musl.sh
index f8f135c..f7dbb97 100644
--- a/scripts/build/libc/musl.sh
+++ b/scripts/build/libc/musl.sh
@@ -8,24 +8,14 @@ do_libc_get() {
libc_src="http://www.musl-libc.org/releases"
if [ "${CT_LIBC_MUSL_CUSTOM}" = "y" ]; then
- CT_GetCustom "musl" "${CT_LIBC_VERSION}" \
- "${CT_LIBC_MUSL_CUSTOM_LOCATION}"
+ CT_GetCustom "musl" "${CT_LIBC_MUSL_CUSTOM_VERSION}" \
+ "${CT_LIBC_MUSL_CUSTOM_LOCATION}"
else # ! custom location
CT_GetFile "musl-${CT_LIBC_VERSION}" "${libc_src}"
fi # ! custom location
}
do_libc_extract() {
- # If using custom directory location, nothing to do.
- if [ "${CT_LIBC_MUSL_CUSTOM}" = "y" ]; then
- # Abort if the custom directory is not found.
- if ! [ -d "${CT_SRC_DIR}/musl-${CT_LIBC_VERSION}" ]; then
- CT_Abort "Directory not found: ${CT_SRC_DIR}/musl-${CT_LIBC_VERSION}"
- fi
-
- return 0
- fi
-
CT_Extract "musl-${CT_LIBC_VERSION}"
CT_Patch "musl" "${CT_LIBC_VERSION}"
}
diff --git a/scripts/build/libc/newlib.sh b/scripts/build/libc/newlib.sh
index a4fe82e..ba52268 100644
--- a/scripts/build/libc/newlib.sh
+++ b/scripts/build/libc/newlib.sh
@@ -14,8 +14,8 @@ do_libc_get() {
ftp://sourceware.org/pub/newlib}"
if [ "${CT_LIBC_NEWLIB_CUSTOM}" = "y" ]; then
- CT_GetCustom "newlib" "${CT_LIBC_VERSION}" \
- "${CT_LIBC_NEWLIB_CUSTOM_LOCATION}"
+ CT_GetCustom "newlib" "${CT_LIBC_NEWLIB_CUSTOM_VERSION}" \
+ "${CT_LIBC_NEWLIB_CUSTOM_LOCATION}"
else # ! custom location
if echo ${CT_LIBC_VERSION} |${grep} -q linaro; then
YYMM=`echo ${CT_LIBC_VERSION} |cut -d- -f3 |${sed} -e 's,^..,,'`
@@ -30,12 +30,6 @@ do_libc_get() {
}
do_libc_extract() {
- # If using custom directory location, nothing to do
- if [ "${CT_LIBC_NEWLIB_CUSTOM}" = "y" \
- -a -d "${CT_SRC_DIR}/newlib-${CT_LIBC_VERSION}" ]; then
- return 0
- fi
-
CT_Extract "newlib-${CT_LIBC_VERSION}"
CT_Patch "newlib" "${CT_LIBC_VERSION}"
diff --git a/scripts/build/libc/uClibc.sh b/scripts/build/libc/uClibc.sh
index f5b871c..422412c 100644
--- a/scripts/build/libc/uClibc.sh
+++ b/scripts/build/libc/uClibc.sh
@@ -19,8 +19,8 @@ fi
# Download uClibc
do_libc_get() {
if [ "${CT_LIBC_UCLIBC_CUSTOM}" = "y" ]; then
- CT_GetCustom "${uclibc_name}" "${CT_LIBC_VERSION}" \
- "${CT_LIBC_UCLIBC_CUSTOM_LOCATION}"
+ CT_GetCustom "${uclibc_name}" "${CT_LIBC_UCLIBC_CUSTOM_VERSION}" \
+ "${CT_LIBC_UCLIBC_CUSTOM_LOCATION}"
else
CT_GetFile "${uclibc_name}-${CT_LIBC_VERSION}" ${libc_src}
fi
@@ -34,16 +34,8 @@ do_libc_get() {
# Extract uClibc
do_libc_extract() {
- # If not using custom directory location, extract and patch
- # Note: we do the inverse test we do in other components,
- # because here we still need to extract the locales, even for
- # custom location directory. Just use negate the whole test,
- # to keep it the same as for other components.
- if ! [ "${CT_LIBC_UCLIBC_CUSTOM}" = "y" \
- -a -d "${CT_SRC_DIR}/${uclibc_name}-${CT_LIBC_VERSION}" ]; then
- CT_Extract "${uclibc_name}-${CT_LIBC_VERSION}"
- CT_Patch "${uclibc_name}" "${CT_LIBC_VERSION}"
- fi
+ CT_Extract "${uclibc_name}-${CT_LIBC_VERSION}"
+ CT_Patch "${uclibc_name}" "${CT_LIBC_VERSION}"
# uClibc locales
# Extracting pregen locales ourselves is kinda