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

Commit 84abd23

Browse files
TimNNarielb1
authored andcommitted
Merge pull request #70 from TimNN/freebsd-4.0
Freebsd Fixes for LLVM 4.0
2 parents 01e00ed + 9d7196f commit 84abd23

File tree

7 files changed

+13
-6
lines changed

7 files changed

+13
-6
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -845,7 +845,7 @@ if( LLVM_INCLUDE_UTILS )
845845
add_subdirectory(utils/not)
846846
add_subdirectory(utils/llvm-lit)
847847
add_subdirectory(utils/yaml-bench)
848-
add_subdirectory(utils/unittest)
848+
# add_subdirectory(utils/unittest)
849849
else()
850850
if ( LLVM_INCLUDE_TESTS )
851851
message(FATAL_ERROR "Including tests when not building utils will not work.

cmake/modules/HandleLLVMOptions.cmake

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,12 @@ endif()
105105

106106
# Pass -Wl,-z,defs. This makes sure all symbols are defined. Otherwise a DSO
107107
# build might work on ELF but fail on MachO/COFF.
108-
if(NOT (${CMAKE_SYSTEM_NAME} MATCHES "Darwin" OR WIN32 OR CYGWIN OR
109-
${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" OR
110-
${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD") AND
108+
if(NOT (${TARGET_TRIPLE} MATCHES "darwin" OR
109+
${TARGET_TRIPLE} MATCHES "windows" OR
110+
${TARGET_TRIPLE} MATCHES "mingw" OR
111+
${TARGET_TRIPLE} MATCHES "freebsd" OR
112+
${TARGET_TRIPLE} MATCHES "netbsd" OR
113+
${TARGET_TRIPLE} MATCHES "openbsd") AND
111114
NOT LLVM_USE_SANITIZER)
112115
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-z,defs")
113116
endif()

lib/Demangle/ItaniumDemangle.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
#include <algorithm>
1717
#include <cctype>
18+
#include <cstdio>
1819
#include <cstdlib>
1920
#include <cstring>
2021
#include <numeric>

lib/Support/PrettyStackTrace.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include "llvm/Support/raw_ostream.h"
2323

2424
#include <cstdarg>
25+
#include <cstdio>
2526
#include <tuple>
2627

2728
#ifdef HAVE_CRASHREPORTERCLIENT_H

lib/Support/TarWriter.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
#include "llvm/Support/MathExtras.h"
2929
#include "llvm/Support/Path.h"
3030

31+
#include <cstdio>
32+
3133
using namespace llvm;
3234

3335
// Each file in an archive must be aligned to this block size.

tools/dsymutil/DwarfLinker.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1647,7 +1647,7 @@ PointerIntPair<DeclContext *, 1> DeclContextTree::getChildDeclContext(
16471647
File);
16481648
(void)gotFileName;
16491649
assert(gotFileName && "Must get file name from line table");
1650-
#ifdef HAVE_REALPATH
1650+
#if defined(HAVE_REALPATH) && defined(PATH_MAX)
16511651
char RealPath[PATH_MAX + 1];
16521652
RealPath[PATH_MAX] = 0;
16531653
if (::realpath(File.c_str(), RealPath))

tools/llvm-xray/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ set(LLVM_XRAY_TOOLS
1414
xray-extract.cc
1515
xray-registry.cc)
1616

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

0 commit comments

Comments
 (0)