summaryrefslogtreecommitdiff
path: root/scripts/build
diff options
context:
space:
mode:
authorAlexey Neyman <stilor@att.net>2017-06-26 05:54:29 (GMT)
committerAlexey Neyman <stilor@att.net>2017-07-08 17:57:56 (GMT)
commit993b4acec54f02f3391fce6b56e0366304b79f01 (patch)
tree46dcfb030a2c2d886cdbbb8ab1ac310d72ae877f /scripts/build
parentee983f5f92aedbadaac9c756568c8fd6c04d58bc (diff)
Building packages using the new framework
(fails at building GMP off the VCS because it needs to run bootstrap scripts) Signed-off-by: Alexey Neyman <stilor@att.net>
Diffstat (limited to 'scripts/build')
-rw-r--r--scripts/build/arch/xtensa.sh61
-rw-r--r--scripts/build/cc/gcc.sh1
-rw-r--r--scripts/build/kernel/linux.sh30
-rw-r--r--scripts/build/libc/glibc.sh4
4 files changed, 19 insertions, 77 deletions
diff --git a/scripts/build/arch/xtensa.sh b/scripts/build/arch/xtensa.sh
index bf94ddf..744bbb2 100644
--- a/scripts/build/arch/xtensa.sh
+++ b/scripts/build/arch/xtensa.sh
@@ -12,67 +12,6 @@ CT_DoArchTupleValues() {
esac
}
-# This function updates the specified component (binutils, gcc, gdb, etc.)
-# with the processor specific configuration.
-CT_ConfigureXtensa() {
- local component="${1}"
- local version="${2}"
- local custom_overlay="xtensa_${CT_ARCH_XTENSA_CUSTOM_NAME}.tar"
- local custom_location="${CT_ARCH_XTENSA_CUSTOM_OVERLAY_LOCATION}"
-
- if [ -z "${CT_ARCH_XTENSA_CUSTOM_NAME}" ]; then
- custom_overlay="xtensa-overlay.tar"
- fi
-
- CT_TestAndAbort "${custom_overlay}: CT_ARCH_XTENSA_CUSTOM_OVERLAY_LOCATION must be set." -z "${custom_location}"
-
- local full_file="${custom_location}/${custom_overlay}"
- local basename="${component}-${version}"
- local ext
-
- ext=${full_file/*./.}
-
- if [ -z "${ext}" ] ; then
- CT_DoLog WARN "'${full_file}' not found"
- return 1
- fi
-
- if [ -e "${CT_SRC_DIR}/.${basename}.configuring" ]; then
- CT_DoLog ERROR "The '${basename}' source were partially configured."
- CT_DoLog ERROR "Please remove first:"
- CT_DoLog ERROR " - the source dir for '${basename}', in '${CT_SRC_DIR}'"
- CT_DoLog ERROR " - the file '${CT_SRC_DIR}/.${basename}.extracted'"
- CT_DoLog ERROR " - the file '${CT_SRC_DIR}/.${basename}.patch'"
- CT_DoLog ERROR " - the file '${CT_SRC_DIR}/.${basename}.configuring'"
- CT_Abort
- fi
-
- CT_DoLog EXTRA "Using '${custom_overlay}' from ${custom_location}"
- CT_DoExecLog DEBUG ln -sf "${custom_location}/${custom_overlay}" \
- "${CT_TARBALLS_DIR}/${custom_overlay}"
-
- CT_DoExecLog DEBUG touch "${CT_SRC_DIR}/.${basename}.configuring"
-
- CT_Pushd "${CT_SRC_DIR}/${basename}"
-
- tar_opts=( "--strip-components=1" )
- tar_opts+=( "-xv" )
-
- case "${ext}" in
- .tar) CT_DoExecLog FILE tar "${tar_opts[@]}" -f "${full_file}" "${component}";;
- .gz|.tgz) gzip -dc "${full_file}" | CT_DoExecLog FILE tar "${tar_opts[@]}" -f - "${component}";;
- .bz2) bzip2 -dc "${full_file}" | CT_DoExecLog FILE tar "${tar_opts[@]}" -f - "${component}";;
- *) CT_DoLog WARN "Don't know how to handle '${basename}${ext}': unknown extension"
- return 1
- ;;
- esac
-
- CT_DoExecLog DEBUG touch "${CT_SRC_DIR}/.${basename}.configured"
- CT_DoExecLog DEBUG rm -f "${CT_SRC_DIR}/.${basename}.configuring"
-
- CT_Popd
-}
-
CT_DoArchUClibcConfig() {
local cfg="${1}"
diff --git a/scripts/build/cc/gcc.sh b/scripts/build/cc/gcc.sh
index 449aafb..e836c82 100644
--- a/scripts/build/cc/gcc.sh
+++ b/scripts/build/cc/gcc.sh
@@ -14,6 +14,7 @@ do_gcc_get() {
# GCC source tree, which will not be there unless we get it and
# put it there ourselves
if [ "${CT_CC_LANG_JAVA_USE_ECJ}" = "y" ]; then
+ # TBD check return code
CT_GetFile ecj-latest .jar http://mirrors.kernel.org/sourceware/java/ \
ftp://gcc.gnu.org/pub/java \
ftp://sourceware.org/pub/java
diff --git a/scripts/build/kernel/linux.sh b/scripts/build/kernel/linux.sh
index 0f04d64..5ab4918 100644
--- a/scripts/build/kernel/linux.sh
+++ b/scripts/build/kernel/linux.sh
@@ -22,21 +22,23 @@ do_kernel_get() {
CT_Fetch LINUX
}
-# Extract kernel
-do_kernel_extract() {
- CT_ExtractPatch LINUX
-
- # Disable building relocs application - it needs <linux/types.h>
- # on the host, which may not be present on Cygwin or MacOS; it
- # needs <elf.h>, which again is not present on MacOS; and most
- # important, we don't need it to install the headers.
- # This is not done as a patch, since it varies from Linux version
- # to version - patching each particular Linux version would be
- # too cumbersome.
- # TBD should happen before marking the sources as "patched"?
- CT_Pushd "${CT_SRC_DIR}/linux"
+# Disable building relocs application - it needs <linux/types.h>
+# on the host, which may not be present on Cygwin or MacOS; it
+# needs <elf.h>, which again is not present on MacOS; and most
+# important, we don't need it to install the headers.
+# This is not done as a patch, since it varies from Linux version
+# to version - patching each particular Linux version would be
+# too cumbersome.
+linux_disable_build_relocs()
+{
sed -i -r 's/(\$\(MAKE\) .* relocs)$/:/' arch/*/Makefile
- CT_Popd
+}
+
+# Extract kernel
+do_kernel_extract()
+{
+ # TBD verify linux_disable_build_relocs is run
+ CT_ExtractPatch LINUX linux_disable_build_relocs
}
# Install kernel headers using headers_install from kernel sources.
diff --git a/scripts/build/libc/glibc.sh b/scripts/build/libc/glibc.sh
index 5862759..eae64bc 100644
--- a/scripts/build/libc/glibc.sh
+++ b/scripts/build/libc/glibc.sh
@@ -17,9 +17,9 @@ do_libc_get() {
do_libc_extract() {
local addon
- CT_ExtrachPatch GLIBC
+ CT_ExtractPatch GLIBC
if [ "${CT_GLIBC_USE_PORTS_EXTERNAL}" = "y" ]; then
- CT_Fetch GLIBC_PORTS
+ CT_ExtractPatch GLIBC_PORTS
fi
# TBD make patches for addons (ports? anything else?) uniformly using short names
# TBD make the configure timestamp fix in all patched packages (e.g. part of CT_ExtractPatch)