Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bcc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
bcc
Commits
5cb8de7a
Commit
5cb8de7a
authored
Apr 06, 2016
by
Brenden Blanco
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #477 from ragnard/nixos
Add support for nixos
parents
7a82fa65
dbc21eae
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
2 deletions
+8
-2
CMakeLists.txt
CMakeLists.txt
+6
-0
src/cc/frontends/clang/CMakeLists.txt
src/cc/frontends/clang/CMakeLists.txt
+1
-0
src/cc/frontends/clang/kbuild_helper.cc
src/cc/frontends/clang/kbuild_helper.cc
+1
-0
src/cc/frontends/clang/kbuild_helper.h
src/cc/frontends/clang/kbuild_helper.h
+0
-2
No files found.
CMakeLists.txt
View file @
5cb8de7a
...
...
@@ -39,6 +39,12 @@ FOREACH(DIR ${LLVM_INCLUDE_DIRS})
include_directories
(
"
${
DIR
}
/../tools/clang/include"
)
ENDFOREACH
()
# Set to a string path if system places kernel lib directory in
# non-default location.
if
(
NOT DEFINED BCC_KERNEL_MODULES_DIR
)
set
(
BCC_KERNEL_MODULES_DIR
"/lib/modules"
)
endif
()
# Set to non-zero if system installs kernel headers with split source and build
# directories in /lib/modules/`uname -r`/. This is the case for debian and
# suse, to the best of my knowledge.
...
...
src/cc/frontends/clang/CMakeLists.txt
View file @
5cb8de7a
# Copyright (c) PLUMgrid, Inc.
# Licensed under the Apache License, Version 2.0 (the "License")
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-DKERNEL_MODULES_DIR='
\"
${
BCC_KERNEL_MODULES_DIR
}
\"
'"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-DKERNEL_MODULES_SUFFIX='
\"
${
BCC_KERNEL_MODULES_SUFFIX
}
\"
'"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-DKERNEL_HAS_SOURCE_DIR=
${
BCC_KERNEL_HAS_SOURCE_DIR
}
"
)
add_library
(
clang_frontend loader.cc b_frontend_action.cc kbuild_helper.cc
)
src/cc/frontends/clang/kbuild_helper.cc
View file @
5cb8de7a
...
...
@@ -68,6 +68,7 @@ int KBuildHelper::get_flags(const char *uname_machine, vector<string> *cflags) {
cflags
->
push_back
(
"-I"
+
kdir_
+
"/build/./arch/"
+
arch
+
"/include/uapi"
);
cflags
->
push_back
(
"-I"
+
kdir_
+
"/build/arch/"
+
arch
+
"/include/generated/uapi"
);
cflags
->
push_back
(
"-I"
+
kdir_
+
"/build/include/uapi"
);
cflags
->
push_back
(
"-I"
+
kdir_
+
"/build/include/generated"
);
cflags
->
push_back
(
"-I"
+
kdir_
+
"/build/include/generated/uapi"
);
}
...
...
src/cc/frontends/clang/kbuild_helper.h
View file @
5cb8de7a
...
...
@@ -19,8 +19,6 @@
#include <vector>
#include <unistd.h>
#define KERNEL_MODULES_DIR "/lib/modules"
namespace
ebpf
{
struct
FileDeleter
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment