[lld] r220315 - Assume cxxabi.h exists on FreeBSD
Rui Ueyama
ruiu at google.com
Tue Oct 21 13:02:00 PDT 2014
Author: ruiu
Date: Tue Oct 21 15:02:00 2014
New Revision: 220315
URL: http://llvm.org/viewvc/llvm-project?rev=220315&view=rev
Log:
Assume cxxabi.h exists on FreeBSD
HAVE_CXXABI_H is not defined on FreeBSD but the system actually
has the header. CMake test fails because the header depends on size_t.
Modified:
lld/trunk/lib/ReaderWriter/ELF/ELFLinkingContext.cpp
lld/trunk/lib/ReaderWriter/MachO/MachOLinkingContext.cpp
lld/trunk/test/elf/X86_64/demangle.test
Modified: lld/trunk/lib/ReaderWriter/ELF/ELFLinkingContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/ELFLinkingContext.cpp?rev=220315&r1=220314&r2=220315&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/ELFLinkingContext.cpp (original)
+++ lld/trunk/lib/ReaderWriter/ELF/ELFLinkingContext.cpp Tue Oct 21 15:02:00 2014
@@ -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
Modified: lld/trunk/lib/ReaderWriter/MachO/MachOLinkingContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/MachO/MachOLinkingContext.cpp?rev=220315&r1=220314&r2=220315&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/MachO/MachOLinkingContext.cpp (original)
+++ lld/trunk/lib/ReaderWriter/MachO/MachOLinkingContext.cpp Tue Oct 21 15:02:00 2014
@@ -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
Modified: lld/trunk/test/elf/X86_64/demangle.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/X86_64/demangle.test?rev=220315&r1=220314&r2=220315&view=diff
==============================================================================
--- lld/trunk/test/elf/X86_64/demangle.test (original)
+++ lld/trunk/test/elf/X86_64/demangle.test Tue Oct 21 15:02:00 2014
@@ -6,6 +6,5 @@ RUN: lld -flavor gnu -target x86_64 %p/I
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
More information about the llvm-commits
mailing list