creduce: Fix building with Clang 20 and enable aarch64 builds (#24030)
This commit is contained in:
parent
fe56bcb246
commit
44f2475894
24
mingw-w64-creduce/002-llvm20.patch
Normal file
24
mingw-w64-creduce/002-llvm20.patch
Normal file
@ -0,0 +1,24 @@
|
||||
diff -bur creduce-o/clang_delta/Transformation.cpp creduce/clang_delta/Transformation.cpp
|
||||
--- creduce-o/clang_delta/Transformation.cpp 2025-04-18 00:20:17.540740900 -0600
|
||||
+++ creduce/clang_delta/Transformation.cpp 2025-04-18 00:20:29.202521300 -0600
|
||||
@@ -94,6 +94,8 @@
|
||||
|
||||
void Transformation::outputTransformedSource(llvm::raw_ostream &OutStream)
|
||||
{
|
||||
+ using namespace llvm;
|
||||
+
|
||||
FileID MainFileID = SrcManager->getMainFileID();
|
||||
const RewriteBuffer *RWBuf = TheRewriter.getRewriteBufferFor(MainFileID);
|
||||
|
||||
diff -bur creduce-o/clang_delta/TransformationManager.cpp creduce/clang_delta/TransformationManager.cpp
|
||||
--- creduce-o/clang_delta/TransformationManager.cpp 2025-04-18 00:20:17.516237400 -0600
|
||||
+++ creduce/clang_delta/TransformationManager.cpp 2025-04-18 00:31:08.114333100 -0600
|
||||
@@ -91,7 +91,7 @@
|
||||
ClangInstance = new CompilerInstance();
|
||||
assert(ClangInstance);
|
||||
|
||||
- ClangInstance->createDiagnostics();
|
||||
+ ClangInstance->createDiagnostics(ClangInstance->getVirtualFileSystem());
|
||||
|
||||
TargetOptions &TargetOpts = ClangInstance->getTargetOpts();
|
||||
PreprocessorOptions &PPOpts = ClangInstance->getPreprocessorOpts();
|
||||
@ -5,11 +5,11 @@ pkgbase=mingw-w64-${_realname}
|
||||
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
|
||||
replaces=("${MINGW_PACKAGE_PREFIX}-${_realname}-git")
|
||||
pkgver=2.10.0.r110.g31e855e
|
||||
pkgrel=1
|
||||
pkgrel=2
|
||||
_commit=31e855e290970cba0286e5032971509c0e7c0a80
|
||||
pkgdesc="A C program reducer (mingw-w64)"
|
||||
arch=('any')
|
||||
mingw_arch=('mingw64' 'ucrt64' 'clang64')
|
||||
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
|
||||
url='https://github.com/csmith-project/creduce'
|
||||
license=('spdx:NCSA')
|
||||
depends=('perl-Benchmark-Timer'
|
||||
@ -25,20 +25,34 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-cc"
|
||||
"${MINGW_PACKAGE_PREFIX}-clang"
|
||||
"git")
|
||||
source=(${_realname}::git+https://github.com/csmith-project/creduce#commit=${_commit}
|
||||
"0001-llvm19.patch")
|
||||
"001-llvm19.patch"
|
||||
"002-llvm20.patch")
|
||||
sha256sums=('94887099adcc2e98dc829fb2c00b587aa8693346951bfca7674fd9086925b9e8'
|
||||
'67fd2736c16699d4e0e35c13c247c4c59ee9c0ce7c3f75403956aec0ab0f04eb')
|
||||
'67fd2736c16699d4e0e35c13c247c4c59ee9c0ce7c3f75403956aec0ab0f04eb'
|
||||
'3ad5859c447ccbabee7da5818354ab91f11aeabc71948ff906eabbae508fe246')
|
||||
|
||||
pkgver() {
|
||||
cd "${srcdir}/${_realname}"
|
||||
git describe --long ${_commit} | sed 's/creduce-//g;s/\([^-]*-g\)/r\1/;s/-/./g;s/^v//g'
|
||||
}
|
||||
|
||||
apply_patch_with_msg() {
|
||||
for _patch in "$@"
|
||||
do
|
||||
msg2 "Applying ${_patch}"
|
||||
patch -Nbp1 -i "${srcdir}/${_patch}"
|
||||
done
|
||||
}
|
||||
|
||||
prepare() {
|
||||
cd "${srcdir}/${_realname}"
|
||||
|
||||
# https://github.com/csmith-project/creduce/issues/276
|
||||
patch -Np1 -i "${srcdir}/0001-llvm19.patch"
|
||||
apply_patch_with_msg \
|
||||
001-llvm19.patch
|
||||
|
||||
apply_patch_with_msg \
|
||||
002-llvm20.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user