aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/ExecutionEngine/SectionMemoryManager.cpp
diff options
context:
space:
mode:
authorHal Finkel <hfinkel@anl.gov>2015-09-30 22:34:35 +0000
committerHal Finkel <hfinkel@anl.gov>2015-09-30 22:34:35 +0000
commit39ac97fa3aab45bf9b554f294f24055113d5fc91 (patch)
tree39380d782be466ab44409ec1e79bb8d66282e781 /llvm/lib/ExecutionEngine/SectionMemoryManager.cpp
parentde1736ae0258aed29607660c748782fb7cb25793 (diff)
downloadllvm-39ac97fa3aab45bf9b554f294f24055113d5fc91.zip
llvm-39ac97fa3aab45bf9b554f294f24055113d5fc91.tar.gz
llvm-39ac97fa3aab45bf9b554f294f24055113d5fc91.tar.bz2
[PowerPC] undef Relocation names in PowerPC*.def
glibc's PowerPC /usr/include/asm/sigcontext.h, has this: #ifdef __powerpc64__ #include <asm/elf.h> #endif and that contains defines of all of the relocation symbols, like this: #define R_PPC_NONE 0 and if that file is included prior to including include/llvm/Support/ELFRelocs/PowerPC*.def, which we cannot in general prevent, the result will fail. As it turns out, this happens when compiling lld/unittests/DriverTests/GnuLdDriverTest.cpp under PPC64/Linux, because: lld/include/lld/ReaderWriter/ELFLinkingContext.h includes lld/unittests/DriverTests/DriverTest.h which includes utils/unittest/googletest/include/gtest/gtest.h which includes utils/unittest/googletest/include/gtest/internal/gtest-internal.h which includes /usr/include/sys/wait.h which includes /usr/include/signal.h which includes /usr/include/bits/sigcontext.h which includes /usr/include/asm/sigcontext.h which includes /usr/include/asm/elf.h the test could be fixed to include ReaderWriter/ELFLinkingContext.h before including unittests/DriverTests/DriverTest.h, but dealing with this in the *.def files is a more-general solution that localizes the fix to the headers instead of requiring changes to an unbounded number of other source files (both in-tree and external). llvm-svn: 248957
Diffstat (limited to 'llvm/lib/ExecutionEngine/SectionMemoryManager.cpp')
0 files changed, 0 insertions, 0 deletions