• Yonghong Song's avatar
    fix lua-bcc build issue with cmake try_compile · 75e2f379
    Yonghong Song authored
    Certain versions of recent gcc (e.g., gcc 6.3.0 on ubuntu17.04)
    has pie enabled by default at linker (collect2) stage.
    The compilation flag "-no-pie" is available to negate
    this linker option.
    
    Add -no-pie to compilation flag only if it is available.
    Earlier gcc compiler may not have this option but it does
    not have linker pie on-by-default either.
    
    Tested with ubuntu 17.04 and my local gcc 4.8.5 (not accepting -no-pie).
    Signed-off-by: default avatarYonghong Song <yhs@fb.com>
    75e2f379
CMakeLists.txt 973 Bytes