Skip to content

Commit

Permalink
CI: fix zephyr build for v3.7 and later
Browse files Browse the repository at this point in the history
The current CI uses the latest from main for zephyr build tests.
This has been broken sometime after v3.6 and before v3.7. Since that
time, use of GNU style constructors requires a kconfig value to be
defined.  This same kconfig value will cause an error in v3.6 or earlier.

The test framework intentionally uses GNU constructors for the base level
of its framework and version.c uses this to register its test.

The test/system/zephyr/ level overrides the default META_ADD_TEST() macro
and creates unique functions that main.c then calls explicitly in function
metal_test_add_functions().

Thus, right now the only constructor used if for version.c but it still
intentionally used.

Since we use the latest for CI, define the value so CI will complete.

Signed-off-by: Bill Mills <bill.mills@linaro.org>
  • Loading branch information
wmamills authored and arnopo committed Aug 26, 2024
1 parent 5c36d6b commit 64c1a16
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/actions/build_ci/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,11 @@ build_zephyr(){
cd ./zephyr &&
source zephyr-env.sh &&
cd ../.. &&
# The prj.conf is mandatory for cmake execution, create a void file.
touch prj.conf &&
# The prj.conf is mandatory for cmake execution, create a file.
# The base level of the test framework intentionally uses constructors
# so we must define this config item in v3.7.0 or later
# HOWEVER, this define will cause cmake to fail for v3.6 or earlier
echo "CONFIG_STATIC_INIT_GNU=y" >prj.conf &&
# Add dummy fields in the VERSION file to fix compatibility with Zephyr
# version.cmake file
echo "PATCHLEVEL = 0" >>VERSION &&
Expand Down

0 comments on commit 64c1a16

Please sign in to comment.