From a0bfc0e62448df26e514b41de89aced988a6ab53 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Fri, 22 Aug 2014 20:42:37 +0200 Subject: Fix for strings.h diff --git a/src/glsl/glsl_parser.yy b/src/glsl/glsl_parser.yy index f939fe8..6629904 100644 --- a/src/glsl/glsl_parser.yy +++ b/src/glsl/glsl_parser.yy @@ -24,6 +24,7 @@ #include #include #include +#include #include #include "ast.h" diff --git a/src/hgl/GLRendererRoster.cpp b/src/hgl/GLRendererRoster.cpp index 1712a87..9c0717c 100644 --- a/src/hgl/GLRendererRoster.cpp +++ b/src/hgl/GLRendererRoster.cpp @@ -23,6 +23,7 @@ #include #include +#include extern "C" status_t _kern_get_safemode_option(const char* parameter, -- 1.8.3.4 From edead798024ba52ea21c841ae9613e27754ea0e6 Mon Sep 17 00:00:00 2001 From: Jerome Duval Date: Sat, 21 Mar 2015 18:19:16 +0000 Subject: Fixed build with llvm 3.5 diff --git a/scons/gallium.py b/scons/gallium.py index 9796c78..1edd3ba 100755 --- a/scons/gallium.py +++ b/scons/gallium.py @@ -329,6 +329,7 @@ def generate(env): # Work around aliasing bugs - developers should comment this out ccflags += ['-fno-strict-aliasing'] ccflags += ['-g'] + cxxflags += ['-std=c++11'] if env['build'] in ('checked', 'profile'): # See http://code.google.com/p/jrfonseca/wiki/Gprof2Dot#Which_options_should_I_pass_to_gcc_when_compiling_for_profiling? ccflags += [ diff --git a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp index 1c886ea..b51fdf1 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp +++ b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp @@ -56,10 +56,16 @@ #include #endif /* HAVE_LLVM >= 0x0301 */ -#if HAVE_LLVM >= 0x0303 +#if HAVE_LLVM >= 0x0305 +#define OwningPtr std::unique_ptr +#elif HAVE_LLVM >= 0x0303 #include #endif +#if HAVE_LLVM >= 0x0305 +#include +#endif + #include "util/u_math.h" #include "util/u_debug.h" @@ -226,17 +232,6 @@ disassemble(const void* func, llvm::raw_ostream & Out) } #if HAVE_LLVM >= 0x0300 - const MCSubtargetInfo *STI = T->createMCSubtargetInfo(Triple, sys::getHostCPUName(), ""); - OwningPtr DisAsm(T->createMCDisassembler(*STI)); -#else - OwningPtr DisAsm(T->createMCDisassembler()); -#endif - if (!DisAsm) { - Out << "error: no disassembler for target " << Triple << "\n"; - return 0; - } - -#if HAVE_LLVM >= 0x0300 unsigned int AsmPrinterVariant = AsmInfo->getAssemblerDialect(); #else int AsmPrinterVariant = AsmInfo->getAssemblerDialect(); @@ -256,6 +251,21 @@ disassemble(const void* func, llvm::raw_ostream & Out) } #endif +#if HAVE_LLVM >= 0x0305 + OwningPtr STI(T->createMCSubtargetInfo(Triple, sys::getHostCPUName(), "")); + OwningPtr MCCtx(new MCContext(AsmInfo.get(), MRI.get(), 0)); + OwningPtr DisAsm(T->createMCDisassembler(*STI, *MCCtx)); +#elif HAVE_LLVM >= 0x0300 + const MCSubtargetInfo *STI = T->createMCSubtargetInfo(Triple, sys::getHostCPUName(), ""); + OwningPtr DisAsm(T->createMCDisassembler(*STI)); +#else + OwningPtr DisAsm(T->createMCDisassembler()); +#endif + if (!DisAsm) { + Out << "error: no disassembler for target " << Triple << "\n"; + return 0; + } + #if HAVE_LLVM >= 0x0301 OwningPtr Printer( T->createMCInstPrinter(AsmPrinterVariant, *AsmInfo, *MII, *MRI, *STI)); -- 1.8.3.4