]> Git Repo - buildroot-mgba.git/commitdiff
package/pkg-generic: drop support for arch-specific patches
authorYann E. MORIN <[email protected]>
Sat, 14 Oct 2023 22:25:41 +0000 (00:25 +0200)
committerArnout Vandecappelle <[email protected]>
Sun, 15 Oct 2023 20:24:51 +0000 (22:24 +0200)
The last architecture-specific patch we had was removed 2015-02-14 with
commit 9863553fe8fa (packages: all salute the passing of avr32), where
we eventually got rid of the avr32-specific patch for fbv.

Since then, we've only had common patches (that apply systematically),
or conditional patches, that are applied in an ad-hoc manner with
post-patch hooks. Currently, we even only have one such patch (for
Linux).

Since we do not advertise that possibility in the manual, and since we
do not want to have such patches, drop the support for it.

This has the potential for breaking existing br2-external trees, but
there is a workaround for those: they can provide a pre-patch ook that
copies the necessary per-arch patches if needed. We document this in the
manual.

Signed-off-by: Yann E. MORIN <[email protected]>
Signed-off-by: Arnout Vandecappelle <[email protected]>
docs/manual/migrating.adoc
package/pkg-generic.mk

index 2667aeab96e60e46cfb76f372cbb9af36ad180c3..21277f947bb68918fcbebbb4d72bddf677f5f317 100644 (file)
@@ -100,3 +100,26 @@ change implies that:
   to be updated appropriately;
 * the archive version suffix has been updated to +-br3+, so the hash
   files must be updated appropriately.
+
+Before Buildroot 2023.11, it was possible (but undocumented and unused)
+to apply architecture-specific patches, by prefixing the patch filename
+with the architecture, e.g. `0001-some-changes.patch.arm` and such a
+patch would only be applied for that architecture. With Buildroot 2023.11,
+this is no longer supported, and such patches are now longer applied at
+all.
+
+If you still need per-architecture patches, then you may provide a
+xref:hooks[pre-patch hook] that copies the patches applicable to the
+configured architecture, e.g.:
+
+----
+define LIBFOO_ARCH_PATCHES
+    $(foreach p,$(wildcard $(LIBFOO_PKGDIR)/*.patch.$(ARCH)), \
+        cp -f $(p) $(patsubst %.$(ARCH),%,$(p))
+    )
+endef
+LIBFOO_PRE_PATCH_HOOKS += LIBFOO_ARCH_PATCHES
+----
+
+Note that no package in Buildroot has architecture-specific patches, and
+that such patches will most probably not be accepted.
index e140145ee308dffee0d5708ba6ace5bd9f6edb26..289fa552b4f96ce60e9a5bd2de9f688aabb37749 100644 (file)
@@ -242,9 +242,9 @@ $(BUILD_DIR)/%/.stamp_patched:
        for D in $(PATCH_BASE_DIRS); do \
          if test -d $${D}; then \
            if test -d $${D}/$($(PKG)_VERSION); then \
-             $(APPLY_PATCHES) $(@D) $${D}/$($(PKG)_VERSION) \*.patch \*.patch.$(ARCH) || exit 1; \
+             $(APPLY_PATCHES) $(@D) $${D}/$($(PKG)_VERSION) \*.patch || exit 1; \
            else \
-             $(APPLY_PATCHES) $(@D) $${D} \*.patch \*.patch.$(ARCH) || exit 1; \
+             $(APPLY_PATCHES) $(@D) $${D} \*.patch || exit 1; \
            fi; \
          fi; \
        done; \
This page took 0.038237 seconds and 4 git commands to generate.