summaryrefslogtreecommitdiff
path: root/scripts/build/libc/uClibc.sh
diff options
context:
space:
mode:
authorBryan Hundven <bryanhundven@gmail.com>2015-11-10 22:41:33 (GMT)
committerBryan Hundven <bryanhundven@gmail.com>2015-11-13 00:15:41 (GMT)
commit21a448516e2585d581f9dd90c566600831d7c86b (patch)
tree100764a657eed18b474499befbf4d51dda311398 /scripts/build/libc/uClibc.sh
parent1c924f06fa2890b40d1716564c83aac644392c65 (diff)
uClibc: Add support for uClibc-ng
This commit adds uClibc-ng 1.0.8. Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
Diffstat (limited to 'scripts/build/libc/uClibc.sh')
-rw-r--r--scripts/build/libc/uClibc.sh27
1 files changed, 17 insertions, 10 deletions
diff --git a/scripts/build/libc/uClibc.sh b/scripts/build/libc/uClibc.sh
index 0836552..0f7db19 100644
--- a/scripts/build/libc/uClibc.sh
+++ b/scripts/build/libc/uClibc.sh
@@ -7,15 +7,22 @@
uclibc_locales_version=030818
uclibc_local_tarball="uClibc-locale-${uclibc_locales_version}"
-# Download uClibc
-do_libc_get() {
+if [ "${CT_LIBC_UCLIBC_NG}" = "y" ]; then
+ uclibc_name="uClibc-ng"
+ libc_src="http://downloads.uclibc-ng.org/releases/${CT_LIBC_VERSION}"
+else
+ uclibc_name="uClibc"
libc_src="http://www.uclibc.org/downloads
http://www.uclibc.org/downloads/old-releases"
+fi
+
+# Download uClibc
+do_libc_get() {
if [ "${CT_LIBC_UCLIBC_CUSTOM}" = "y" ]; then
- CT_GetCustom "uClibc" "${CT_LIBC_VERSION}" \
+ CT_GetCustom "${uclibc_name}" "${CT_LIBC_VERSION}" \
"${CT_LIBC_UCLIBC_CUSTOM_LOCATION}"
else
- CT_GetFile "uClibc-${CT_LIBC_VERSION}" ${libc_src}
+ CT_GetFile "${uclibc_name}-${CT_LIBC_VERSION}" ${libc_src}
fi
# uClibc locales
if [ "${CT_LIBC_UCLIBC_LOCALES_PREGEN_DATA}" = "y" ]; then
@@ -33,9 +40,9 @@ do_libc_extract() {
# 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-${CT_LIBC_VERSION}" ]; then
- CT_Extract "uClibc-${CT_LIBC_VERSION}"
- CT_Patch "uClibc" "${CT_LIBC_VERSION}"
+ -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
# uClibc locales
@@ -43,7 +50,7 @@ do_libc_extract() {
# broken, so just link it in place...
if [ "${CT_LIBC_UCLIBC_LOCALES_PREGEN_DATA}" = "y" \
-a ! -f "${CT_SRC_DIR}/.${uclibc_local_tarball}.extracted" ]; then
- CT_Pushd "${CT_SRC_DIR}/uClibc-${CT_LIBC_VERSION}/extra/locale"
+ CT_Pushd "${CT_SRC_DIR}/${uclibc_name}-${CT_LIBC_VERSION}/extra/locale"
CT_DoExecLog ALL ln -s "${CT_TARBALLS_DIR}/${uclibc_local_tarball}.tgz" .
CT_Popd
touch "${CT_SRC_DIR}/.${uclibc_local_tarball}.extracted"
@@ -77,7 +84,7 @@ do_libc_start_files() {
# Simply copy files until uClibc has the ability to build out-of-tree
CT_DoLog EXTRA "Copying sources to build dir"
- CT_DoExecLog ALL cp -av "${CT_SRC_DIR}/uClibc-${CT_LIBC_VERSION}" \
+ CT_DoExecLog ALL cp -av "${CT_SRC_DIR}/${uclibc_name}-${CT_LIBC_VERSION}" \
"${CT_BUILD_DIR}/build-libc-headers"
cd "${CT_BUILD_DIR}/build-libc-headers"
@@ -161,7 +168,7 @@ do_libc() {
# Simply copy files until uClibc has the ability to build out-of-tree
CT_DoLog EXTRA "Copying sources to build dir"
- CT_DoExecLog ALL cp -av "${CT_SRC_DIR}/uClibc-${CT_LIBC_VERSION}" \
+ CT_DoExecLog ALL cp -av "${CT_SRC_DIR}/${uclibc_name}-${CT_LIBC_VERSION}" \
"${CT_BUILD_DIR}/build-libc"
cd "${CT_BUILD_DIR}/build-libc"