Hello community, here is the log from the commit of package creduce for openSUSE:Factory checked in at 2020-04-13 12:53:29 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/creduce (Old) and /work/SRC/openSUSE:Factory/.creduce.new.3248 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "creduce" Mon Apr 13 12:53:29 2020 rev:22 rq:793392 version:2.10.0+git.20191010.8a67e69 Changes: -------- --- /work/SRC/openSUSE:Factory/creduce/creduce.changes 2020-04-11 23:47:35.895137276 +0200 +++ /work/SRC/openSUSE:Factory/.creduce.new.3248/creduce.changes 2020-04-13 12:53:30.648653978 +0200 @@ -1,0 +2,11 @@ +Sun Apr 12 10:44:12 UTC 2020 - Martin Liška <mli...@suse.cz> + +- Revert to LLVM 9 due to: + https://github.com/csmith-project/creduce/issues/210 + +------------------------------------------------------------------- +Sun Apr 12 07:08:57 UTC 2020 - Martin Liška <mli...@suse.cz> + +- Add port-to-llvm10.patch and std-cpp14.patch to use LLVM10. + +------------------------------------------------------------------- New: ---- port-to-llvm10.patch std-cpp14.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ creduce.spec ++++++ --- /var/tmp/diff_new_pack.6kecDz/_old 2020-04-13 12:53:31.468654335 +0200 +++ /var/tmp/diff_new_pack.6kecDz/_new 2020-04-13 12:53:31.472654338 +0200 @@ -27,6 +27,8 @@ Patch0: llvm9-libs-fix.patch Patch1: install-location.patch Patch2: binary-search-location.patch +Patch3: port-to-llvm10.patch +Patch4: std-cpp14.patch BuildRequires: astyle BuildRequires: clang9-devel BuildRequires: cmake ++++++ port-to-llvm10.patch ++++++ >From 37a8db44d97029e95f3ab9a728d23053eb82c1cd Mon Sep 17 00:00:00 2001 From: Bernhard Rosenkraenzer <b...@lindev.ch> Date: Thu, 6 Feb 2020 15:02:35 +0100 Subject: [PATCH] Port to LLVM 10.0 --- clang_delta/TransformationManager.cpp | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/clang_delta/TransformationManager.cpp b/clang_delta/TransformationManager.cpp index ca2f2b48..acf82837 100644 --- a/clang_delta/TransformationManager.cpp +++ b/clang_delta/TransformationManager.cpp @@ -16,6 +16,7 @@ #include <sstream> +#include "clang/Basic/Builtins.h" #include "clang/Basic/Diagnostic.h" #include "clang/Basic/TargetInfo.h" #include "clang/Lex/Preprocessor.h" @@ -101,6 +102,7 @@ bool TransformationManager::initializeCompilerInstance(std::string &ErrorMsg) CompilerInvocation &Invocation = ClangInstance->getInvocation(); InputKind IK = FrontendOptions::getInputKindForExtension( StringRef(SrcFileName).rsplit('.').second); +#if LLVM_VERSION_MAJOR < 10 if (IK.getLanguage() == InputKind::C) { Invocation.setLangDefaults(ClangInstance->getLangOpts(), InputKind::C, T, PPOpts); } @@ -111,6 +113,18 @@ bool TransformationManager::initializeCompilerInstance(std::string &ErrorMsg) Invocation.setLangDefaults(ClangInstance->getLangOpts(), InputKind::CXX, T, PPOpts); } else if(IK.getLanguage() == InputKind::OpenCL) { +#else + if (IK.getLanguage() == Language::C) { + Invocation.setLangDefaults(ClangInstance->getLangOpts(), InputKind(Language::C), T, PPOpts); + } + else if (IK.getLanguage() == Language::CXX) { + // ISSUE: it might cause some problems when building AST + // for a function which has a non-declared callee, e.g., + // It results an empty AST for the caller. + Invocation.setLangDefaults(ClangInstance->getLangOpts(), InputKind(Language::CXX), T, PPOpts); + } + else if(IK.getLanguage() == Language::OpenCL) { +#endif //Commandline parameters std::vector<const char*> Args; Args.push_back("-x"); @@ -122,7 +136,7 @@ bool TransformationManager::initializeCompilerInstance(std::string &ErrorMsg) ClangInstance->createFileManager(); if(CLCPath != NULL && ClangInstance->hasFileManager() && - ClangInstance->getFileManager().getDirectory(CLCPath, false) != NULL) { + ClangInstance->getFileManager().getDirectory(CLCPath, false)) { Args.push_back("-I"); Args.push_back(CLCPath); } @@ -132,10 +146,19 @@ bool TransformationManager::initializeCompilerInstance(std::string &ErrorMsg) Args.push_back("-fno-builtin"); CompilerInvocation::CreateFromArgs(Invocation, +#if LLVM_VERSION_MAJOR >= 10 + Args, +#else &Args[0], &Args[0] + Args.size(), +#endif ClangInstance->getDiagnostics()); Invocation.setLangDefaults(ClangInstance->getLangOpts(), - InputKind::OpenCL, T, PPOpts); +#if LLVM_VERSION_MAJOR >= 10 + InputKind(Language::OpenCL), +#else + InputKind::OpenCL, +#endif + T, PPOpts); } else { ErrorMsg = "Unsupported file type!"; ++++++ std-cpp14.patch ++++++ diff --git a/CMakeLists.txt b/CMakeLists.txt index 832c35b..b2d8abc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -114,13 +114,14 @@ check_cxx_compiler_flag( if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang") - # XXX figure out how to get "-std=c++11 -fno-rtti" from LLVM. That's how we + # XXX figure out how to get "-std=c++14 -fno-rtti" from LLVM. That's how we # get those options in the Automake path... - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-rtti -fno-strict-aliasing -Wall -Wextra -Wno-long-long -Wno-unused-parameter -Wno-missing-field-initializers") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -fno-rtti -fno-strict-aliasing -Wall -Wextra -Wno-long-long -Wno-unused-parameter -Wno-missing-field-initializers") if(SUPPORTS_FVISIBILITY_INLINES_HIDDEN_FLAG) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility-inlines-hidden") endif() set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3") + set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELEASE} -O3") endif() ###############################################################################