forked from iovisor/bcc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add option to change kernel build search paths
Some linux distributions structure the /lib/modules directories differently, causing complexities. Add cmake overrides to be able to compile different behavior. If your distro sets up `/lib/modules/$(uname -r)/{source,build}` with header files split between the two (debian does this), then add -DBCC_KERNEL_HAS_SOURCE_DIR=1 to the cmake command line. If your distro just has something other than build/, but things are still in one subdirectory, then add -DBCC_KERNEL_MODULES_SUFFIX=foo to the cmake command line. Also, fix one implicit declaration warning introduced by the new bpf_get_stackid() helper. Fixes: iovisor#397 Signed-off-by: Brenden Blanco <[email protected]>
- Loading branch information
Brenden Blanco
committed
Mar 8, 2016
1 parent
ef3128a
commit 3e2f9d9
Showing
4 changed files
with
30 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
# Copyright (c) PLUMgrid, Inc. | ||
# Licensed under the Apache License, Version 2.0 (the "License") | ||
|
||
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters