-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
build: Silence misc warnings #976
Conversation
Makefile.uk
Outdated
@@ -91,7 +91,8 @@ M4FLAGS += -DUK_VERSION=$(UK_VERSION).$(UK_SUBVERSION) | |||
COMPFLAGS-$(call gcc_version_ge,6,1) += -fno-PIC | |||
LDFLAGS-$(call gcc_version_ge,6,1) += -no-pie | |||
ifeq ($(call gcc_version_ge,10,0),y) | |||
COMPFLAGS-y += -fhosted -fno-tree-loop-distribute-patterns | |||
COMPFLAGS-y += -fno-tree-loop-distribute-patterns | |||
CFLAGS-y += -fhosted |
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.
As -fhosted
is the default, I think we can also remove it (nolibc
will set -ffreestanding
)
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.
Fair point, although I would prefer to have even default options explicitly stated in our makefiles, both for documentation purposes and for the super unlikely case defaults change.
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.
My only concern is that having conflicting options for the compiler also creates a subtle dependency on the flag ordering.
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.
Fair point re: arg ordering; I'll remove -fhosted and leave it to be implicit.
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.
Updated; removed -fhosted entirely.
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.
Hello! All worked well on my side.
Thank you, @andreittr!
Reviewed-by: Rares Miculescu miculescur@gmail.com
✅ Checkpatch passed Beep boop! I ran Unikraft's
|
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.
Looks good, thanks!
Reviewed-by: Marco Schlumpp marco@unikraft.io
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.
Approved-by: Razvan Deaconescu razvand@unikraft.io
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.
Forgot to check the "Approve" radio button.
Reviewed-by: Marco Schlumpp marco@unikraft.io
This change removes the -fhosted flag as it is default for C code, also silencing a warning that appears when compiling C++ code. Signed-off-by: Andrei Tatar <andrei@unikraft.io>
-Wno-builtin-declaration-mismatch is only supported by GCC. Signed-off-by: Andrei Tatar <andrei@unikraft.io>
Removes unused counter variables that were triggering compiler warnings. Signed-off-by: Andrei Tatar <andrei@unikraft.io>
-Wno-builtin-declaration-mismatch is only supported by GCC. Signed-off-by: Andrei Tatar <andrei@unikraft.io> Reviewed-by: Rares Miculescu <miculescur@gmail.com> Reviewed-by: Marco Schlumpp <marco@unikraft.io> Approved-by: Razvan Deaconescu <razvand@unikraft.io> Tested-by: Unikraft CI <monkey@unikraft.io> GitHub-Closes: #976
Removes unused counter variables that were triggering compiler warnings. Signed-off-by: Andrei Tatar <andrei@unikraft.io> Reviewed-by: Rares Miculescu <miculescur@gmail.com> Reviewed-by: Marco Schlumpp <marco@unikraft.io> Approved-by: Razvan Deaconescu <razvand@unikraft.io> Tested-by: Unikraft CI <monkey@unikraft.io> GitHub-Closes: #976
Description of changes
This patch set silences several build warnings: inappropriate or compiler-specific flags & unused variables.
Prerequisite checklist
checkpatch.uk
on your commit series before opening this PR;Base target
Additional configuration
N/A