Merge branch 'ubuntu-trusty-fixes'
Conflicts: src/core/util/CMakeLists.txt Change-Id: I94811612bcd31406c0e275f72058c331a99c8943
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
find_program(LLVMCONFIG NAMES llvm-config llvm-config-3.3 llvm-config-3.2 llvm-config-3.1)
|
||||
find_program(LLVMCONFIG NAMES llvm-config llvm-config-3.4 llvm-config-3.3 llvm-config-3.2 llvm-config-3.1)
|
||||
|
||||
if( NOT LLVMCONFIG )
|
||||
message(FATAL_ERROR "llvm-config not found, try installing llvm-dev llvm")
|
||||
|
||||
42
cmake/FindLibIberty.cmake
Normal file
42
cmake/FindLibIberty.cmake
Normal file
@ -0,0 +1,42 @@
|
||||
# - FindLibIberty.cmake
|
||||
# This module can find libiberty on both Debian 7 and Ubuntu 14.04
|
||||
# (The libiberty headers moved from /usr/include to /usr/include/libiberty
|
||||
# between Ubuntu 13.10 and 14.04, which made this search module necessary.)
|
||||
#
|
||||
# The following variables will be defined for your use:
|
||||
#
|
||||
# LibIberty_FOUND - TRUE if both library and headers were found
|
||||
# LibIberty_INCLUDE_DIRS - Include directories
|
||||
# LibIberty_LIBRARIES - Library path
|
||||
|
||||
# set(LibIberty_PREFER_DYNAMIC True) if you want to prefer the dynamic library
|
||||
|
||||
if(LibIberty_PREFER_DYNAMIC)
|
||||
set(LibIberty_SEARCHORDER libiberty.so libiberty.a)
|
||||
else()
|
||||
set(LibIberty_SEARCHORDER libiberty.a libiberty.so)
|
||||
endif()
|
||||
|
||||
find_library(LibIberty_LIBRARIES NAMES ${LibIberty_SEARCHORDER})
|
||||
|
||||
find_path(LibIberty_INCLUDE_DIRS libiberty.h
|
||||
PATHS
|
||||
/usr/include /usr/include/libiberty
|
||||
/usr/local/include /usr/local/include/libiberty
|
||||
DOC "libiberty include directory containing libiberty.h")
|
||||
|
||||
if(LibIberty_INCLUDE_DIRS AND LibIberty_LIBRARIES)
|
||||
set(LibIberty_FOUND TRUE)
|
||||
endif()
|
||||
|
||||
if(LibIberty_FOUND)
|
||||
if(NOT LibIberty_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Found libiberty: ${LibIberty_LIBRARIES}")
|
||||
endif()
|
||||
else()
|
||||
if(LibIberty_FIND_REQUIRED)
|
||||
MESSAGE(FATAL_ERROR "Could not find libiberty: install binutils-dev or libiberty-dev")
|
||||
else()
|
||||
MESSAGE(STATUS "libiberty not found")
|
||||
endif()
|
||||
endif()
|
||||
@ -3,7 +3,10 @@ option( VERBOSE_MAKE "Verbose Makefile output" OFF) # defaults to OFF
|
||||
set(CMAKE_VERBOSE_MAKEFILE ${VERBOSE_MAKE})
|
||||
|
||||
### Additional compiler and linker flags ##
|
||||
set(CMAKE_C_FLAGS "-g -Wall")
|
||||
# -Wunused-local-typedefs is included in -Wall since GCC 4.8, and generates a
|
||||
# flood of "typedef '...' locally defined but not used" warnings in
|
||||
# ac++-1.2-generated code
|
||||
set(CMAKE_C_FLAGS "-g -Wall -Wno-unused-local-typedefs")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS}")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "-Wl,-gc-sections")
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@ Required for Fail*:
|
||||
- protobuf-compiler
|
||||
- cmake 2.8.2 (2.8.11 preferred)
|
||||
- cmake-curses-gui
|
||||
- binutils-dev
|
||||
- binutils-dev, on newer systems libiberty-dev
|
||||
- AspectC++ (ag++, ac++): AspectC++ 1.1 or newer is known to work and can be
|
||||
obtained from <http://www.aspectc.org>; nightlies can be downloaded from
|
||||
<http://akut.aspectc.org>. Make sure you use the 64-bit version if running
|
||||
|
||||
@ -43,12 +43,8 @@ include_directories(${Boost_INCLUDE_DIRS})
|
||||
link_directories(${Boost_LIBRARY_DIRS})
|
||||
|
||||
# libiberty required by Demangler.cc:
|
||||
find_library(LIB_IBERTY iberty)
|
||||
mark_as_advanced(LIB_IBERTY)
|
||||
|
||||
if(${LIB_IBERTY} STREQUAL LIB_IBERTY-NOTFOUND)
|
||||
message(FATAL_ERROR "libiberty not found. Try installing binutils-dev: [ sudo aptitude install binutils-dev ]")
|
||||
endif()
|
||||
find_package(LibIberty REQUIRED)
|
||||
include_directories(${LibIberty_INCLUDE_DIRS})
|
||||
|
||||
# libz required by gzstream
|
||||
find_package(ZLIB REQUIRED)
|
||||
@ -73,7 +69,7 @@ mark_as_advanced(FAIL_OBJDUMP)
|
||||
|
||||
add_library(fail-util ${SRCS})
|
||||
add_dependencies(fail-util fail-comm)
|
||||
target_link_libraries(fail-util fail-comm ${PROTOBUF_LIBRARY} ${Boost_LIBRARIES} ${LIB_IBERTY} ${ZLIB_LIBRARIES} ${LIBDWARF_LIBRARIES} ${LIBELF_LIBRARIES})
|
||||
target_link_libraries(fail-util fail-comm ${PROTOBUF_LIBRARY} ${Boost_LIBRARIES} ${LibIberty_LIBRARIES} ${ZLIB_LIBRARIES} ${LIBDWARF_LIBRARIES} ${LIBELF_LIBRARIES})
|
||||
|
||||
option(BUILD_LLVM_DISASSEMBLER "Build the LLVM-based disassembler (LLVM 3.3 preferred, for 3.1 and 3.2 read doc/how-to-build.txt)" OFF)
|
||||
if (BUILD_LLVM_DISASSEMBLER)
|
||||
|
||||
Reference in New Issue
Block a user