Skip to content
This repository was archived by the owner on Feb 5, 2019. It is now read-only.

Freebsd Fixes for LLVM 4.0 #70

Merged
merged 3 commits into from
Apr 23, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,7 @@ if( LLVM_INCLUDE_UTILS )
add_subdirectory(utils/not)
add_subdirectory(utils/llvm-lit)
add_subdirectory(utils/yaml-bench)
add_subdirectory(utils/unittest)
# add_subdirectory(utils/unittest)
else()
if ( LLVM_INCLUDE_TESTS )
message(FATAL_ERROR "Including tests when not building utils will not work.
Expand Down
9 changes: 6 additions & 3 deletions cmake/modules/HandleLLVMOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,12 @@ endif()

# Pass -Wl,-z,defs. This makes sure all symbols are defined. Otherwise a DSO
# build might work on ELF but fail on MachO/COFF.
if(NOT (${CMAKE_SYSTEM_NAME} MATCHES "Darwin" OR WIN32 OR CYGWIN OR
${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" OR
${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD") AND
if(NOT (${TARGET_TRIPLE} MATCHES "darwin" OR
${TARGET_TRIPLE} MATCHES "windows" OR
${TARGET_TRIPLE} MATCHES "mingw" OR
${TARGET_TRIPLE} MATCHES "freebsd" OR
${TARGET_TRIPLE} MATCHES "netbsd" OR
${TARGET_TRIPLE} MATCHES "openbsd") AND
NOT LLVM_USE_SANITIZER)
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-z,defs")
endif()
Expand Down
1 change: 1 addition & 0 deletions lib/Demangle/ItaniumDemangle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

#include <algorithm>
#include <cctype>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <numeric>
Expand Down
1 change: 1 addition & 0 deletions lib/Support/PrettyStackTrace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "llvm/Support/raw_ostream.h"

#include <cstdarg>
#include <cstdio>
#include <tuple>

#ifdef HAVE_CRASHREPORTERCLIENT_H
Expand Down
2 changes: 2 additions & 0 deletions lib/Support/TarWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/Path.h"

#include <cstdio>

using namespace llvm;

// Each file in an archive must be aligned to this block size.
Expand Down
2 changes: 1 addition & 1 deletion tools/dsymutil/DwarfLinker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1647,7 +1647,7 @@ PointerIntPair<DeclContext *, 1> DeclContextTree::getChildDeclContext(
File);
(void)gotFileName;
assert(gotFileName && "Must get file name from line table");
#ifdef HAVE_REALPATH
#if defined(HAVE_REALPATH) && defined(PATH_MAX)
char RealPath[PATH_MAX + 1];
RealPath[PATH_MAX] = 0;
if (::realpath(File.c_str(), RealPath))
Expand Down
2 changes: 1 addition & 1 deletion tools/llvm-xray/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ set(LLVM_XRAY_TOOLS
xray-extract.cc
xray-registry.cc)

add_llvm_tool(llvm-xray llvm-xray.cc ${LLVM_XRAY_TOOLS})
# add_llvm_tool(llvm-xray llvm-xray.cc ${LLVM_XRAY_TOOLS})