1# Copyright (c) PLUMgrid, Inc. 2# Licensed under the Apache License, Version 2.0 (the "License") 3 4FROM fedora:rawhide 5 6MAINTAINER Brenden Blanco <bblanco@plumgrid.com> 7 8RUN dnf -y install bison cmake flex gcc gcc-c++ git libxml2-devel make python2-devel rpm-build wget zlib-devel 9 10WORKDIR /root 11 12RUN wget http://llvm.org/releases/3.7.1/{cfe,llvm}-3.7.1.src.tar.xz 13 14RUN tar -xf llvm-3.7.1.src.tar.xz && mkdir llvm-3.7.1.src/tools/clang && tar -xf cfe-3.7.1.src.tar.xz -C llvm-3.7.1.src/tools/clang --strip 1 && mkdir llvm-3.7.1.src/build 15RUN cd llvm-3.7.1.src/build && cmake .. -DCMAKE_BUILD_TYPE=Release -DLLVM_TARGETS_TO_BUILD="X86;BPF" -DCMAKE_INSTALL_PREFIX=/usr 16RUN cd llvm-3.7.1.src/build && make -j8 17 18COPY . bcc 19WORKDIR /root/bcc 20RUN PATH=/root/llvm-3.7.1.src/build/bin:$PATH ./scripts/build-rpm.sh 21