Compiled the module manager C sources with GCC, as clang already did - #716
Merged
fdesbiens merged 1 commit intoSep 10, 2026
Merged
Conversation
eclipse-threadx#689 added the module manager stage to check_clang.sh alone. The GCC half was never written, so the module manager C stayed unbuilt by the project's declared default compiler: 28 files of portable module manager under common_modules, plus the three to nine per-port files under ports_module/<core>/gnu/module_manager/src, across nine Arm module ports. The stage is deliberately check_clang.sh's, port for port and header for header, because a port covered by one check and not the other implies a parity the checks list does not have. The same two details the ports dictate carry over: an SMP port's control blocks come from common_smp rather than common, and the TrustZone ports need -mcmse for their cmse_nonsecure_entry functions to be honoured rather than ignored. The clang-only waiver does not: GCC implements the optimize attribute that tx_thread_secure_stack.c carries, so nothing needs suppressing for that file. One divergence is forced by the toolchain. txm_module_manager_absolute_load.c carries a #pragma message steering callers to the extended entry point, and the C stages treat any compiler output as a failure. check_clang.sh silences it with -Wno-#pragma-messages; GCC has no equivalent, and neither -Wno-pragmas nor any other -W option suppresses the note -- verified with 14.3.rel1. The note is therefore filtered out of the stage's output instead, together with the source quote GCC prints beneath it. The filter stops at the next line that begins a diagnostic of its own, so an error immediately following a waived note is still reported; that case is what the injected-defect run below checks. The workflow needed no trigger change: eclipse-threadx#689 added common_modules/** to both path lists in advance, for the stage that had yet to arrive. Its header comment is brought in line with what the workflow now runs. Verified with the toolchain CI pins, arm-gnu-toolchain 14.3.rel1, both triples. The full script passes and every port compiles every file, matching the counts check_clang.sh reports for the same nine ports: cortex_a35 31/31 cortex_a35_smp 31/31 cortex_a7 34/34 cortex_m0+ 33/33 cortex_m23 37/37 cortex_m3 33/33 cortex_m33 37/37 cortex_m4 33/33 cortex_m7 33/33 Verified that the stage fails as intended by injecting defects into a throwaway worktree: one in common_modules on the line straight after the waived pragma note, reported under all nine ports, and one in a single port's own source, reported only under that port. Assisted-by: Claude Code (Opus 5) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#689 added the module manager stage to
check_clang.shalone. The GCC half wasnever written, so the module manager C stayed unbuilt by the project's declared
default compiler: 28 files of portable module manager under
common_modules,plus the three to nine per-port files under
ports_module/<core>/gnu/module_manager/src, across nine Arm module ports.The stage is deliberately
check_clang.sh's, port for port and header forheader, because a port covered by one check and not the other implies a parity
the checks list does not have. The same two details the ports dictate carry
over: an SMP port's control blocks come from
common_smprather thancommon,and the TrustZone ports need
-mcmsefor theircmse_nonsecure_entryfunctions to be honoured rather than ignored. The clang-only waiver does not:
GCC implements the
optimizeattribute thattx_thread_secure_stack.ccarries, so nothing needs suppressing for that file.
One divergence is forced by the toolchain.
txm_module_manager_absolute_load.ccarries a
#pragma messagesteering callers to the extended entry point, andthe C stages treat any compiler output as a failure.
check_clang.shsilencesit with
-Wno-#pragma-messages; GCC has no equivalent, and neither-Wno-pragmasnor any other-Woption suppresses the note -- verified with14.3.rel1. The note is therefore filtered out of the stage's output instead,
together with the source quote GCC prints beneath it. The filter stops at the
next line that begins a diagnostic of its own, so an error immediately
following a waived note is still reported; that case is what the
injected-defect run below checks.
The workflow needed no trigger change: #689 added
common_modules/**to bothpath lists in advance, for the stage that had yet to arrive. Its header comment
is brought in line with what the workflow now runs.
Verification
Run with the toolchain CI pins, arm-gnu-toolchain 14.3.rel1, both triples. The
full script passes and every port compiles every file, matching the counts
check_clang.shreports for the same nine ports:Verified that the stage fails as intended by injecting defects into a
throwaway worktree: one in
common_moduleson the line straight after thewaived pragma note, reported under all nine ports, and one in a single port's
own source, reported only under that port.