Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tests] Add -Wno-implicit-function-declaration for LTP build #2005

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dimakuv
Copy link
Contributor

@dimakuv dimakuv commented Sep 24, 2024

Description of the changes

Currently used version of LTP has a bug that results in the following build error, e.g. when using Clang v18 on Ubuntu 24.04:

clone301.c:136:8: error: call to undeclared function 'pidfd_send_signal'

This is because Clang promoted "implicit function declaration" check from a warning to an error starting from Clang v16. This commit adds -Wno-implicit-function-declaration flag to CFLAGS during LTP build.

Newer LTP releases fixed this bug, so in the future, when Gramine uses newer LTP, this commit should be reverted.

Reported by @woju.

How to test this PR?

Build LTP with Clang on Ubuntu 24.04.


This change is Reviewable

Currently used version of LTP has a bug that results in the following
build error, e.g. when using Clang v18 on Ubuntu 24.04:

    clone301.c:136:8: error: call to undeclared function 'pidfd_send_signal'

This is because Clang promoted "implicit function declaration" check
from a warning to an error starting from Clang v16. This commit adds
`-Wno-implicit-function-declaration` flag to CFLAGS during LTP build.

Newer LTP releases fixed this bug, so in the future, when Gramine uses
newer LTP, this commit should be reverted.

Signed-off-by: Dmitrii Kuvaiskii <[email protected]>
Copy link
Contributor Author

@dimakuv dimakuv left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion, not enough approvals from maintainers (2 more required), not enough approvals from different teams (1 more required, approved so far: Intel)

a discussion (no related file):
This problem only related to Clang. GCC on Ubuntu 24.04 builds fine. Proof:

  • LTP build with Clang 18.1
/home/sdp/gramine/libos/test/ltp/src/testcases/kernel/syscalls/clone3/clone301.c:136:8: error: call to undeclared function 'pidfd_send_signal'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  136 |                 TEST(pidfd_send_signal(pidfd, CHILD_SIGNAL, &uinfo, 0));
  • LTP build with GCC 13.2
/home/sdp/gramine/libos/test/ltp/src/testcases/kernel/syscalls/clone3/clone301.c: In function ‘run’:
/home/sdp/gramine/libos/test/ltp/src/testcases/kernel/syscalls/clone3/clone301.c:136:22: warning: implicit declaration of function ‘pidfd_send_signal’; did you mean ‘SYS_pidfd_send_signal’? [-Wimplicit-function-declaration]
  136 |                 TEST(pidfd_send_signal(pidfd, CHILD_SIGNAL, &uinfo, 0));

Copy link
Member

@mkow mkow left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion, not enough approvals from maintainers (1 more required)

Copy link
Contributor

@kailun-qin kailun-qin left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion

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.

3 participants