Merge topic 'openbsd-elf-parsing'

480e924 OpenBSD: Enable ELF parsing and editing (#14241)
This commit is contained in:
Brad King 2013-06-24 08:38:02 -04:00 committed by CMake Topic Stage
commit 1576592d02
2 changed files with 11 additions and 2 deletions

View File

@ -11,7 +11,11 @@
#=============================================================================
include(CheckIncludeFile)
# Check if we can build support for ELF parsing.
if(CMAKE_CXX_PLATFORM_ID MATCHES "OpenBSD")
CHECK_INCLUDE_FILES("stdint.h;elf_abi.h" HAVE_ELF_H)
else()
CHECK_INCLUDE_FILE("elf.h" HAVE_ELF_H)
endif()
if(HAVE_ELF_H)
set(CMAKE_USE_ELF_PARSER 1)
else()

View File

@ -19,7 +19,12 @@
#include <cmsys/CPU.h>
// Include the ELF format information system header.
#if defined(__OpenBSD__)
# include <stdint.h>
# include <elf_abi.h>
#else
# include <elf.h>
#endif
#if defined(__sun)
# include <sys/link.h> // For dynamic section information
#endif