mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2025-04-19 08:36:16 +00:00
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>
This commit is contained in:
parent
6da2fde11e
commit
219c5e932f
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user