llvm18: restore patch that went lost on update from llvm17

Fixes #10445
This commit is contained in:
PulkoMandy
2024-08-21 08:01:54 +02:00
parent 10f6d0e9d7
commit 9e480dc928
2 changed files with 27 additions and 1 deletions

View File

@@ -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"

View File

@@ -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<ELFKind, uint16_t, uint8_t> 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