From cf03e2f8a5f112e28722082ccf5f5307f7529d60 Mon Sep 17 00:00:00 2001 From: Simi Pallipurath Date: Wed, 10 Jun 2026 11:38:10 +0100 Subject: [PATCH 1/2] [ATFE] Introduce seperate multilib groups for base and minor variants. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This change introduces separate multilib groups so minor library variants can be selected alongside the base library variant. This patch: 1. Replaces the stdlibs group with base_stdlibs for base library variants. 2. Adds independent exclusive groups for overlay layers: - string_minor_libs - startup_libs 3. Updates multilib YAML generation to emit each variant’s configured group. 4. Restricts header include directory optimisation to base_stdlibs With this structure, the resolver can select one base variant and one matching variant from each overlay group at the same time, allowing the minor library variants to stay with the selected base variant. --- arm-software/embedded/arm-multilib/CMakeLists.txt | 6 +++--- .../embedded/arm-multilib/multilib.yaml.in | 14 ++++++++++---- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/arm-software/embedded/arm-multilib/CMakeLists.txt b/arm-software/embedded/arm-multilib/CMakeLists.txt index 2fa0cbb22845..0286c9998bce 100644 --- a/arm-software/embedded/arm-multilib/CMakeLists.txt +++ b/arm-software/embedded/arm-multilib/CMakeLists.txt @@ -346,12 +346,12 @@ foreach(lib_idx RANGE ${lib_count_dec}) foreach(flag ${multilib_flags_list}) string(APPEND multilib_yaml_content " - ${flag}\n") endforeach() - if(ENABLE_MULTILIB_HEADER_OPTIMISATION) + if(ENABLE_MULTILIB_HEADER_OPTIMISATION AND variant_group STREQUAL "base_stdlibs") string(APPEND multilib_yaml_content " IncludeDirs:\n") string(APPEND multilib_yaml_content " - ${parent_dir_name}/${variant}/include\n") string(APPEND multilib_yaml_content " - ${parent_dir_name}/include\n") endif() - string(APPEND multilib_yaml_content " Group: stdlibs\n") + string(APPEND multilib_yaml_content " ${variant_group}\n") else() # In place of a json, an error message is expected. string(JSON variant_error_msg GET ${lib_def} "error") @@ -362,7 +362,7 @@ foreach(lib_idx RANGE ${lib_count_dec}) foreach(flag ${multilib_flags_list}) string(APPEND multilib_yaml_content " - ${flag}\n") endforeach() - string(APPEND multilib_yaml_content " Group: stdlibs\n") + string(APPEND multilib_yaml_content " Group: base_stdlibs\n") endif() endif() diff --git a/arm-software/embedded/arm-multilib/multilib.yaml.in b/arm-software/embedded/arm-multilib/multilib.yaml.in index 1fcc4e795d1a..35ad5cb42ad9 100644 --- a/arm-software/embedded/arm-multilib/multilib.yaml.in +++ b/arm-software/embedded/arm-multilib/multilib.yaml.in @@ -20,8 +20,10 @@ MultilibVersion: '1.0' -# Make an exclusive group for library variants, to make sure we don't -# accidentally include two or more variants at once. +# Make the main library selection exclusive, to make sure we don't +# accidentally include two or more base variants at once.But allow +# specialised overlay layers such as string/startup deltas to be +# selected in parallel with the base layer. # # Even if they all match the command-line options, putting two sets of # include directories on the include path can cause build failure, @@ -32,7 +34,11 @@ MultilibVersion: '1.0' # nothing will ever include the _libc_ stdio.h, which was what the # #include_next was really looking for. Groups: -- Name: stdlibs +- Name: base_stdlibs + Type: Exclusive +- Name: string_minor_libs + Type: Exclusive +- Name: startup_libs Type: Exclusive # The list of library variants is substituted in by CMakeLists.txt, so @@ -49,7 +55,7 @@ Variants: - Error: Arm Toolchain for Embedded does not provide RWPI library variants Flags: - -frwpi - Group: stdlibs + Group: base_stdlibs Mappings: From 0cfe2a7ad8d511c014ee019e51ff3f3d2a73c0af Mon Sep 17 00:00:00 2001 From: Simi Pallipurath Date: Mon, 29 Jun 2026 14:19:18 +0100 Subject: [PATCH 2/2] fixup! [ATFE] Introduce seperate multilib groups for base and minor variants. 1. Missed the "Group:" part. 2. Renamed the groups as requested. 3. Added a space in the comment description. --- arm-software/embedded/arm-multilib/CMakeLists.txt | 6 +++--- arm-software/embedded/arm-multilib/multilib.yaml.in | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/arm-software/embedded/arm-multilib/CMakeLists.txt b/arm-software/embedded/arm-multilib/CMakeLists.txt index 0286c9998bce..2617b2c582f5 100644 --- a/arm-software/embedded/arm-multilib/CMakeLists.txt +++ b/arm-software/embedded/arm-multilib/CMakeLists.txt @@ -346,12 +346,12 @@ foreach(lib_idx RANGE ${lib_count_dec}) foreach(flag ${multilib_flags_list}) string(APPEND multilib_yaml_content " - ${flag}\n") endforeach() - if(ENABLE_MULTILIB_HEADER_OPTIMISATION AND variant_group STREQUAL "base_stdlibs") + if(ENABLE_MULTILIB_HEADER_OPTIMISATION AND variant_group STREQUAL "base_libs") string(APPEND multilib_yaml_content " IncludeDirs:\n") string(APPEND multilib_yaml_content " - ${parent_dir_name}/${variant}/include\n") string(APPEND multilib_yaml_content " - ${parent_dir_name}/include\n") endif() - string(APPEND multilib_yaml_content " ${variant_group}\n") + string(APPEND multilib_yaml_content " Group: ${variant_group}\n") else() # In place of a json, an error message is expected. string(JSON variant_error_msg GET ${lib_def} "error") @@ -362,7 +362,7 @@ foreach(lib_idx RANGE ${lib_count_dec}) foreach(flag ${multilib_flags_list}) string(APPEND multilib_yaml_content " - ${flag}\n") endforeach() - string(APPEND multilib_yaml_content " Group: base_stdlibs\n") + string(APPEND multilib_yaml_content " Group: base_libs\n") endif() endif() diff --git a/arm-software/embedded/arm-multilib/multilib.yaml.in b/arm-software/embedded/arm-multilib/multilib.yaml.in index 35ad5cb42ad9..e06aabba960e 100644 --- a/arm-software/embedded/arm-multilib/multilib.yaml.in +++ b/arm-software/embedded/arm-multilib/multilib.yaml.in @@ -21,7 +21,7 @@ MultilibVersion: '1.0' # Make the main library selection exclusive, to make sure we don't -# accidentally include two or more base variants at once.But allow +# accidentally include two or more base variants at once. But allow # specialised overlay layers such as string/startup deltas to be # selected in parallel with the base layer. # @@ -34,9 +34,9 @@ MultilibVersion: '1.0' # nothing will ever include the _libc_ stdio.h, which was what the # #include_next was really looking for. Groups: -- Name: base_stdlibs +- Name: base_libs Type: Exclusive -- Name: string_minor_libs +- Name: string_libs Type: Exclusive - Name: startup_libs Type: Exclusive @@ -55,7 +55,7 @@ Variants: - Error: Arm Toolchain for Embedded does not provide RWPI library variants Flags: - -frwpi - Group: base_stdlibs + Group: base_libs Mappings: