diff options
author | dim <dim@FreeBSD.org> | 2011-06-12 15:42:51 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2011-06-12 15:42:51 +0000 |
commit | ece02cd5829cea836e9365b0845a8ef042d17b0a (patch) | |
tree | b3032e51d630e8070e9e08d6641648f195316a80 /tools/gold | |
parent | 2b066988909948dc3d53d01760bc2d71d32f3feb (diff) | |
download | FreeBSD-src-ece02cd5829cea836e9365b0845a8ef042d17b0a.zip FreeBSD-src-ece02cd5829cea836e9365b0845a8ef042d17b0a.tar.gz |
Vendor import of llvm trunk r132879:
http://llvm.org/svn/llvm-project/llvm/trunk@132879
Diffstat (limited to 'tools/gold')
-rw-r--r-- | tools/gold/CMakeLists.txt | 6 | ||||
-rw-r--r-- | tools/gold/Makefile | 4 | ||||
-rw-r--r-- | tools/gold/gold-plugin.cpp | 1 |
3 files changed, 6 insertions, 5 deletions
diff --git a/tools/gold/CMakeLists.txt b/tools/gold/CMakeLists.txt index d8633e6..eb4b6e6 100644 --- a/tools/gold/CMakeLists.txt +++ b/tools/gold/CMakeLists.txt @@ -1,7 +1,9 @@ -set(LLVM_BINUTILS_INCDIR "/usr/include" CACHE PATH +set(LLVM_BINUTILS_INCDIR "" CACHE PATH "PATH to binutils/include containing plugin-api.h for gold plugin.") -if( NOT EXISTS "${LLVM_BINUTILS_INCDIR}/plugin-api.h" ) +if( NOT LLVM_BINUTILS_INCDIR ) + # Nothing to say. +elseif( NOT EXISTS "${LLVM_BINUTILS_INCDIR}/plugin-api.h" ) message(STATUS "plugin-api.h not found. gold plugin excluded from the build.") else() include_directories( ${LLVM_BINUTILS_INCDIR} ) diff --git a/tools/gold/Makefile b/tools/gold/Makefile index 66a0271..759406f 100644 --- a/tools/gold/Makefile +++ b/tools/gold/Makefile @@ -22,10 +22,10 @@ SHARED_LIBRARY = 1 LOADABLE_MODULE = 1 LINK_COMPONENTS := support -LIBS += -llto # Because off_t is used in the public API, the largefile parts are required for # ABI compatibility. -CXXFLAGS+=-I$(BINUTILS_INCDIR) -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -lLTO +CXXFLAGS+=-I$(BINUTILS_INCDIR) -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 +CXXFLAGS+=$(SharedLibDir)/$(SharedPrefix)LTO$(SHLIBEXT) include $(LEVEL)/Makefile.common diff --git a/tools/gold/gold-plugin.cpp b/tools/gold/gold-plugin.cpp index dd66eae..9e43bef 100644 --- a/tools/gold/gold-plugin.cpp +++ b/tools/gold/gold-plugin.cpp @@ -408,7 +408,6 @@ static ld_plugin_status all_symbols_read_hook(void) { if (options::generate_bc_file == options::BC_ONLY) exit(0); } - size_t bufsize = 0; const char *objPath; if (lto_codegen_compile_to_file(code_gen, &objPath)) { (*message)(LDPL_ERROR, "Could not produce a combined object file\n"); |