From 9e480dc9284f2292c94423c19ba028b9acd693d8 Mon Sep 17 00:00:00 2001 From: PulkoMandy Date: Wed, 21 Aug 2024 08:01:54 +0200 Subject: [PATCH] llvm18: restore patch that went lost on update from llvm17 Fixes #10445 --- sys-devel/llvm/llvm18-18.1.7.recipe | 2 +- sys-devel/llvm/patches/llvm18-18.1.7.patchset | 26 +++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/sys-devel/llvm/llvm18-18.1.7.recipe b/sys-devel/llvm/llvm18-18.1.7.recipe index b4098e215..9f9f5a1fa 100644 --- a/sys-devel/llvm/llvm18-18.1.7.recipe +++ b/sys-devel/llvm/llvm18-18.1.7.recipe @@ -30,7 +30,7 @@ other than the ones listed above. HOMEPAGE="https://www.llvm.org/" COPYRIGHT="2003-2024 University of Illinois at Urbana-Champaign" LICENSE="Apache v2 with LLVM Exception" -REVISION="1" +REVISION="2" SOURCE_URI="https://github.com/llvm/llvm-project/releases/download/llvmorg-$portVersion/llvm-project-$portVersion.src.tar.xz" CHECKSUM_SHA256="74446ab6943f686391954cbda0d77ae92e8a60c432eff437b8666e121d748ec4" SOURCE_DIR="llvm-project-$portVersion.src" diff --git a/sys-devel/llvm/patches/llvm18-18.1.7.patchset b/sys-devel/llvm/patches/llvm18-18.1.7.patchset index bd7332aba..e184489ab 100644 --- a/sys-devel/llvm/patches/llvm18-18.1.7.patchset +++ b/sys-devel/llvm/patches/llvm18-18.1.7.patchset @@ -548,3 +548,29 @@ index df3fb59..30cb748 100644 -- 2.45.1 + +From c673cac7374e2a5895f0be337775c1074237f7e0 Mon Sep 17 00:00:00 2001 +From: Gerasim Troeglazov <3dEyes@gmail.com> +Date: Sun, 19 May 2024 10:31:55 +0200 +Subject: Allow linking gcc compiled code with lld + +https://github.com/haikuports/haikuports/issues/10445 + +diff --git a/lld/ELF/Driver.cpp b/lld/ELF/Driver.cpp +index c2059c7..31541a4 100644 +--- a/lld/ELF/Driver.cpp ++++ b/lld/ELF/Driver.cpp +@@ -186,8 +186,8 @@ static std::tuple parseEmulation(StringRef emul) { + .Case("elf64lriscv", {ELF64LEKind, EM_RISCV}) + .Case("elf64ppc", {ELF64BEKind, EM_PPC64}) + .Case("elf64lppc", {ELF64LEKind, EM_PPC64}) +- .Cases("elf_amd64", "elf_x86_64", {ELF64LEKind, EM_X86_64}) +- .Case("elf_i386", {ELF32LEKind, EM_386}) ++ .Cases("elf_amd64", "elf_x86_64", "elf_x86_64_haiku", {ELF64LEKind, EM_X86_64}) ++ .Cases("elf_i386", "elf_i386_haiku", {ELF32LEKind, EM_386}) + .Case("elf_iamcu", {ELF32LEKind, EM_IAMCU}) + .Case("elf64_sparc", {ELF64BEKind, EM_SPARCV9}) + .Case("msp430elf", {ELF32LEKind, EM_MSP430}) +-- +2.43.2 +