Skip to content

Instantly share code, notes, and snippets.

@xstefen
Created September 17, 2023 08:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xstefen/546d201257475c0ffbb954369453f692 to your computer and use it in GitHub Desktop.
Save xstefen/546d201257475c0ffbb954369453f692 to your computer and use it in GitHub Desktop.
aur: linux-clear: Heres a patch to fix clang lto compiling only modifying the PKGBUILD
diff --git a/PKGBUILD b/PKGBUILD
index a9e2156fb371..3b463bf792eb 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -145,6 +145,11 @@ prepare() {
### Add Clearlinux patches
for i in $(grep '^Patch' ${srcdir}/$pkgbase/linux.spec |\
grep -Ev '^Patch0132|^Patch0118|^Patch0113|^Patch0138' | sed -n 's/.*: //p'); do
+ if [ -n "$_use_llvm_lto" ]; then
+ if [ "${i}" == "0162-extra-optmization-flags.patch" ] ; then
+ continue
+ fi
+ fi
echo "Applying patch ${i}..."
patch -Np1 -i "$srcdir/$pkgbase/${i}"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment