summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorErico Nunes <nunes.erico@gmail.com>2015-06-21 23:53:43 (GMT)
committerErico Nunes <nunes.erico@gmail.com>2015-06-21 23:53:43 (GMT)
commit219c5e932fddfa9a5a996fb5774fdbe0e117c05c (patch)
tree5b0fd6a6d4c20b059aa8ebdb9f53ed52e6919f43 /scripts
parent6da2fde11eca8be4a11cfea2e44a4b1f4902ff74 (diff)
functions: add support for arch-specific patch
Add support for applying arch-specific patches found in "patches/${pkgname}/${version}/${CT_ARCH}". This is needed for applying a popular binutils patch specific for the AVR architecture but which isn't isolated for AVR in binutils' code. In this case, applying it for every architecture would end up bloating binutils' "size" options with AVR specifics. This feels like a bit of a hack but it is easy enough to support with current crosstool-ng infrastructure, seems like worth it for this case. Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/functions7
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/functions b/scripts/functions
index 0fe8239..6429aa8 100644
--- a/scripts/functions
+++ b/scripts/functions
@@ -1101,13 +1101,14 @@ CT_Patch() {
CT_DoLog EXTRA "Patching '${pkgdir}'"
bundled_patch_dir="${CT_LIB_DIR}/patches/${pkgname}/${version}"
+ bundled_patch_arch_dir="${bundled_patch_dir}/${CT_ARCH}"
local_patch_dir="${CT_LOCAL_PATCH_DIR}/${pkgname}/${version}"
case "${CT_PATCH_ORDER}" in
- bundled) patch_dirs=("${bundled_patch_dir}");;
+ bundled) patch_dirs=("${bundled_patch_dir}" "${bundled_patch_arch_dir}");;
local) patch_dirs=("${local_patch_dir}");;
- bundled,local) patch_dirs=("${bundled_patch_dir}" "${local_patch_dir}");;
- local,bundled) patch_dirs=("${local_patch_dir}" "${bundled_patch_dir}");;
+ bundled,local) patch_dirs=("${bundled_patch_dir}" "${bundled_patch_arch_dir}" "${local_patch_dir}");;
+ local,bundled) patch_dirs=("${local_patch_dir}" "${bundled_patch_dir}" "${bundled_patch_arch_dir}");;
none) patch_dirs=;;
esac