summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lld/lib/ReaderWriter/ELF/ELFLinkingContext.cpp4
-rw-r--r--lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp4
-rw-r--r--lld/test/elf/X86_64/demangle.test1
3 files changed, 6 insertions, 3 deletions
diff --git a/lld/lib/ReaderWriter/ELF/ELFLinkingContext.cpp b/lld/lib/ReaderWriter/ELF/ELFLinkingContext.cpp
index 9dba86a9b8e..f542ac9f783 100644
--- a/lld/lib/ReaderWriter/ELF/ELFLinkingContext.cpp
+++ b/lld/lib/ReaderWriter/ELF/ELFLinkingContext.cpp
@@ -22,7 +22,9 @@
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/Path.h"
-#if HAVE_CXXABI_H
+// FreeBSD 10.0 has cxxabi.h but fails to define HAVE_CXXABI_H due to
+// header dependency issues.
+#if defined(HAVE_CXXABI_H) || defined (__FreeBSD__)
#include <cxxabi.h>
#endif
diff --git a/lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp b/lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp
index 9c0736dfae4..f762aa5e397 100644
--- a/lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp
+++ b/lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp
@@ -27,7 +27,9 @@
#include "llvm/Support/Path.h"
#include <algorithm>
-#if HAVE_CXXABI_H
+// FreeBSD 10.0 has cxxabi.h but fails to define HAVE_CXXABI_H due to
+// header dependency issues.
+#if defined(HAVE_CXXABI_H) || defined (__FreeBSD__)
#include <cxxabi.h>
#endif
diff --git a/lld/test/elf/X86_64/demangle.test b/lld/test/elf/X86_64/demangle.test
index 9f2c825ad44..820e6be9e03 100644
--- a/lld/test/elf/X86_64/demangle.test
+++ b/lld/test/elf/X86_64/demangle.test
@@ -6,6 +6,5 @@ RUN: lld -flavor gnu -target x86_64 %p/Inputs/undefcpp.o --noinhibit-exec 2>&1 |
RUN: lld -flavor gnu -target x86_64 %p/Inputs/undefcpp.o --noinhibit-exec --no-demangle 2>&1 | FileCheck -check-prefix=NODEMANGLE %s
RUN: lld -flavor gnu -target x86_64 %p/Inputs/undefcpp.o --noinhibit-exec --demangle 2>&1 | FileCheck -check-prefix=DEMANGLE %s
-XFAIL: freebsd
#DEMANGLE: undefcpp.o: foo(char const*)
#NODEMANGLE: undefcpp.o: _Z3fooPKc
OpenPOWER on IntegriCloud