Skip to content

build: adapt to gcc 14.2#85

Merged
badochov merged 2 commits intomasterfrom
badochov/gcc-14.2
Mar 26, 2025
Merged

build: adapt to gcc 14.2#85
badochov merged 2 commits intomasterfrom
badochov/gcc-14.2

Conversation

@badochov
Copy link

@badochov badochov commented Sep 27, 2024

JIRA: RTOS-927

Description

Motivation and Context

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Chore (refactoring, style fixes, git/CI config, submodule management, no code logic changes)

How Has This Been Tested?

  • Already covered by automatic testing.
  • New test added: (add PR link here).
  • Tested by hand on: (list targets here).

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing linter checks and tests passed.
  • My changes generate no new compilation warnings for any of the targets.

Special treatment

  • This PR needs additional PRs to work (list the PRs, preferably in merge-order).
  • I will merge this PR by myself when appropriate.

@github-actions
Copy link

github-actions bot commented Sep 27, 2024

Unit Test Results

7 958 tests  ±0   7 434 ✅ +18   41m 0s ⏱️ - 2m 8s
  470 suites ±0     524 💤  - 18 
    1 files   ±0       0 ❌ ± 0 

Results for commit 0b4af77. ± Comparison against base commit 1994dc6.

♻️ This comment has been updated with latest results.

@badochov badochov force-pushed the badochov/gcc-14.2 branch 2 times, most recently from 95d1b7e to c53614d Compare October 3, 2024 11:19
@badochov badochov marked this pull request as ready for review October 3, 2024 11:41
@badochov badochov requested a review from Darchiv October 3, 2024 11:41
Copy link
Member

@Darchiv Darchiv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would rather fix these issues in ports by local patches than disable warnings.

lighttpd is slightly bugger issue, because we have an upgrade PR to 1.4.77 pending, so patching lighttpd before PR is merged may be wasteful

mbedtls/build.sh Outdated
# Build mbedtls without tests
(cd "${PREFIX_PORT_BUILD}/${MBEDTLS}" && make install no_test DESTDIR="$PREFIX_MBEDTLS_DESTDIR")
# FIXME: -Wno-error=incompatible-pointer-types is needed as mbedtls doesn't recognise phoenix definition of socklen_t
(cd "${PREFIX_PORT_BUILD}/${MBEDTLS}" && make install no_test DESTDIR="$PREFIX_MBEDTLS_DESTDIR" CFLAGS="-Wno-error=incompatible-pointer-types")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mbedtls (2.28.0) does the following:

#if defined(__socklen_t_defined) || defined(_SOCKLEN_T) ||  \
    defined(_SOCKLEN_T_DECLARED) || defined(__DEFINED_socklen_t) || \
    defined(socklen_t) || (defined(_POSIX_VERSION) && _POSIX_VERSION >= 200112L)
    socklen_t n = (socklen_t) sizeof( client_addr );
    socklen_t type_len = (socklen_t) sizeof( type );
#else
    int n = (int) sizeof( client_addr );
    int type_len = (int) sizeof( type );
#endif

Apparently, we don't define any such macros, commonly found in glibc, musl, FreeBSD's libc, etc. (We only define SOCKLEN_T_DEFINED in lwip.) We don't even have _POSIX_VERSION defined in unistd.h. I think defining _POSIX_VERSION is the way to go.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Finally, we opted for _SOCKLEN_T phoenix-rtos/libphoenix#408 Defines which shadow existing types cause LSP/IDEs to only show macro expansion instead of treating it as a type

@badochov
Copy link
Author

I would rather fix these issues in ports by local patches than disable warnings.

lighttpd is slightly bugger issue, because we have an upgrade PR to 1.4.77 pending, so patching lighttpd before PR is merged may be wasteful

This changes do not disable warnings but rather mark warnings as not errors. There are more warnings in the ports. I do not think that patching all of them is feasible.

@badochov badochov force-pushed the badochov/gcc-14.2 branch from d356b5a to 3d7cd5e Compare March 17, 2025 13:24
@Darchiv
Copy link
Member

Darchiv commented Mar 25, 2025

phoenix-rtos/libphoenix#408 is merged now so you can omit the mbedtls patch

Hubert Badocha added 2 commits March 26, 2025 12:32
@badochov badochov force-pushed the badochov/gcc-14.2 branch from 3d7cd5e to 0b4af77 Compare March 26, 2025 11:34
@badochov badochov merged commit ea62d20 into master Mar 26, 2025
37 checks passed
@badochov badochov deleted the badochov/gcc-14.2 branch March 26, 2025 11:53
@Darchiv Darchiv mentioned this pull request Apr 1, 2025
14 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants