diff options
4 files changed, 113 insertions, 31 deletions
diff --git a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst index f60a9d8312..1042c65d89 100644 --- a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst +++ b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst | |||
@@ -874,58 +874,67 @@ becomes a no-op. | |||
874 | ``include`` Directive | 874 | ``include`` Directive |
875 | --------------------- | 875 | --------------------- |
876 | 876 | ||
877 | BitBake understands the ``include`` directive. This directive causes | 877 | The ``include`` directive causes BitBake to parse a given file, |
878 | BitBake to parse whatever file you specify, and to insert that file at | 878 | and to include that file's contents at the location of the |
879 | that location. The directive is much like its equivalent in Make except | 879 | ``include`` statement. This directive is similar to its equivalent |
880 | that if the path specified on the include line is a relative path, | 880 | in Make, except that if the path specified on the BitBake ``include`` |
881 | BitBake locates the first file it can find within :term:`BBPATH`. | 881 | line is a relative path, BitBake will search for it on the path designated |
882 | 882 | by :term:`BBPATH` and will include *only the first matching file*. | |
883 | The include directive is a more generic method of including | 883 | |
884 | The ``include`` directive is a more generic method of including | ||
884 | functionality as compared to the :ref:`inherit <bitbake-user-manual/bitbake-user-manual-metadata:\`\`inherit\`\` directive>` | 885 | functionality as compared to the :ref:`inherit <bitbake-user-manual/bitbake-user-manual-metadata:\`\`inherit\`\` directive>` |
885 | directive, which is restricted to class (i.e. ``.bbclass``) files. The | 886 | directive, which is restricted to class (i.e. ``.bbclass``) files. The |
886 | include directive is applicable for any other kind of shared or | 887 | ``include`` directive is applicable for any other kind of shared or |
887 | encapsulated functionality or configuration that does not suit a | 888 | encapsulated functionality or configuration that does not suit a |
888 | ``.bbclass`` file. | 889 | ``.bbclass`` file. |
889 | 890 | ||
890 | As an example, suppose you needed a recipe to include some self-test | 891 | For example, if you needed a recipe to include some self-test definitions, |
891 | definitions:: | 892 | you might write:: |
892 | 893 | ||
893 | include test_defs.inc | 894 | include test_defs.inc |
894 | 895 | ||
896 | The ``include`` directive does not produce an error if the specified file | ||
897 | cannot be found. If the included file *must* exist, then you should use | ||
898 | use :ref:`require <require-inclusion>` instead, which will generate an error | ||
899 | if the file cannot be found. | ||
900 | |||
895 | .. note:: | 901 | .. note:: |
896 | 902 | ||
897 | The include directive does not produce an error when the file cannot be | 903 | Note well that the ``include`` directive will include the first matching |
898 | found. Consequently, it is recommended that if the file you are including is | 904 | file and nothing further (which is almost always the behaviour you want). |
899 | expected to exist, you should use :ref:`require <require-inclusion>` instead | 905 | If you need to include all matching files, you need to use the |
900 | of include . Doing so makes sure that an error is produced if the file cannot | 906 | ``include_all`` directive, explained below. |
901 | be found. | ||
902 | 907 | ||
903 | ``include_all`` Directive | 908 | ``include_all`` Directive |
904 | ------------------------- | 909 | ------------------------- |
905 | 910 | ||
906 | The ``include_all`` directive works like the :ref:`include | 911 | The ``include_all`` directive works like the :ref:`include |
907 | <bitbake-user-manual/bitbake-user-manual-metadata:\`\`include\`\` directive>` | 912 | <bitbake-user-manual/bitbake-user-manual-metadata:\`\`include\`\` directive>` |
908 | directive but will include all of the files that match the specified path in | 913 | directive but will include *all* of the files that match the specified path in |
909 | the enabled layers (layers part of :term:`BBLAYERS`). | 914 | the enabled layers (layers part of :term:`BBLAYERS`). |
910 | 915 | ||
911 | For example, let's say a ``maintainers.inc`` file is present in different layers | 916 | .. note:: |
912 | and is conventionally placed in the ``conf/distro/include`` directory of each | ||
913 | layer. In that case the ``include_all`` directive can be used to include | ||
914 | the ``maintainers.inc`` file for all of these layers:: | ||
915 | 917 | ||
916 | include_all conf/distro/include/maintainers.inc | 918 | This behaviour is rarely what you want in normal operation, and should |
919 | be reserved for only those situations when you explicitly want to parse | ||
920 | and include all matching files found across all layers, as the following | ||
921 | example shows. | ||
917 | 922 | ||
918 | In other words, the ``maintainers.inc`` file for each layer is included through | 923 | As a realistic example of this directive, imagine that all of your active |
919 | the :ref:`include <bitbake-user-manual/bitbake-user-manual-metadata:\`\`include\`\` directive>` | 924 | layers contain a file ``conf/distro/include/maintainers.inc``, containing |
920 | directive. | 925 | maintainer information for the recipes in that layer, and you wanted to |
926 | collect all of the content from all of those files across all of those layers. | ||
927 | You could use the statement:: | ||
928 | |||
929 | include_all conf/distro/include/maintainers.inc | ||
921 | 930 | ||
922 | BitBake will iterate through the colon-separated :term:`BBPATH` list to look for | 931 | In this case, BitBake will iterate through all of the directories in |
923 | matching files to include, from left to right. As a consequence, matching files | 932 | the colon-separated :term:`BBPATH` (from left to right) and collect the |
924 | are included in that order. | 933 | contents of all matching files, so you end up with the maintainer |
934 | information of all of your active layers, not just the first one. | ||
925 | 935 | ||
926 | As the ``include_all`` directive uses the :ref:`include | 936 | As the ``include_all`` directive uses the ``include`` directive in the |
927 | <bitbake-user-manual/bitbake-user-manual-metadata:\`\`include\`\` directive>` | 937 | background, as with ``include``, no error is produced if no files are matched. |
928 | directive in the background, no error is produced if no files are matched. | ||
929 | 938 | ||
930 | .. _require-inclusion: | 939 | .. _require-inclusion: |
931 | 940 | ||
diff --git a/bitbake/lib/bb/fetch2/wget.py b/bitbake/lib/bb/fetch2/wget.py index 7e43d3bc97..4d19e2134b 100644 --- a/bitbake/lib/bb/fetch2/wget.py +++ b/bitbake/lib/bb/fetch2/wget.py | |||
@@ -372,7 +372,10 @@ class Wget(FetchMethod): | |||
372 | 372 | ||
373 | try: | 373 | try: |
374 | parts = urllib.parse.urlparse(ud.url.split(";")[0]) | 374 | parts = urllib.parse.urlparse(ud.url.split(";")[0]) |
375 | uri = "{}://{}{}".format(parts.scheme, parts.netloc, parts.path) | 375 | if parts.query: |
376 | uri = "{}://{}{}?{}".format(parts.scheme, parts.netloc, parts.path, parts.query) | ||
377 | else: | ||
378 | uri = "{}://{}{}".format(parts.scheme, parts.netloc, parts.path) | ||
376 | r = urllib.request.Request(uri) | 379 | r = urllib.request.Request(uri) |
377 | r.get_method = lambda: "HEAD" | 380 | r.get_method = lambda: "HEAD" |
378 | # Some servers (FusionForge, as used on Alioth) require that the | 381 | # Some servers (FusionForge, as used on Alioth) require that the |
diff --git a/meta/recipes-devtools/gcc/gcc-15.1.inc b/meta/recipes-devtools/gcc/gcc-15.1.inc index 28fcf9376c..7d86cda601 100644 --- a/meta/recipes-devtools/gcc/gcc-15.1.inc +++ b/meta/recipes-devtools/gcc/gcc-15.1.inc | |||
@@ -72,6 +72,7 @@ SRC_URI = "${BASEURI} \ | |||
72 | file://0025-gcc-testsuite-tweaks-for-mips-OE.patch \ | 72 | file://0025-gcc-testsuite-tweaks-for-mips-OE.patch \ |
73 | file://0026-arm-fully-validate-mem_noofs_operand-PR120351.patch \ | 73 | file://0026-arm-fully-validate-mem_noofs_operand-PR120351.patch \ |
74 | file://0026-fix-incorrect-preprocessor-line-numbers.patch \ | 74 | file://0026-fix-incorrect-preprocessor-line-numbers.patch \ |
75 | file://0027-aarch64-Fix-fma-steering-when-rename-fails-PR120119.patch \ | ||
75 | " | 76 | " |
76 | 77 | ||
77 | UNPACKDIR = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/sources" | 78 | UNPACKDIR = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/sources" |
diff --git a/meta/recipes-devtools/gcc/gcc/0027-aarch64-Fix-fma-steering-when-rename-fails-PR120119.patch b/meta/recipes-devtools/gcc/gcc/0027-aarch64-Fix-fma-steering-when-rename-fails-PR120119.patch new file mode 100644 index 0000000000..a59cb45524 --- /dev/null +++ b/meta/recipes-devtools/gcc/gcc/0027-aarch64-Fix-fma-steering-when-rename-fails-PR120119.patch | |||
@@ -0,0 +1,69 @@ | |||
1 | From b28d5f51e1ec75f6878593ef084e9cfb836b9db4 Mon Sep 17 00:00:00 2001 | ||
2 | From: Andrew Pinski <quic_apinski@quicinc.com> | ||
3 | Date: Tue, 22 Jul 2025 10:32:42 -0700 | ||
4 | Subject: [PATCH] aarch64: Fix fma steering when rename fails [PR120119] | ||
5 | |||
6 | Regrename can fail in some case and `insn_rr[INSN_UID (insn)].op_info` | ||
7 | will be null. The FMA steering code was not expecting the failure to happen. | ||
8 | This started to happen after early RA was added but it has been a latent bug | ||
9 | before that. | ||
10 | |||
11 | Build and tested for aarch64-linux-gnu. | ||
12 | |||
13 | PR target/120119 | ||
14 | |||
15 | gcc/ChangeLog: | ||
16 | |||
17 | * config/aarch64/cortex-a57-fma-steering.cc (func_fma_steering::analyze): | ||
18 | Skip if renaming fails. | ||
19 | |||
20 | gcc/testsuite/ChangeLog: | ||
21 | |||
22 | * g++.dg/torture/pr120119-1.C: New test. | ||
23 | |||
24 | Upstream-Status: Submitted [https://gcc.gnu.org/pipermail/gcc-patches/2025-July/690239.html] | ||
25 | Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com> | ||
26 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
27 | --- | ||
28 | gcc/config/aarch64/cortex-a57-fma-steering.cc | 5 +++++ | ||
29 | gcc/testsuite/g++.dg/torture/pr120119-1.C | 15 +++++++++++++++ | ||
30 | 2 files changed, 20 insertions(+) | ||
31 | create mode 100644 gcc/testsuite/g++.dg/torture/pr120119-1.C | ||
32 | |||
33 | diff --git a/gcc/config/aarch64/cortex-a57-fma-steering.cc b/gcc/config/aarch64/cortex-a57-fma-steering.cc | ||
34 | index fd6da66d855..f7675bed13d 100644 | ||
35 | --- a/gcc/config/aarch64/cortex-a57-fma-steering.cc | ||
36 | +++ b/gcc/config/aarch64/cortex-a57-fma-steering.cc | ||
37 | @@ -948,6 +948,11 @@ func_fma_steering::analyze () | ||
38 | |||
39 | /* Search the chain where this instruction is (one of) the root. */ | ||
40 | dest_op_info = insn_rr[INSN_UID (insn)].op_info; | ||
41 | + | ||
42 | + /* Register rename could fail. */ | ||
43 | + if (!dest_op_info) | ||
44 | + continue; | ||
45 | + | ||
46 | dest_regno = REGNO (SET_DEST (PATTERN (insn))); | ||
47 | for (i = 0; i < dest_op_info->n_chains; i++) | ||
48 | { | ||
49 | diff --git a/gcc/testsuite/g++.dg/torture/pr120119-1.C b/gcc/testsuite/g++.dg/torture/pr120119-1.C | ||
50 | new file mode 100644 | ||
51 | index 00000000000..1206feb310b | ||
52 | --- /dev/null | ||
53 | +++ b/gcc/testsuite/g++.dg/torture/pr120119-1.C | ||
54 | @@ -0,0 +1,15 @@ | ||
55 | +// { dg-do compile } | ||
56 | +// { dg-additional-options "-mcpu=cortex-a57" { target aarch64*-*-* } } | ||
57 | + | ||
58 | +// PR target/120119 | ||
59 | + | ||
60 | +struct a { | ||
61 | + float operator()(int b, int c) { return d[c * 4 + b]; } | ||
62 | + float *d; | ||
63 | +}; | ||
64 | +float e(float *); | ||
65 | +auto f(a b) { | ||
66 | + float g[]{b(1, 1), b(2, 1), b(3, 1), b(1, 2), b(2, 2), b(3, 2), b(1, 3), | ||
67 | + b(2, 3), b(3, 3), b(3, 2), b(1, 3), b(2, 3), b(3, 3)}; | ||
68 | + return b.d[0] * e(g); | ||
69 | +} | ||