-
Notifications
You must be signed in to change notification settings - Fork 376
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
tetragon: update bpf makefile #3159
Conversation
4051f63
to
b9e03b6
Compare
✅ Deploy Preview for tetragon ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Let's keep them together. Signed-off-by: Jiri Olsa <jolsa@kernel.org>
There's no reason for the .ll step, we can compile directly to the object file. Signed-off-by: Jiri Olsa <jolsa@kernel.org>
It's taken care of by including $(DEPS) files. All objects are by default handled by 'objs/%.o' target, plus we need to have specific rule when the object needs extra flags. Signed-off-by: Jiri Olsa <jolsa@kernel.org>
It's more readable. Signed-off-by: Jiri Olsa <jolsa@kernel.org>
a5c31ae
to
4b8a7e4
Compare
We can generate variant compilation in DEFINE_VARIANT macro. Specific CFLAGS are defined via CFLAGS_<VARIANT> variable. Signed-off-by: Jiri Olsa <jolsa@kernel.org>
We can have just single rule for object and dependency files and provide specific CFLAGS based on object name, like: CFLAGS_bpf_enforcer.o = -D__BPF_OVERRIDE_RETURN This way it's more readable what flags are used for object. Signed-off-by: Jiri Olsa <jolsa@kernel.org>
4b8a7e4
to
90c0937
Compare
We need special rules only for multi k/u probes, the rest can be caught by generic rule. Signed-off-by: Jiri Olsa <jolsa@kernel.org>
To put some order to objects. Signed-off-by: Jiri Olsa <jolsa@kernel.org>
We already have them, let's use them. Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Trying to explain the bpf obejcts build in nutshell. Signed-off-by: Jiri Olsa <jolsa@kernel.org>
90c0937
to
3ac9b07
Compare
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.
Nice cleanup! Left a comment below, but otherwise LGTM!
d604053
to
655d608
Compare
Allowing to build llvm IR objects with: $ make -C bpf objs/bpf_generic_kprobe_v61.ll Signed-off-by: Jiri Olsa <jolsa@kernel.org>
655d608
to
6c3b77c
Compare
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.
Thanks, LGTM
bpf makefile changes, hopefully making it more readable