-
Notifications
You must be signed in to change notification settings - Fork 193
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
base: master
Are you sure you want to change the base?
Conversation
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]>
There was a problem hiding this 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));
There was a problem hiding this 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)
There was a problem hiding this 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
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:
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