-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Support C++ in app-layer #962
Conversation
It works! At least with the changes I outlined above. The part that was not working is that I was adding an extra include folder to the build in Thanks for the quick fix! |
Thank you for testing it out! Could you try with the last commit: "Kbuild: Use cxx_flags for C++" ? To see if it solves your last issue. |
Yes, it works now! One tiny nitpick is that the output now shows |
Thanks! It was a typo $(CXX) vs CXX, fixed in latest commit.
|
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!
The full-path I think is an artifact of the oot build. |
Before you guys merge this, here's a proposed patch to the build system that gets rid of some annoying diff --git a/tools/kbuild/Makefile.kbuild b/tools/kbuild/Makefile.kbuild
index 017ad491..fd7586c6 100644
--- a/tools/kbuild/Makefile.kbuild
+++ b/tools/kbuild/Makefile.kbuild
@@ -217,12 +217,17 @@ CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
HOSTCC = gcc
HOSTCXX = g++
HOSTCFLAGS = -Wall -Wmissing-prototypes -Wstrict-prototypes -O2
-HOSTCFLAGS += -fomit-frame-pointer -Wno-format-overflow -std=gnu89
+HOSTCFLAGS += -fomit-frame-pointer -std=gnu89
HOSTCXXFLAGS = -O2
ifeq ($(shell $(HOSTCC) -v 2>&1 | grep -c "clang version"), 1)
+# These flags are clang-only
HOSTCFLAGS += -Wno-unused-value -Wno-unused-parameter \
- -Wno-missing-field-initializers -fno-delete-null-pointer-checks
+ -Wno-missing-field-initializers -fno-delete-null-pointer-checks \
+ -Wno-format-security
+else
+# These flags are gcc-only
+HOSTCFLAGS += -Wno-format-overflow
endif
# Decide whether to build built-in, modular, or both. (Sent this earlier on Discord). Edit: this is on an Apple M1 CPU with clang 13, not sure whether it appears on Intel Macs. |
Thanks I will test this a bit and add as a separate PR! |
Fixes: #960