• Yonghong Song's avatar
    attempt to compile with system bpf.h if default compile failed · c53d8ae7
    Yonghong Song authored
    Currently, bcc uses its own version of bpf.h which tries to
    sync with upstream header regularly. If the host bpf.h version
    is lower, bcc can still compile as some bcc codes may requires
    a higher version of bpf.h.
    
    Such an approach does have a drawback. Suppose service A,
    statically linked with bcc, runs on kernel version X.
    Now, the kernel upgrades to version Y. After kernel upgrade/reboot,
    service A may not be able to compile since old bcc bpf.h
    may not align with the new kernel headers.
    For such cases, new version of service A needs rollout.
    
    This patch addresses this issue by attempting a second
    compilation using system bpf.h instead. The feature is not on
    by default. To enable it, pass -DBCC_BACKUP_COMPILE=1
    in cmake setup stage.
    Signed-off-by: default avatarYonghong Song <yhs@fb.com>
    c53d8ae7
CMakeLists.txt 582 Bytes