summaryrefslogtreecommitdiff
path: root/scripts/build/binutils/binutils.sh
diff options
context:
space:
mode:
authorAlexey Neyman <stilor@att.net>2017-07-13 07:38:03 (GMT)
committerGitHub <noreply@github.com>2017-07-13 07:38:03 (GMT)
commit45c5bb0f484cba724be2c6105801dcce9a1a82d9 (patch)
tree8fd1c8eaa2ef203009d72b6ca6348611dcc5ee1c /scripts/build/binutils/binutils.sh
parent8f8e131d566af1f577d8fb6e62e6f121b7955472 (diff)
parentb32fcf7c1eea890a2bd3f88487f818ba241aabb1 (diff)
Merge pull request #767 from stilor/packages
Packages
Diffstat (limited to 'scripts/build/binutils/binutils.sh')
-rw-r--r--scripts/build/binutils/binutils.sh45
1 files changed, 9 insertions, 36 deletions
diff --git a/scripts/build/binutils/binutils.sh b/scripts/build/binutils/binutils.sh
index f378b4f..8fb51b8 100644
--- a/scripts/build/binutils/binutils.sh
+++ b/scripts/build/binutils/binutils.sh
@@ -4,44 +4,17 @@
# Download binutils
do_binutils_get() {
- if [ "${CT_BINUTILS_CUSTOM}" = "y" ]; then
- CT_GetCustom "binutils" "${CT_BINUTILS_CUSTOM_VERSION}" \
- "${CT_BINUTILS_CUSTOM_LOCATION}"
- else
- case "${CT_BINUTILS_VERSION}" in
- linaro-*)
- CT_GetLinaro "binutils" "${CT_BINUTILS_VERSION}"
- ;;
- *)
- CT_GetFile "binutils-${CT_BINUTILS_VERSION}" \
- {http,ftp}://{ftp.gnu.org/gnu,ftp.kernel.org/pub/linux/devel}/binutils \
- ftp://{sourceware.org,gcc.gnu.org}/pub/binutils/{releases,snapshots}
- ;;
- esac
- fi
-
+ CT_Fetch BINUTILS
if [ -n "${CT_ARCH_BINFMT_FLAT}" ]; then
- if [ "${CT_ELF2FLT_CUSTOM}" = "y" ]; then
- CT_GetCustom "elf2flt" "${CT_ELF2FLT_CUSTOM_VERSION}" \
- "${CT_ELF2FLT_CUSTOM_LOCATION}"
- else
- CT_GetGit elf2flt "${CT_ELF2FLT_GIT_CSET}" https://github.com/uclinux-dev/elf2flt.git
- fi
+ CT_Fetch ELF2FLT
fi
}
# Extract binutils
do_binutils_extract() {
- CT_Extract "binutils-${CT_BINUTILS_VERSION}"
- CT_Patch "binutils" "${CT_BINUTILS_VERSION}"
-
+ CT_ExtractPatch BINUTILS
if [ -n "${CT_ARCH_BINFMT_FLAT}" ]; then
- CT_Extract "elf2flt-${CT_ELF2FLT_GIT_CSET}"
- CT_Patch "elf2flt" "${CT_ELF2FLT_GIT_CSET}"
- fi
-
- if [ -n "${CT_ARCH_XTENSA_CUSTOM_NAME}" ]; then
- CT_ConfigureXtensa "binutils" "${CT_BINUTILS_VERSION}"
+ CT_ExtractPatch ELF2FLT
fi
}
@@ -67,7 +40,7 @@ do_binutils_for_build() {
if [ -n "${CT_ARCH_BINFMT_FLAT}" ]; then
# We re-use binutils' options, plus our owns
- binutils_opts+=( "binutils_src=${CT_SRC_DIR}/binutils-${CT_BINUTILS_VERSION}" )
+ binutils_opts+=( "binutils_src=${CT_SRC_DIR}/binutils" )
binutils_opts+=( "binutils_bld=${CT_BUILD_DIR}/build-binutils-build-${CT_BUILD}" )
CT_mkdir_pushd "${CT_BUILD_DIR}/build-elf2flt-build-${CT_BUILD}"
@@ -100,7 +73,7 @@ do_binutils_for_host() {
if [ -n "${CT_ARCH_BINFMT_FLAT}" ]; then
# We re-use binutils' options, plus our owns
- binutils_opts+=( "binutils_src=${CT_SRC_DIR}/binutils-${CT_BINUTILS_VERSION}" )
+ binutils_opts+=( "binutils_src=${CT_SRC_DIR}/binutils" )
binutils_opts+=( "binutils_bld=${CT_BUILD_DIR}/build-binutils-host-${CT_HOST}" )
CT_mkdir_pushd "${CT_BUILD_DIR}/build-elf2flt-host-${CT_HOST}"
@@ -207,7 +180,7 @@ do_binutils_backend() {
CXXFLAGS="${cflags}" \
LDFLAGS="${ldflags}" \
${CONFIG_SHELL} \
- "${CT_SRC_DIR}/binutils-${CT_BINUTILS_VERSION}/configure" \
+ "${CT_SRC_DIR}/binutils/configure" \
--build=${CT_BUILD} \
--host=${host} \
--target=${CT_TARGET} \
@@ -291,7 +264,7 @@ do_elf2flt_backend() {
CFLAGS="${cflags}" \
LDFLAGS="${ldflags}" \
${CONFIG_SHELL} \
- "${CT_SRC_DIR}/elf2flt-${CT_ELF2FLT_VERSION}/configure" \
+ "${CT_SRC_DIR}/elf2flt/configure" \
--build=${CT_BUILD} \
--host=${host} \
--target=${CT_TARGET} \
@@ -351,7 +324,7 @@ do_binutils_for_target() {
CT_DoExecLog CFG \
${CONFIG_SHELL} \
- "${CT_SRC_DIR}/binutils-${CT_BINUTILS_VERSION}/configure" \
+ "${CT_SRC_DIR}/binutils/configure" \
--build=${CT_BUILD} \
--host=${CT_TARGET} \
--target=${CT_TARGET} \