forked from xujianming2017/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 RPM and DEB packaging targets (using CPack from CMake) to build binary packages for Fedora and Ubuntu targets. * Add Docker build scripts for each of the above that run the build in the right environment (assuming docker is available). - In Ubuntu, build against the LLVM 3.7 nightly snapshots - In Fedora, build against LLVM 3.7 from git (takes longer) * Depending on packages installed on the build machine, it may be possible to cross-package for other targets without invoking Docker. * Re-introduce src/cc/compat directory to keep the build stable for the time being. Similarly, it was necessary to #define some ugly constants that should eventually show up in libc. * Add a few simple version checks to allow a partially working (really tracing only) libbcc in 4.1 kernels. TODO (followup commit): Re-work the READMEs Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
- Loading branch information
Brenden Blanco
committed
Jul 7, 2015
1 parent
439a9f3
commit f275d3d
Showing
15 changed files
with
453 additions
and
32 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Dockerfile* | ||
build | ||
.*.swp |
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# File to be used for building an Ubuntu .deb | ||
|
||
FROM fedora | ||
|
||
MAINTAINER Brenden Blanco <bblanco@plumgrid.com> | ||
|
||
RUN dnf -y install @rpm-development-tools @c-development @development-tools cmake libstdc++-static | ||
|
||
WORKDIR /root | ||
RUN git clone https://github.com/llvm-mirror/llvm.git | ||
RUN git clone https://github.com/llvm-mirror/clang.git llvm/tools/clang | ||
RUN mkdir -p /root/llvm/build | ||
WORKDIR /root/llvm/build | ||
RUN cmake .. -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release -DLLVM_TARGETS_TO_BUILD="ARM;CppBackend;X86;BPF" | ||
RUN make -j$(grep -c ^process /proc/cpuinfo) | ||
|
||
RUN mkdir -p /root/bcc/build | ||
COPY ./ /root/bcc/ | ||
WORKDIR /root/bcc/build | ||
RUN cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_PREFIX_PATH=/root/llvm/build | ||
RUN make -j$(grep -c ^process /proc/cpuinfo) package |
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# File to be used for building an Ubuntu .deb | ||
|
||
FROM ubuntu:trusty | ||
|
||
MAINTAINER Brenden Blanco <bblanco@plumgrid.com> | ||
|
||
RUN apt-get -y install wget | ||
RUN printf "deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty main\ndeb-src http://llvm.org/apt/trusty/ llvm-toolchain-trusty main\n" > /etc/apt/sources.list.d/llvm.list | ||
RUN wget -q -O - http://llvm.org/apt/llvm-snapshot.gpg.key | apt-key add - | ||
RUN apt-get -y update | ||
|
||
RUN apt-get -y install bison build-essential cmake flex git libedit-dev python zlib1g-dev | ||
RUN apt-get -y install libllvm3.7 llvm-3.7-dev libclang-3.7-dev | ||
|
||
RUN mkdir -p /root/bcc/build | ||
COPY ./ /root/bcc/ | ||
WORKDIR /root/bcc/build | ||
RUN cmake .. -DCMAKE_INSTALL_PREFIX=/usr | ||
RUN make -j$(grep -c ^process /proc/cpuinfo) package |
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
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
Oops, something went wrong.