diff options
author | jbeich <jbeich@FreeBSD.org> | 2018-08-21 07:38:06 +0800 |
---|---|---|
committer | jbeich <jbeich@FreeBSD.org> | 2018-08-21 07:38:06 +0800 |
commit | 66b2acfb0640c119135ab1160ab65828b47981ec (patch) | |
tree | 24171b559858a1ab6ef26f2036eef38bb3bf7f44 /graphics | |
parent | e0505d7a5571945b3ea084eb0aab9b4280ba2b80 (diff) | |
download | freebsd-ports-gnome-66b2acfb0640c119135ab1160ab65828b47981ec.tar.gz freebsd-ports-gnome-66b2acfb0640c119135ab1160ab65828b47981ec.tar.zst freebsd-ports-gnome-66b2acfb0640c119135ab1160ab65828b47981ec.zip |
lang/clover: unbreak with llvm70
llvm/codegen/native.cpp:135:49: error: too few arguments to function call, expected at least 4, have 3
if (tm->addPassesToEmitFile(pm, fos, ft))
~~~~~~~~~~~~~~~~~~~~~~~ ^
/usr/local/llvm70/include/llvm/Target/TargetMachine.h:260:3: note: 'addPassesToEmitFile' declared here
virtual bool addPassesToEmitFile(PassManagerBase &, raw_pwrite_stream &,
^
Obtained from: upstream
Approved by: portmgr blanket
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/mesa-dri/files/patch-llvm7 | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/graphics/mesa-dri/files/patch-llvm7 b/graphics/mesa-dri/files/patch-llvm7 new file mode 100644 index 000000000000..a64040e86c95 --- /dev/null +++ b/graphics/mesa-dri/files/patch-llvm7 @@ -0,0 +1,52 @@ +commit d424be0feda5 +Author: Jan Vesely <jan.vesely@rutgers.edu> +Date: Tue May 22 17:52:30 2018 -0400 + + clover: Fix build after llvm r332881. + + v2: fix whitespace and indentation + + r332881 added an extra parameter to the emit function. + Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106619 + Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> + Reviewed-By: Aaron Watry <awatry@gmail.com> + Tested-By: Aaron Watry <awatry@gmail.com> + Tested-by: Kai Wasserbäch <kai@dev.carbon-project.org> + +--- src/gallium/state_trackers/clover/llvm/codegen/native.cpp.orig 2018-07-27 13:52:17 UTC ++++ src/gallium/state_trackers/clover/llvm/codegen/native.cpp +@@ -126,13 +126,12 @@ namespace { + { + compat::pass_manager pm; + ::llvm::raw_svector_ostream os { data }; +- compat::raw_ostream_to_emit_file fos(os); + + mod.setDataLayout(compat::get_data_layout(*tm)); + tm->Options.MCOptions.AsmVerbose = + (ft == TargetMachine::CGFT_AssemblyFile); + +- if (tm->addPassesToEmitFile(pm, fos, ft)) ++ if (compat::add_passes_to_emit_file(*tm, pm, os, ft)) + fail(r_log, build_error(), "TargetMachine can't emit this file"); + + pm.run(mod); +--- src/gallium/state_trackers/clover/llvm/compat.hpp.orig 2018-07-27 13:52:17 UTC ++++ src/gallium/state_trackers/clover/llvm/compat.hpp +@@ -247,6 +247,17 @@ namespace clover { + ::llvm::WriteBitcodeToFile(&mod, os); + #endif + } ++ ++ template<typename TM, typename PM, typename OS, typename FT> ++ bool add_passes_to_emit_file(TM &tm, PM &pm, OS &os, FT &ft) ++ { ++ compat::raw_ostream_to_emit_file fos(os); ++#if HAVE_LLVM >= 0x0700 ++ return tm.addPassesToEmitFile(pm, fos, nullptr, ft); ++#else ++ return tm.addPassesToEmitFile(pm, fos, ft); ++#endif ++ } + } + } + } |